homework-3 Version 0 |
|
👤 Author: by theliyunzealiyuncom 2019-12-05 02:55:11 |
Q:design your example and give computation results of several cpu schedulers
A:
P1:7 P2:3 P3:6 P4:2 P5:9
FCFS:
order: P(1, 2, 3, 4, 5)
average waiting time = (7 + 10 + 16+ 18) / 5 = 10.2
SJF:
order: P(4, 2, 3, 1, 5)
average waiting time = (2 + 5 + 11 + 18) / 5 = 6.4
PSA:
given priority P1:4 P2:1 P3:2 P4:3 P5:5
order: P(2, 3, 4, 1, 5)
average waiting time = (3 + 9 + 11 + 18) / 5 = 8.2