Professional Documents
Culture Documents
Os Mid Term
Os Mid Term
3) Freeing memory when a process might be blocked waiting for the address space?
The kernel memory routine would be kmem_free_wakeup().This routine returns memory to a submap
of the kernel,and wakes up any processes waiting for memory
in that map.
Page Replacement In class, I mentioned that pages can be paged out if they
appear on the free, inactive, or active lists. Explain how a page on the inactive or active
lists might come to be paged out.
If the page-count targets have not been met, the swap-out daemon is started (see next subsection) to try
to clear additional
memory.
The FreeBSD 5.2 kernel does not impose any limits on the amount of virtual memory that it will grant. If it
finds that it has nearly
filled its memory and swap space, it avoids going into deadlock by killing off the largest process. One day
virtual-memory
accounting and limits will be added to the system so as to avoid this crude resource-control mechanism.
The FreeBSD 5.2 kernel does not impose any limits on the amount of virtual memory that it will grant. If it
finds that it has nearly
filled its memory and swap space, it avoids going into deadlock by killing off the largest process. One day
virtual-memory
accounting and limits will be added to the system so as to avoid this crude resource-control mechanism.
swapping a process. In general, the swap-scheduling mechanism does not do well under heavy load;
system performance is much
better when memory scheduling can be done by the page-replacement algorithm than when the swap
algorithm is used.