Home › GATE CSE › computerscience › Operating Systems › Under the FIRST-IN, FIRST-OUT (FIFO) scheduling …
Under the FIRST-IN, FIRST-OUT (FIFO) scheduling policy (also called FCFS), three jobs A, B, C arrive at $t=0$ with run times $100, 10, 10$ respectively. What is the AVERAGE TURNAROUND TIME?
A$40\,\text{ms}$
B$70\,\text{ms}$
C$110\,\text{ms}$
D$120\,\text{ms}$
Answer & Solution
Correct answer: C. $110\,\text{ms}$
1. FIFO runs jobs in arrival order. A first (finishes at $t=100$), then B (at $t=110$), then C (at $t=120$).
2. Turnaround time = completion - arrival.
- A: $100 - 0 = 100$
- B: $110 - 0 = 110$
- C: $120 - 0 = 120$
3. Average: $(100 + 110 + 120)/3 = 330/3 = 110\,\text{ms}$.
4. This is the CONVOY EFFECT: long job A holds up shorter jobs B and C. OSTEP §7.3 explicitly works this example.
5. Option A is wrong arithmetic. Option B drops one job. Option D is just C's turnaround.
_Source: OSTEP Ch 7 "Scheduling: Introduction", §7.3 (FIFO) — convoy effect example, p. 2-3._
Related questions
On a MULTI-CORE system, a SPIN LOCK is generallyDisabling INTERRUPTS as a way to implement mutual exclusion on a single-CPU system isA LIVELOCK differs from a DEADLOCK in thatSuppose thread A acquires lock L1, then thread B acquires lock L2. Now A tries to acquire Without atomic hardware support, building a correct mutual-exclusion lock for $N \geq 2$ tA CRITICAL SECTION isLinux's `pthread_mutex_lock()` is typically implemented as a HYBRID:What is the PRIMARY problem with using a SPIN LOCK on a SINGLE-CPU uniprocessor system (wi