ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > >
homework-3 Version 0
👤 Author: by 992632427qqcom 2019-09-26 02:07:02
 







































process burst time arrival time priority
P1 9 0 5
P2 3 1 1
P3 5 6 4
P4 1 4 3
P5 4 3 2

 

1.FCFS










P1 P2 P3 P4 P5

0                    9       12          17  18    22

The waiting time is (0+9+12+17+18)/5=11.2ms

 

  1. SJF


Preemptive(shortest-job-first scheduling):










P4 P2 P5 P3 P1

0   1     4       8        13                        22

 

The waiting time is (0+1+4+8+13)/5=5.2ms

 

Preemptive(shortest-remaining-time-first scheduling):











P1 P2 P5 P4 P3 P1

0   1     4      8   9        14                    22

 

The waiting time is [0+0+(4-3)+(8-4)+(9-6)+(14-1)]/5=4.2ms

 

3.priority scheduling










P2 P5 P4 P3 P1

0     3       7    8         13                      22

 

The waiting time is (0+3+7+8+13)/5=5.2ms

 

4.Round-Robin

 














P1 P2 P3 P4 P5 P3 P5 P1 P1

0     3      6      9   10    13   15   16     19     22

 

The waiting time is (0+3+6+9+10+13+15+16+19)/5=18.2ms

 

Please login to reply. Login

Reversion History

Loading...
No reversions found.