Question: Consider a system with two running processes where we do not know what their CPU bursts will look like in advance. Since we do not
Consider a system with two running processes where we do not know what their CPU bursts will look like in advance. Since we do not know the bursts in advance, we must use a live algorithm: Shortest Job First Live (SJFL). In SJFL, we compute an estimated burst time (written
) based on the previous real burst time (written t) and a previous
. The formula is :
n + 1 = t n + ( 1 ) n. That is, for the
in some time-step (aka tick) n+1 , we take the sum of tau from the previous tick multiplied by a constant and the actual run-time in that tick. Given that we have a set of
values that correspond to how long we think a process will want to run, we can run SJF on the estimates to decide in what order to run the processes prior to knowing their exact burst length. (Note that ticks do not represent time! They represent some like a round where each process gets to run its next burst.)
Assume we are modeling a system with two processes: Process 0:
0 = 10 , = .5 Process 1:
0 = 10 , = .5
The data for the two processes has been entered into the table below. Note that tau has already been filled into the table, as well as the first two rows. Complete the rest of the table to determine the order within each time-step that the scheduler would execute the two processes:
| Tick | P0: ![]() | P0: t | P1: ![]() | P1: t | SJF Order | SJFL Order | SJFL WT | SJFL TT |
| 0 | 10 | 6 | 10 | 13 | P0, P1 | P0, P1 | 0+6=6 | 6+19=25 |
| 1 | 8 | 4 | 11.5 | 13 | P0, P1 | P0, P1 | 0+4=4 | 4+17=21 |
| 2 | 6 | 13 | ||||||
| 3 | 4 | 13 | ||||||
| 4 | 13 | 6 | ||||||
| 5 | 13 | 4 | ||||||
| 6 | 13 | 6 | ||||||
| 7 | 13 | 4 | ||||||
| Totals: |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts


