GATE - 2000 | OS | Which of the following need not necessarily be saved on a context

GATE - 2000 | OS | Which of the following need not necessarily be saved on a context
Posted on 26-02-2022

GATE - 2000 [Operating System]

Questions:

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

All of the above

  

Solution:

Option (B) is Correct.

We don't need to save TLB or cache to ensure correct program resumption. They are just bonus for ensuring better performance. But PC, stack and registers must be saved as otherwise program cannot resume.

 

Thank You