9,636 views
2 votes
2 votes
Consider a Shortest Job First (SJF) CPU scheduler, with the following process workload:

Process Arrival Time CPU Burst
P1 t 5
P2 t+6 7
P3 t+10 5
P4 t+2 3
P5 t+8 9
P6 t+4 1
Assume that the CPU is free and no other processes exist in the ready queue when P1 enters the ready queue at time t. Determine the schedule of process execution and compute the wait times for each of the above six processes. Which of the following is a TRUE statement about the average wait time and the maximum wait time for the six processes?
A. The average wait time is between 5.0 and 5.5 time units; the maximum wait time is between 11 and 12 time units.
B. The average wait time is between 3.5 and 4.0 time units; the maximum wait time is between 11 and 12 time units.
C. The average wait time is between 4.0 and 4.5 time units; the maximum wait time is between 12 and 13 time units.
D. The average wait time is between 4.0 and 4.5 time units; the maximum wait time is between 11 and 12 time units.

User Roman Nurik
by
3.3k points

1 Answer

2 votes
2 votes

Answer:

Shortest Job First (SJF) CPU scheduler:- Process Arrival Time CPU Burst P1 t 5 P2 t+6 7 P3 t+10 5 P4 t+2 3 P5 t+8 9 P6 t+4 1 Since we have to deal with the Waiting time therefore we will assume t=0, so that to make our calculations easier.

User Nicky Smits
by
3.9k points