GATE CS 2024 Set 2 | Question 25
Operating Systems › Introduction & Process Management · MSQ · 1 mark · Answer: A, B
- Question 25Operating Systemsmsq1 markWhich events ALWAYS trigger a context switch moving process P to a non-running state?
- A.P makes a blocking disk read syscall✓
- B.P accesses a page in swap space (page fault)✓
- C.An interrupt from the disk delivering data for another process
- D.A timer interrupt
Answer: A, B
Solution
Answer: (A) and (B) - (A) A blocking syscall puts P into the blocked state and yields the CPU -> always a context switch. - (B) A major page fault (data in swap) blocks P while the page is fetched -> always a context switch. - (C) A disk interrupt for another process does not necessarily move P out of running. - (D) A timer interrupt does not always preempt P (only if the OS decides to reschedule). - A.
More GATE PYQ on Introduction & Process Management
All GATE CS Operating Systems PYQ →Attempt GATE CS 2024 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →