ITPEC FE Morning October 2019 Question 18
ITPEC FE Morning October 2019 — Question 18 of 80
FCFS Scheduling — Waiting Time — calculate how long each process waits in the ready queue.
Given four processes under FCFS (First-Come-First-Serve, non-preemptive):
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 6 |
| P2 | 2 | 4 |
| P3 | 4 | 9 |
| P4 | 5 | 7 |
Execution order: P1 → P2 → P3 → P4 (by arrival time)
Step-by-step:
- P1: starts at 0, waiting = 0 - 0 = 0, finishes at 6
- P2: starts at 6, waiting = 6 - 2 = 4, finishes at 10
- P3: starts at 10, waiting = 10 - 4 = 6, finishes at 19
- P4: starts at 19, waiting = 19 - 5 = 14, finishes at 26
Answer: 0, 4, 6, 14 → (b)
Why not others:
- (a) 0, 2, 4, 5 — these are arrival times, not waiting times
- (c) 6, 4, 9, 7 — these are burst times (coincidental match for P1/P2)
- (d) 6, 6, 13, 12 — incorrect calculation; P4 cannot wait less than P3
Key rule: waiting_time = start_time − arrival_time. In FCFS, start_time of process N = finish time of previous process (or its own arrival if CPU is idle).
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.