UNIX Programming and Technical

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

A. 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.

Read Solution (Total 0)

UNIX Other Question

Q. What are the requirements for a swapper to work?

A. 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.
Q. What do you mean by nice value?

A. 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)