Which of the following need not necessarily be saved on a Context Switch…
2008
Which of the following need not necessarily be saved on a Context Switch between processes?
- A.
General purpose registers
- B.
Translation look-aside buffer
- C.
Program counter
- D.
Stack pointer
Attempted by 476 students.
Show answer & explanation
Correct answer: B
During a context switch, the operating system saves essential CPU state information such as general-purpose registers, program counter, and stack pointer into the Process Control Block (PCB) to ensure accurate resumption. However, the Translation Look-aside Buffer (TLB) is a hardware cache used for virtual-to-physical address translation. When switching between processes with different address spaces, the TLB entries are typically flushed rather than saved and restored. Therefore, the TLB does not need to be explicitly saved during a context switch.