Page 88 - DCAP403_Operating System
P. 88
Unit 5: Scheduling
2. What is the turnaround time for process p ? Notes
3
3. What is the average wait time for the processes?
Solution:
1. As the Round-Robin Scheduling follows a circular queue implementation, the Gantt chart
is as follows:
2. The turnaround time for process P is =160-80
3
= 80 sec.
3. Average waiting time:
Waiting time for process p = 0 sec.
0
Waiting time for process p = 5 sec.
1
Waiting time for process p = 20 sec.
2
Waiting time for process p = 30 sec.
3
Waiting time for process p = 40 sec.
4
Therefore, the average waiting time is (0+5+20+30+40)/5 = 22 sec.
5.3.6 Multilevel Feedback Queue Scheduling
In this CPU schedule a process is allowed to move between queues. If a process uses too much
CPU time, it will be moved to a lower priority queue. This scheme leaves I/O bound and
interactive processes in the higher priority queues. Similarly a process that waits too long in a
lower priority queue may be moved to a higher priority queue.
Figure 5.6: Multi-level Feedback Queue Scheduling
LOVELY PROFESSIONAL UNIVERSITY 81