811 views
0 0 votes

when execution of one process is completed and other process is scheduled , Is it called Context switch ?

I think , It is not Context switch, as according to wiki

In computing, a context switch is the process of storing the state of a process or of a thread, so that it can be restored and execution resumed from the same point later. This allows multiple processes to share a single CPU, and is an essential feature of a multitasking operating system.

As we are not storing results od earlier process for later execution. If there are any results produced by some operation within process or program , It is responsibility of program (or process when it running) to store them back.

For example : when C program to add two number gets converted to Assembly language code , It also has instruction to store result of addition back into memory.

Hence answer to this previous year gate question must be 0

http://gateoverflow.in/885/gate2006-06-isro2009-14 

1 Answer

0 0 votes
The answer to your question is yes. It is not like the regular context switch where the state of the process will be saved as here there is no need to save the state of the completed process. The new process state has to be loaded though. Hence, it is still a context switch.

The system might save the state of the terminated/completed process too and later decide to discard it. However, that depends on the implementation.
Position:
Show:

Related questions

8 8 votes
3 3 answers
4.5k
4.5k views
_jerry asked Jan 26, 2018
4,477 views
S1: Context Switching occurs only in kernel mode. :TRUES2: Context Switching in user mode is faster as compared to context switching in kernel mode. : TRUEIf Context Swit...
1 1 vote
1 1 answer
257
257 views
GO Classes asked Jul 17
257 views
Which of the following statements about context switching are correct?When switching between two threads, the registers, stack pointer, and program counter of the outgoin...
2 2 votes
1 1 answer
262
262 views
GO Classes asked Jul 17
262 views
Which of the following statements are correct?With kernel-level threads, if one thread of a process blocks, all the threads of that process will also be blocked. A lock i...
3 3 votes
1 1 answer
202
202 views
GO Classes asked Jul 17
202 views
Which of the following statements are correct?Threads that are part of the same process share the same stack pointer. Threads that are part of the same process share the ...