• edited by
6,472 views
8 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

3 Answers

Best answer
18 18 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 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

0 0 votes

ANS (B) Translation look-aside buffer

Because, TLB is just the cache not the process state.
Hence, Cache can be flushed or rebuilt.

Let's quickly see other options too,

A - General Purpose Registers stores the CPU state

C - Program Counter stores the next instruction 

D - Stack Pointer stores the return order of function call

 

Answer:
Position:
Show:

Related questions

11 11 votes
3 answers 3 answers
6.2k
6.2k views
go_editor asked Jun 10, 2016
6,208 views
Feedback queuesare very simple to implementdispatch tasks according to execution characteristicsare used to favour real time tasksrequire manual intervention to implement...
1 1 vote
1 answers 1 answer
5.8k
5.8k views
go_editor asked Jun 13, 2016
5,803 views
The page replacement algorithm which gives the lowest page fault rate isLRUFIFOOptimal page replacementSecond chance algorithm
9 9 votes
2 answers 2 answers
7.1k
7.1k views
go_editor asked Jun 13, 2016
7,103 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
4 4 votes
1 answers 1 answer
3.9k
3.9k views
go_editor asked Jun 12, 2016
3,928 views
Consider a logical address space of 8 pages of 1024 words mapped into memory of 32 frames. How many bits are there in the logical address?13 bits15 bits14 bits12 bits