OS Process Scheduling Q & A #6



Question: Shown below is the workload for 5 jobs arriving at time zero in the order given below −

JobBurst Time
110
229
33
47
412

Now find out which algorithm among FCFS, SJF And Round Robin with quantum 10, would give the minimum average time.

Answer: For FCFS, the jobs will be executed as:

FCFS jobs
JobWaiting Time
10
210
339
442
549
 140

The average waiting time is 140/5=28.

For SJF (non-preemptive), the jobs will be executed as:

SJF jobs
JobWaiting Time
110
232
30
43
520
 65

The average waiting time is 65/5=13.

For Round Robin, the jobs will be executed as:

Round Robin jobs
JobWaiting Time
10
232
320
423
540
 115

The average waiting time is 115/5=23.

Thus SJF gives the minimum average waiting time.

os_exams_questions_answers.htm
Advertisements