NetApp Interview Question
Software Engineer / DevelopersContext Switch is storing the state & context of CPU so that execution can be resumed from from that point later .
Context Switch can be Thread Context Switch & Process Context switch .
Say Process-1 is being executed by the CPU . A context switch is initiated by creating a PCB for process 1 & storing all the vital details of Process in it
i.e :
1> Heap
2> Stack
3> Opened Files
4> Code segment
5> data segment
Then the process is interrupted .
Then process-2 PCB is loaded and executed by CPU .
Isn't the PCB created when a process is started? Also, aren't you missing something more fundamental about the state of a process?
- - February 22, 2010