"Understanding Preemptive and Non-Preemptive Scheduling in Operating System"

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

[Audio] “Understanding Preemptive and Non-Preemptive Scheduling in Operating System”.

Scene 2 (7s)

[Audio] Preemptive Scheduling Preemptive scheduling is used when a process switches from the running state to the ready state or from the waiting state to the ready state. The resources (mainly CPU cycles) are allocated to the process for a limited amount of time and then taken away, and the process is again placed back in the ready queue if that process still has CPU burst time remaining. That process stays in the ready queue till it gets its next chance to execute..

Scene 3 (38s)

Preemptive Scheduling. [image] Process p2 Arrival Time CPU Burst Time (in millisec.) 11 16 Preemptive Scheduling.

Scene 4 (45s)

[Audio] Advantages: · Utilizing this method in a multi-programming environment is more advantageous. · The operating system makes sure that every process using the CPU is using the same amount of CPU time. · The average response time is improved. Disadvantages: · Limited computational resources must be used. · Suspending the running process, change the context, and dispatch the new incoming process all take more time. · The low-priority process would have to wait if multiple high-priority processes arrived at the same time..

Scene 5 (1m 27s)

[Audio] Non-Preemptive Scheduling Non-preemptive Scheduling is used when a process terminates, or a process switches from running to the waiting state. In this scheduling, once the resources (CPU cycles) are allocated to a process, the process holds the CPU till it gets terminated or reaches a waiting state. In the case of non-preemptive scheduling does not interrupt a process running CPU in the middle of the execution. Instead, it waits till the process completes its CPU burst time, and then it can allocate the CPU to another process..

Scene 6 (2m 7s)

[Audio] Non-Preemptive Scheduling. Non-Preemptive Scheduling.

Scene 7 (2m 15s)

[Audio] Advantages: · It has a minimal scheduling burden. · It is a very easy procedure. · Less computational resources are used. · It has a high throughput rate. Disadvantages: · Its response time to the process is super. · Bugs can cause a computer to freeze up..

Scene 8 (2m 40s)

[Audio] Key Differences Between Preemptive and Non-Preemptive Scheduling 1. In preemptive scheduling, the CPU is allocated to the processes for a limited time whereas, in Non-preemptive scheduling, the CPU is allocated to the process till it terminates or switches to the waiting state. 2. The executing process in preemptive scheduling is interrupted in the middle of execution when a higher priority one comes whereas, the executing process in non-preemptive scheduling is not interrupted in the middle of execution and waits till its execution. 3. In Preemptive Scheduling, there is the overhead of switching the process from the ready state to the running state, vise-verse, and maintaining the ready queue. Whereas in the case of non-preemptive scheduling has no overhead of switching the process from running state to ready state..

Scene 9 (3m 38s)

[image] Preemptive Scheduling v Non-Preemptive Scheduling.

Scene 10 (3m 45s)

[Audio] Comparison Chart Parameter PREEMPTIVE SCHEDULING NON-PREEMPTIVE SCHEDULING Basic In this resources(CPU Cycle) are allocated to a process for a limited time. Once resources(CPU Cycle) are allocated to a process, the process holds it till it completes its burst time or switches to waiting state..

Scene 11 (4m 8s)

[Audio] Interrupt Process can be interrupted in between. Process can not be interrupted until it terminates itself or its time is up. Starvation If a process having high priority frequently arrives in the ready queue, a low priority process may starve. If a process with a long burst time is running CPU, then later coming process with less CPU burst time may starve..

Scene 12 (4m 36s)

[Audio] Overhead It has overheads of scheduling the processes. It does not have overheads. Flexibility Flexible rigid Cost Cost associated Not cost associated.