Which of the following need not necessarily be saved on a context switch between processes?
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.
Answer is B).
TLS buffer need not be saved as it will flush out the contents of the switched process and will have the new process contents.
Stack pointer is saved as switched process might have called a procedure and the suddenly, it was switched.
General purpose registor have contents of ALU data to be computed and hence should be saved.
Program counter , no doubt is neccessary to be saved to keep the progress of the program
Answer with explanation : https://gateoverflow.in/9274/context-switching