Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Which of the following need not necessarily b... Start Learning for Free
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
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Which of the following need not necessarily be saved on a Context Swit...
The values stored in registers, stack pointers and program counters are saved on context switch between the processes so as to resume the execution of the process. There's no need for saving the contents of TLB as it is being invalid after each context switch. So, option (B) is correct
View all questions of this test
Most Upvoted Answer
Which of the following need not necessarily be saved on a Context Swit...
Context Switch between Processes

A context switch is the process of saving the current state of a running process and restoring the state of a different process to allow it to run. This allows the operating system to efficiently share the CPU among multiple processes. During a context switch, certain data needs to be saved and restored to ensure that the process can resume execution correctly. However, not all data needs to be saved on a context switch.

What Needs to be Saved?

During a context switch, the following data typically needs to be saved and restored:

1. General Purpose Registers: General purpose registers are used by the CPU to store temporary data and function parameters. These registers need to be saved and restored so that the process can resume execution without losing its current state.

2. Program Counter: The program counter (PC) keeps track of the address of the next instruction to be executed. Saving and restoring the program counter ensures that the process can continue executing from where it left off.

3. Stack Pointer: The stack pointer (SP) points to the top of the stack, which is used for storing local variables and function call information. Saving and restoring the stack pointer is necessary to maintain the integrity of the process's stack.

What Does Not Need to be Saved?

The Translation Look-aside Buffer (TLB) does not necessarily need to be saved on a context switch between processes. The TLB is a cache used by the CPU to store recently accessed virtual-to-physical address translations. It is specific to a single process and is not shared among processes. Therefore, there is no need to save and restore the TLB during a context switch because it will be invalidated and rebuilt for the new process.

In Conclusion

During a context switch between processes, certain data needs to be saved and restored to ensure the correct execution of the processes. This includes general purpose registers, the program counter, and the stack pointer. However, the translation look-aside buffer (TLB) does not need to be saved and restored as it is specific to a single process and will be invalidated and rebuilt for the new process.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer?
Question Description
Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer?.
Solutions for Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer?, a detailed solution for Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following need not necessarily be saved on a Context Switch between processes?a)General purpose registersb)Translation look-aside bufferc)Program counterd)Stack pointerCorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev