Video summary

3.2 Preemptive and Non-preemptive scheduling, scheduling criteria | MSBTE K scheme OSY | 315319

Main summary

Key takeaways

Educational

Preemptive and Non-Preemptive CPU Scheduling

Preemptive scheduling

The operating system can interrupt a process that is currently using the CPU and assign the CPU to another process. For example, if a higher-priority process enters the ready queue, the running process may be paused and returned to the ready queue so the higher-priority process can run.

The video compares this to receiving a phone call while playing a game: the call interrupts the activity.

Round-robin scheduling is a common preemptive approach. Priority scheduling and shortest-job scheduling may also have preemptive forms.

Non-preemptive scheduling

Once a process gets the CPU, it is not forcibly removed just because another process arrives—even if the new process has higher priority. The process generally keeps the CPU until it finishes or gives it up, such as when it waits for an event or I/O.

The video compares this to enabling “Do Not Disturb” while giving an online lecture: interruptions are deferred.

Non-preemptive scheduling avoids interrupting a running process, but it does not by itself guarantee that race conditions cannot occur.

Scheduling Criteria

These criteria are used to evaluate and compare scheduling algorithms:

  • CPU utilization: The proportion of time the CPU is busy rather than idle. Scheduling generally aims to keep utilization high; the achievable level varies by system and workload.
  • Throughput: The number of processes completed per unit of time. Higher throughput means more processes finish in a given period.
  • Turnaround time: The total time from a process’s arrival or submission until its completion. Turnaround time = Completion time − Arrival time

  • Waiting time: The total time a process spends waiting in the ready queue. Waiting time = Turnaround time − CPU burst time

  • Response time: The time from a process’s arrival until it first receives CPU service or the system first responds to it.

  • Fairness and starvation: Fairness concerns whether processes receive reasonable opportunities to run. Starvation occurs when a process waits indefinitely or for an excessively long time because other processes keep being selected.

Turnaround time and waiting time are especially important in scheduling problems, where students may be asked to calculate their averages.

Speaker and Source

  • Speaker: An instructor or narrator explaining operating-system scheduling.
  • Source/channel: ALU FOUNDATION.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video