3,359 views
0 0 votes

 

Please explain each point.
My assumptions are;
1.kernel must save the register values.It should be FALSE as it can be the case if the process is terminated.Thus, no need to save. 

2.kernel must close the files. Explain this point in both the cases(the process is terminated or the time slice of the process is expired)

3.kernel must restore the register values. It should also be FALSE as the coming runnable process might be a new process that has not dealt with registers earlier.Thus, no need to restore. 

4.kernel must save the content of memory onto disk. Explain this too.

1 Answer

2 2 votes

On process switch, the PCB (Process Control Block) is used.

i. Of course true. The kernel will be saving the register values of the currently running process. Think about the Program Counter and other CPU registers.

ii. Not a must. I mean what might be going wrong? The PCB maintains the list of open files for the particular process.

iii. True. The execution needs to start again from the point it was stopped so the registers will be reloaded.

If a new process has come for execution: the program counter(set to 0), stack pointers may still be loaded.

iv. Not a must.

Ans: Option (C)

Position:
Show:

Related questions

0 0 votes
0 0 answers
919
919 views
Sandy Sharma asked May 25, 2018
919 views
Which one of the following is not true and why?kernel is the program that constitutes the central core of the operating systemkernel is the first part of operating system...
11 11 votes
3 3 answers
4.3k
4.3k views
Akriti sood asked Dec 20, 2016
4,332 views
can anyone tell what are different activities that are performed in kernel modeuser modehow to change frm user mode to kernel mode and vice-versa,,
5 5 votes
2 2 answers
2.5k
2.5k views
vijaycs asked Sep 20, 2016
2,502 views
Assume that process A has 3 user level threads and process B has 4 kernel-level threads. Consider while process A is running in CPU, process B is waiting in ready queue. ...
0 0 votes
1 1 answer
1.4k
1.4k views
admin asked Oct 25, 2019
1,405 views
Can a measure of whether a process is likely to be CPU bound or I/O bound be determined by analyzing source code? How can this be determined at run time?