Homework-3 Version 0 |
|
👤 Author: by 390645143qqcom 2019-09-26 00:17:42 |
design your example and give computation results of several cpu schedulers
Process P1 P2 P3 P4 P5
Burst Time 7 5 3 10 6
for FCFS:the average waiting time is: (0+7+12+15+25)/5=11.8
for Shortest-job-First:the average waiting time is : (0+3+8+14+21)/5=9.2
then let us add arrival time for each process like:
Process P1 P2 P3 P4 P5
Burst Time 7 5 3 0 6
Arrival Time 1 5 0 14 10
then for Shortest-job-First algorithm the average waiting time is: (0+3+10+15+21)/5=9.8
and for Priority Scheduling we add priorities for each processes:
Process P1 P2 P3 P4 P5
Burst Time 7 5 3 10 6
Priority 1 5 2 3 4
the average waiting time is : (0+7+10+20+26)/5=12.6
and add the same arrival time
Process P1 P2 P3 P4 P5
Burst Time 7 5 3 0 6
Arrival Time 1 5 0 14 10
Priority 1 5 2 3 4
the average waiting time is : (1-1 + 26-5 + 8-1 + 0 + 24-14)/5=7.6
finally for Round-Robin Scheduling,we distribute time as a time quantum of 4 milliseconds,
the average waiting time is :67/5=13.4