GATE / CS ARCHIVE

GATE CSE 2006 / QUESTION 65

CPU idle fraction with overlapped I/O

Operating Systems · CPU Scheduling · Full GATE CSE 2006 paper

GATE 2006, Q65 2 marks · MCQ
Report issue

CPU Scheduling

Question 65, GATE 2006: Three processes arrive at time zero with total activity durations 10,20,30. Each spends its first 20% in I/O, next 70% computing, and last 10% in I/O. I/O overlaps as much as possible. The CPU chooses the shortest remaining compute burst when its current process blocks or completes its burst. What percentage of the entire elapsed interval is CPU-idle?
Options:
(A) 0%
(B) 10.6%
(C) 30.0%
(D) 89.4%
Question 65, GATE 2006: Three processes arrive at time zero with total activity durations 10,20,30. Each spends its first 20% in I/O, next 70% computing, and last 10% in I/O. I/O overlaps as much as possible. The CPU chooses the shortest remaining compute burst when its current process blocks or completes its burst. What percentage of the entire elapsed interval is CPU-idle?
Options:
(A) 0%
(B) 10.6%
(C) 30.0%
(D) 89.4%
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. The three initial I/O bursts last 2,4,6; compute bursts last 7,14,21; final I/O bursts last 1,2,3. CPU is idle 0–2, executes process 1 during 2–9, process 2 during 9–23, and process 3 during 23–44.

2. Their final I/O finishes at 10,25,47. Over the complete 47-unit elapsed interval, CPU idle time is 2+3=5, hence 100×5/47≈10.6%, B.

3. The question continues on physical page 10.

4. Teaching check: The initial I/O phases overlap, so their elapsed cost is not 2+4+6 in series. While the first process computes, the other initial I/Os finish. The final three-unit I/O of the last process extends the completion horizon beyond the final CPU burst, producing additional CPU-idle time.

Original paper, page 9