GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 2.12

What a context switch does not normally require

Operating Systems · Processes, Threads & System Calls · Full GATE CSE 1999 paper

GATE 1999, Q2.12 2 marks · MSQ
Report issue

Processes, Threads & System Calls

Question 2.12, GATE 1999: Which is typically NOT performed when switching A to B: save/restore registers,change translation tables,swap A’s entire memory image to disk,invalidate TLB?
Tap to enlarge
Select all that apply
Answer & solution

Answer: C (no official key was published)

A context switch preserves A’s architectural state and restores B’s registers. It also selects B’s address-translation context. In a conventional untagged TLB, old translations must be invalidated to avoid interpreting B’s addresses through A’s mappings. None of this requires writing all of A’s memory to disk: both processes can remain resident. Therefore C is the operation not normally required. Tagged TLBs may avoid full invalidation, but that architectural optimization is distinct from whole-process swapping and does not turn every switch into a disk transfer.

Original paper, page 4