Home › GATE CSE › computerscience › Operating Systems › Jobs A (run time 100, arrival 0), B (run time 10…
Jobs A (run time 100, arrival 0), B (run time 10, arrival 0), C (run time 10, arrival 0) under SJF give what average turnaround?
A$60$
B$50$
C$40$
D$70$
Answer & Solution
Correct answer: B. $50$
1. SJF runs jobs in INCREASING run-time order. B (10) and C (10) are shorter than A (100), so they run first.
2. Schedule: B at 0-10, C at 10-20, A at 20-120.
3. Turnaround times:
- B: $10 - 0 = 10$
- C: $20 - 0 = 20$
- A: $120 - 0 = 120$
4. Average: $(10 + 20 + 120)/3 = 150/3 = 50$.
5. Compare to FIFO's 110 — SJF cuts average turnaround by more than half. This is the same example from OSTEP §7.4.
6. Other options come from arithmetic slips or running jobs in wrong order.
_Source: OSTEP Ch 7, §7.4 (SJF example), p. 4-5._
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