DIZNR INTERNATIONAL

Day 02Part 02- Operating System for Computer Science – When we required CPU scheduling

Day 02Part 02- Operating System for Computer Science – When we required CPU scheduling

https://www.gyanodhan.com/video/7B7.%20GATE%20CSEIT/Operating%20System/417.%20Day%2002Part%2002-%20Operating%20System%20for%20Computer%20Science%20-%20When%20we%20required%20CPU%20scheduling%20_.mp4

Here’s a clear explanation for “Day 02 Part 02 – Operating System (OS) for Computer Science: When We Require CPU Scheduling” — great for GATE, UGC NET, university exams, or general understanding.


Topic: When Do We Require CPU Scheduling in an Operating System?


What Is CPU Scheduling?

CPU scheduling is the process of selecting one process from the ready queue and assigning the CPU to it.

The Operating System’s scheduler decides which process gets the CPU and when, based on scheduling algorithms (like FCFS, SJF, Round Robin, etc.).


When Is CPU Scheduling Required?

CPU scheduling is required only when the CPU becomes idle and needs to choose the next process to execute.

More specifically, CPU scheduling is needed in the following cases:


1. When a Process Switches from Running to Waiting

Example:

Scheduling needed


2. When a Process Switches from Running to Ready

This happens in preemptive scheduling (like Round Robin or Priority Scheduling).
Example:

Scheduling needed


3. When a Process Switches from Waiting to Ready

Example:

Scheduling may be needed if the CPU is idle or preemption is allowed.


4. When a Process Terminates

Scheduling needed to assign CPU to the next process.


When It’s Not Required:

If only one process is running and no others are ready or waiting, no scheduling is needed.


Summary Table:

Event CPU Scheduling Required?
Running → Waiting Yes
Running → Ready (Preemption) Yes
Waiting → Ready Yes (if CPU idle)
Process Termination Yes
Only one process exists (no competition) No

Why It’s Important (in OS Exams or GATE):


If you’d like, I can give you:

Let me know how you’d like to study this!

Day 02Part 02- Operating System for Computer Science – When we required CPU scheduling

OPERATING SYSTEM Lecture Notes On

CPU Scheduling