0
1.3kviews
Calculate i) Waiting time ii) Turnaround time for Shortest Job First (SJF) and Earliest Deadline First (EDF). Comment on the result. All tasks entered ready queue at same time.
Task Execution time Deadline
T1 06 39
T2 16 30
T3 18 45
1 Answer
0
14views

i) SJF-

Graphical representation based on SJF (Shortest Job First).

Total execution time = 6 + 16 + 18 = 40 sec

Total execution time is less than farthest deadline. Therefore tasks are schedulable.

Waiting time is calculated as follows -

T1 = 0 sec

T2 = 6 sec

T3 = 6 + 16 = 22 sec

Turnaround time (total time for completion) is calculated as follows -

T1 = 6 sec

T2 = 6+16 = 22 sec

T3 = 6+16+18 = 40 sec

ii) EDF:

Graphical representation based on EDF (Earliest Deadline First).

Total execution time = 6 + 16 + 18 = 40 sec

Total execution time is less than farthest deadline. Therefore tasks are schedulable.

Waiting time is calculated as follows -

T1 =(Execution time of T2)= 16 sec

T2 = 0 sec

T3 = (Execution time of T2 + T1) = 6 + 16 = 22 sec

Turnaround time (total time for completion) is calculated as follows -

T1 = 6 + 16 = 22 sec

T2 = 16 sec

T3 = 6+16+18 = 40 sec

Please log in to add an answer.