ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2017329621062 蓝傅晓阳 >
homework-3 Version 0
👤 Author: by 1054089618qqcom 2019-09-24 15:30:01
1、First-Come,First-Served Scheduling



Process  Burst Time

P1                  6

P2                 4

P3                 7

P4                 2

P5                 3










P1 P2 P3 P4 P5

0                                6                                  10                                   17                                   19                          22



Average waiting time = (0+6+10+17+19)/5=10.4 milliseconds





2、Shortest-Job-First Scheduling



Process  Burst Time

P1                  6

P2                 4

P3                 7

P4                 2

P5                 3










P4 P5 P2 P1 P3

0                               2                                     5                                  9                                  15                           22



Average waiting time = (0+2+5+9+15)/5=6.2 milliseconds





3、Shortest-Remaining-Time-First Scheduling



Process  Burst Time  Arrival Time

P1                  6                      0

P2                 4                       1

P3                 7                       3

P4                 2                       6

P5                 3                        7












P1 P2 P1 P4 P5 P1 P3

0                1                  5                     6                             8                        11                                 15                            22

Average waiting time = (9+0+12+0+1)/5 = 4.4 milliseconds





4、Priority Scheduling



Process  Burst Time  Priority

P1                 6                 2

P2                 4                 1

P3                 7                 3

P4                 2                 3

P5                 3                 4










P2 P1 P3 P4 P5

0                   4                  10                      17                               19                          22



Average waiting time = (4+0+10+17+19)/5 = 10 milliseconds





5、Round-Robin Scheduling



Process  Burst Time

P1                  6

P2                 4

P3                  7

P4                  2

P5                  3



Use a time quantum of 2 milliseconds
















P1 P2 P3 P4 P5 P1 P2 P3 P5 P1 P3

0               2              4               6               8               10              12             14             16                17                    19              22



Average waiting time = (13+10+15+6+14)/5 = 11.6 milliseconds

 

 

 

Please login to reply. Login

Reversion History

Loading...
No reversions found.