WHAT'S NEW?
Loading...

Define Scheduling and types of scheduling? Also discuss following scheduling policies and their Working in operating system - Tech-n-Savvy Blogger


The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy.

a. Shortest remaining time (SRT) scheduling

shortest remaining time scheduling is the preemptive counter part of SJF and is useful in time sharing system. In SRT, process with the smallest estimated run time to completion is run next, in SJF once a job begin executing, it runs to completion. In SRT a running process may be preempted by a user process with a shorter estimated run time.
Consider an example, where three processes arrived in the order P1, P2, P3 at the time mentioned below, and then the average waiting time using SJF scheduling algorithm will be calculated as:


SRT Process

b. Round Robin scheduling


Round Robin is a CPU scheduling algorithm where each process is assigned a fixed time slot in a cyclic way.
·        It is simple, easy to implement, and starvation-free as all processes get fair share of CPU.
·        One of the most commonly used technique in CPU scheduling as a core.
·        It is preemptive as processes are assigned CPU only for a fixed slice of time at most.
·        The disadvantage of it is more overhead of context switching.
Illustration:

Round robin

c. MFQ Scheduling

Multilevel feedback queue-scheduling algorithm allows a process to move between queues. It uses many ready queues and associate a different priority with each queue.
The Algorithm chooses to process with highest priority from the occupied queue and run that process either preemptively or un-preemptively. If the process uses too much CPU time it will moved to a lower-priority queue. Similarly, a process that wait too long in the lower-priority queue may be moved to a higher-priority queue may be moved to a highest-priority queue. Note that this form of aging prevents starvation.

0 comments:

Post a Comment