Home › GATE CSE › computerscience › Operating Systems › Three processes arrive at t=0 with bursts 24, 3,…
Three processes arrive at t=0 with bursts 24, 3, 3. The average waiting time under SJF is
A17
B10
C3
D0
Answer & Solution
Correct answer: C. 3
SJF picks shortest first: P2 (3), then P3 (3), then P1 (24). Waiting times: P2=0, P3=3, P1=6. Average = (0+3+6)/3 = 3. Under FCFS the average would be 17 (P1 first, P2 waits 24, P3 waits 27). Same total CPU time; SJF orders to minimise average waiting.
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