CS FundamentalsHardGATE CS (PYQ pattern)
A 16-core machine must unmap a page that all cores have in their TLBs. The initiating core sends an inter-processor interrupt to each of the other 15 cores one after another (1 microsecond each to send) and waits until the last core has acknowledged; each remote core takes 3 microseconds after receiving its interrupt to flush the entry and acknowledge. Handling on the initiator itself takes 2 microseconds and is done before sending. What is the total time until the shootdown completes?
- A. 17 microseconds
- B. 47 microseconds
- C. 62 microseconds
- D. 20 microseconds
Correct answer: D. 20 microseconds
Initiator work: 2 microseconds. The 15 interrupts are sent serially (15 microseconds); the last core's interrupt is delivered at 2 + 15 = 17 and it acknowledges after 3 microseconds: 20 microseconds. Waiting for each ack in turn would be far slower, which is why shootdowns are batched.
More Operating Systems questions
- Two periodic tasks with deadline = period and zero release offset: T1 (C=2, P=5) and T2 (C=4, P=7). Total utilisation is 2/5 + 4/7 ≈…
- Three periodic tasks (deadline = period, all released at t=0) are scheduled by preemptive rate-monotonic scheduling: T1 (C=2, P=5), T2…
- Two processes use shared variables flag[2] (initially 0) and turn. Process i (j = 1−i) runs: V1: flag[i]=1; turn=j; while(flag[j] &&…
- Binary semaphore m is initialised to 1. P1: P(m); print A; V(m); print B. P2: P(m); print C; V(m); print D. P3: P(m); print E; V(m). All…
- Priority-based preemptive scheduling with L (low), M (medium), H (high). L arrives at t=0 and needs 10 units; at t=1 L locks a mutex and…
- A C program runs: int i; for(i=0;i<4;i++){ if(fork()==0 && i%2==0) break; } printf("X"); Every process, including the original, reaches…