homework-3 Version 0 |
|
👤 Author: by vanjiazenggmailcom 2019-09-20 02:01:00 |
First-Come,First-Served Scheduling:
Process Burst Time
P1 11
P2 2
P3 2
P4 1
P5 5
average waiting time = (0+11+13+15+16)/5 = 11milliseconds
Shortest-Job-First Scheduling:
Process Burst Time
P1 11
P2 2
P3 2
P4 1
P5 5
average waiting time = (0+1+3+5+10)/5 = 3.8 milliseconds
Shortest-Remaining-Time-First Scheduling:
Process Arrival Time Burst Time
P1 0 11
P2 4 2
P3 6 2
P4 7 1
P5 3 5
The average waiting time is (13-3+9-4+4-4+8-7+7-7)/5 = 3.2 milliseconds
Priority Scheduling:
Process Burst Time Priority
P1 11 3
P2 2 1
P3 2 3
P4 1 4
P5 5 2
average waiting time = (2+7+18+20+0)/4 = 9.4 milliseconds
Round-Robin Scheduling:
Process Burst Time
P1 11
P2 2
P3 2
P4 1
P5 5
Use a time quantum of 4 milliseconds,
The average waiting time is (4+6+8+18-5+21-10)/5 = 8.2 milliseconds