ob 1: arrives at time 0 and needs 500 milliseconds to complete.
Job 2: arrives at time 300 milliseconds and needs 400 milliseconds to complete.
Job 3: arrives at time 400 milliseconds and needs 200 milliseconds to complete.
Job 4: arrives at time 400 milliseconds and needs 500 milliseconds to complete.
a) Fill the out timeline table and calculate the waiting time. Each box is 100 ms in duration. Enter (W)ait or (R)unning.
Time(ms) |
0 |
100 |
200 |
300 |
400 |
500 |
600 |
700 |
800 |
900 |
1000 |
1100 |
1200 |
1300 |
1400 |
1500 |
J1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
J2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
J3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
J4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
W = Wait State
R = Running State
Job 1 500 milliseconds to complete _________milliseconds waiting
Job 2 400 milliseconds to complete _________milliseconds waiting
Job 3 200 milliseconds to complete _________milliseconds waiting
Job 4 500 milliseconds to complete _________milliseconds waiting
b) Calculate the average wait time. (Hint: average the number milliseconds each job was in a wait state)
c) Calculate the average turn-around-time (Hint: for each job, count the number of miliseconds from arrival to completion and average)