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)
    All of the above
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted 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 of saving the contents of TLB as it is invalidated after each context switch. So, option (B) is correct
Free Test
Community Answer
Which of the following need not necessarily be saved on a context swit...
Explanation:

Context Switch:
A context switch refers to the process of saving the current state of a process and restoring the saved state of another process. This is necessary for multitasking operating systems, where multiple processes are executed concurrently. During a context switch, the operating system saves the state of the currently running process and loads the saved state of another process.

Contents saved on a context switch:
When a context switch occurs, certain contents need to be saved and restored to ensure that the process can resume execution correctly. These contents include:

1. General Purpose Registers:
General purpose registers (GPRs) are registers used by the processor to hold temporary data, operands, and addresses during program execution. These registers need to be saved and restored during a context switch to ensure that the values stored in them are preserved. If the values were not saved, the process would lose its current state and may not be able to resume execution correctly.

2. Translation Look-Aside Buffer (TLB):
The Translation Look-Aside Buffer (TLB) is a cache used to accelerate virtual address translation. It stores the mappings between virtual addresses and physical addresses. The TLB is specific to each process and contains entries for the virtual pages currently in use by the process. Since the TLB is specific to a process, it does not need to be saved on a context switch. When a context switch occurs, the TLB entries are invalidated, and the TLB is reloaded with the mappings for the new process.

3. Program Counter (PC):
The Program Counter (PC) is a special register that holds the memory address of the next instruction to be executed. The value of the PC needs to be saved and restored during a context switch to ensure that the process can resume execution from the correct instruction.

Conclusion:
Among the given options, the Translation Look-Aside Buffer (TLB) is the only content that need not necessarily be saved on a context switch between processes. The TLB is specific to each process and is invalidated and reloaded with new mappings when a context switch occurs. The General Purpose Registers (GPRs) and Program Counter (PC) are essential for preserving the state of a process and are saved and restored during a context switch.
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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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)All of the aboveCorrect 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