GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 57

GATE CSE 2015 Set 3 Q57

Operating Systems · CPU Scheduling · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q57 2 marks · MCQ
Report issue

CPU Scheduling

Question 57, GATE 2015: Processes have (arrival time, processing time): A=(0,3), B=(1,6), C=(4,4), D=(6,2). Which scheduling scheme yields the lowest average turnaround time? Options: (A) first come first serve; (B) non-preemptive shortest job first; (C) shortest remaining time; (D) round robin with quantum 2. Turnaround time is completion minus arrival.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (4 schedules)

1. Shortest remaining time runs A0–3, B3–4, C4–8, D8–10 and B10–15 (the C/D tie at 6 can be resolved either way without changing total turnaround).

2. Completion-minus-arrival times are 3, 14, 4, 4, mean 6.25. FCFS gives 3, 8, 9, 9, mean 7.25; nonpreemptive SJF gives 3, 8, 11, 5, mean 6.75. Round-robin quantum 2 gives a larger mean (8.25 under arrivals-before-requeue at equal times). Hence C.

Original paper, page 75 · Answer key