Set - 4

Question 1 :

What do you mean by nice value?

Answer :

Nice value is the value that controls {increments or decrements} the priority of the process. This value that is returned by the nice () system call. The equation for using nice value is: Priority = ("recent CPU usage"/constant) + (base- priority) + (nice value) Only the administrator can supply the nice value. The nice () system call works for the running process only. Nice value of one process cannot affect the nice value of the other process.

Question 2 :

What are conditions on which deadlock can occur while swapping the processes?

Answer :

All processes in the main memory are asleep.
All 'ready-to-run' processes are swapped out.
There is no space in the swap device for the new incoming process that are swapped out of the main memory.
There is no space in the main memory for the new incoming process.

Question 3 :

What are conditions for a machine to support Demand Paging?

Answer :

Memory architecture must based on Pages, The machine must support the 'restartable' instructions.

Question 4 :

What is 'the principle of locality'?

Answer :

It's the nature of the processes that they refer only to the small subset of the total data space of the process. i.e. the process frequently calls the same subroutines or executes the loop instructions.

Question 5 :

What is the working set of a process?

Answer :

The set of pages that are referred by the process in the last 'n', references, where 'n' is called the window of the working set of the process.