Set - 3

Question 11 :

How the Swapper works?

Answer :

The swapper is the only process that swaps the processes. The Swapper operates only in the Kernel mode and it does not uses System calls instead it uses internal Kernel functions for swapping. It is the archetype of all kernel process.


Question 12 :

What are the processes that are not bothered by the swapper? Give Reason.

Answer :

Zombie process: They do not take any up physical memory.
Processes locked in memories that are updating the region of the process.
Kernel swaps only the sleeping processes rather than the 'ready-to-run' processes, as they have the higher probability of being scheduled than the Sleeping processes.


Question 13 :

What are the requirements for a swapper to work?

Answer :

The swapper works on the highest scheduling priority. Firstly it will look for any sleeping process, if not found then it will look for the ready-to-run process for swapping. But the major requirement for the swapper to work the ready-to-run process must be core-resident for at least 2 seconds before swapping out. And for swapping in the process must have been resided in the swap device for at least 2 seconds. If the requirement is not satisfied then the swapper will go into the wait state on that event and it is awaken once in a second by the Kernel.


Question 14 :

What are the criteria for choosing a process for swapping into memory from the swap device?

Answer :

The resident time of the processes in the swap device, the priority of the processes and the amount of time the processes had been swapped out.


Question 15 :

What are the criteria for choosing a process for swapping out of the memory to the swap device?

Answer :

The process's memory resident time, Priority of the process and The nice value.