January 16, 2010
Compute the the average turnaround time of the following process scheduling algorithm.
Arrival Time: 0 1 2 3 4 5 6 7 8 9 10
Job Name:A B C D E F G H I J K
CPU Cycle: 5 2 8 4 3 1 2 9 7 3 4
a. First Come First Come First Serve Algorithm
JOB A | JOB B | JOB C | JOB D | JOB D | JOB E | JOB F | JOB G | JOB H | JOB I | JOB K |
0-5 | 7 | 15 | 19 | 27 | 23 | 25 | 34 | 41 | 44 | 48 |
ATT=(5+7+15+19+22+23+25+34+41+44+48)/11=25.73
b. Shortest Job Next
JOB F | JOB B | JOB G | JOB E | JOB J | JOB D | JOB K | JOB A | JOB I | JOB C | JOB H |
0-1 | 3 | 5 | 8 | 11 | 15 | 19 | 24 | 31 | 39 | 48 |
ATT=(1+3+5+8+11+15+19+24+31+39+48)/11=18.55
c. Shortest Remaining Time
JOB A | JOB B | JOB C | JOB D | JOB F | JOB G | JOB E | JOB H | JOB I | JOB J | JOB A | JOB K |
0-3 | 3 | 4 | 8 | 9 | 11 | 13 | 14 | 15 | 18 | 22 | 26 |
ATT=(22+2+2+5+9+5+40+24+9+16)/11=12.64
JOB A | JOB B | JOB C | JOB D | JOB E | JOB F | JOB G | JOB H | JOB I | JOB J | JOB K | JOB A |
0-2 | 4 | 6 | 8 | 10 | 11 | 13 | 15 | 17 | 19 | 21 | 23 |
JOB J | JOB K | JOB A | JOB C | JOB H | JOB I | JOB C | JOB H | JOB I | JOB H |
|
|
33 | 35 | 36 | 38 | 40 | 42 | 44 | 46 | 47 | 48 |
|
|
No comments:
Post a Comment