|
Unix Interview Questions and Answers
What are the processes that are not bothered by the
swapper? Give Reason.
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.
What are the requirements for a swapper to work?
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.
What are the criteria for choosing a process for
swapping into memory from the swap device?
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.
What are the criteria for choosing a process for
swapping out of the memory to the swap device?
The process’s memory resident time,
Priority of the process and
The nice value.
What do you mean by nice value?
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.
What are conditions on which deadlock can occur while
swapping the processes?
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.
What are conditions for a machine to support Demand
Paging?
Memory architecture must based on Pages,
The machine must support the ‘restartable’ instructions.
What is ‘the principle of locality’?
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.
What is the working set of a process?
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.
What is the window of the working set of a process?
The window of the working set of a process is the total
number in which the process had referred the set of
pages in the working set of the process.
What is called a page fault?
Page fault is referred to the situation when the process
addresses a page in the working set of the process but the process fails to
locate the page in the working set. And on a page fault the kernel updates the
working set by reading the page from the secondary device.
What are data structures that
are used for Demand Paging?
Kernel contains 4 data structures for Demand paging.
They are,
Page table entries,
Disk block descriptors,
Page frame data table (pfdata),
Swap-use table.
Page Numbers
:
1
2
3
4
5
6
7
8
9
Have a Question ?
post your questions here. It
will be answered as soon as possible.
Check
HTML Interview
Questions for more HTML Interview Questions with Answers
Check
Job Interview Questions
for more Interview Questions with Answers
|