CS FundamentalsVery hardGATE CS
Two periodic tasks: T1 (execution 2, period 5) and T2 (execution 4, period 7), deadlines equal to periods. Which statement is correct?
- A. Both EDF and rate-monotonic meet all deadlines
- B. Neither can, because utilisation exceeds 1
- C. EDF meets all deadlines, but rate-monotonic misses one of T2's deadlines
- D. Rate-monotonic meets all deadlines but EDF does not
Correct answer: C. EDF meets all deadlines, but rate-monotonic misses one of T2's deadlines
U = 2/5 + 4/7 ≈ 0.971 ≤ 1, so EDF succeeds. Under RM, T1 has priority: T1 runs 0–2, T2 2–5, T1 5–7 (preempting T2), so T2 gets only 3 units before its deadline 7 and misses it.
More Operating Systems questions
- Priority inversion: low-priority L holds a mutex needed by high-priority H, and medium-priority M (which does not need the mutex) keeps…
- Which property distinguishes a mutex from a binary semaphore in most implementations?
- A spinlock is held for about 50 ns on average, and a context switch costs about 5 µs. On a multicore machine, which is better for a thread…
- compareandswap(&v, expected, new) atomically sets v = new only if v == expected and returns the old value. A lock-free increment is…
- Which condition makes disabling interrupts an INSUFFICIENT way to implement a critical section?
- Two threads run on different cores. Thread 1: data = 42; ready = 1; Thread 2: while (!ready); print(data); Both variables are plain…