edited by
4,081 views
8 votes
8 votes

Which of the following need not necessarily be saved on a Context Switch between processes?

  1. General purpose registers
  2. Translation look-aside buffer
  3. Program counter
  4. Stack pointer
edited by

2 Answers

Best answer
14 votes
14 votes

Translation look-aside buffer

In a process context switch, the state of the first process must be saved somehow, so that, when the scheduler gets back to the execution of the first process, it can restore this state and continue.The state of the process includes all the registers that the process may be using, especially the program counter, plus any other operating system specific data that may be necessary.A Translation look-aside buffer (TLB) is a CPU cache that memory management hardware uses to improve virtual address translation speed. A TLB has a fixed number of slots that contain page table entries, which map virtual addresses to physical addresses. On a context switch, some TLB entries can become invalid, since the virtual-to-physical mapping is different. The simplest strategy to deal with this is to completely flush the TLB.

Option B is correct.

selected by
0 votes
0 votes

During context switching PC,Stack and register content must be saved to resume the suspended process.There are other overheads generated by a process-switch that are not strictly part of the switch like extra cache-flushes i.e TLB..correct answer is B

Answer:

Related questions

8 votes
8 votes
3 answers
1
go_editor asked Jun 10, 2016
4,693 views
Feedback queuesare very simple to implementdispatch tasks according to execution characteristicsare used to favour real time tasksrequire manual intervention to implement...
34 votes
34 votes
3 answers
2
Kathleen asked Sep 29, 2014
11,072 views
Dirty bit for a page in a page tablehelps avoid unnecessary writes on a paging devicehelps maintain LRU informationallows only read on a pageNone of the above
1 votes
1 votes
1 answer
3
go_editor asked Jun 13, 2016
4,691 views
The page replacement algorithm which gives the lowest page fault rate isLRUFIFOOptimal page replacementSecond chance algorithm
9 votes
9 votes
2 answers
4
go_editor asked Jun 13, 2016
5,893 views
The performance of Round Robin algorithm depends heavily onsize of the processthe I/O bursts of the processthe CPU bursts of the processthe size of the time quantum