written 5.9 years ago by | modified 4.7 years ago by |
- FCFS
- RR
- Multilevel Feedback Queries
written 5.9 years ago by | modified 4.7 years ago by |
written 5.7 years ago by |
1. First come first serve scheduling (FCFS).
In this algorithm the process that requires the CPU first is allotted the CPU first and its implementation can be easily maintained using FIFO queue.
When a CPU is free, the process is allotted CPU and it will continue holding CPU fill it is terminated or requests I/O devices. So process waiting for CPU will have to wait for its execution.
Thus waiting time is large if a larger process executes before a shorter process.
Thus we can say, FCFS discriminates against short job since any short job arriving after long job will have a longer waiting time.
2. Round rotrin scheduling.
This algorithm is designed for time sharing system.
A small unit of time called time quantum or time slice is defined and each process is switched in and out of CPU depending on this time quantum value.
The time quantum is generally from 10 ms to 100 ms in length.
Here a process is not allotted CPU more than 1 time quantum.
The performance of RR algorithm depends heavily on the size of time quantum, if time quantum Is very long time RR policy behave same as FCFS and if the time quantum is very small (say 1, ms) then RR approach is called as processor sharing and creates the appearance that each process has its own processor running at 1/n the speed of real processor.
We can say that, RR – treats all job equally ( given them equal burst time of CPU) so short jb will be able to leave the system faster since they will finish first.
3. Multilevel feedback queries.
It allow the process to move between queues, the idea is to separate processes according to its characteristics of its burst time.
If the process uses too much CPU time it will be moved to lower priority queue due to this scheme all I/O bounded and inter ache process are in higher priority queue.
In addition, to this a process which wait too long in a lower priority queue may be moved to a higher priority queue and this form of aging prevents saturation.
Thus we can say, multilevel feedback queues work similar to the RR algorithm so they discriminates favorably towards short job.