Skip to main content

Posts

Showing posts with the label FIFO

Page Replacement Algorithm

     Brief Description              The basic idea of Page Replacement is; if there is a free page in the memory then use it. If there is no free page available, then we select one victim page which we would swap out of the virtual memory to the disk. Then we read the desired page to the new free frame. The page tables are then updated and the process is restarted. The main objective of a good replacement algorithm is to achieve a low page fault rate. For that we need to insure that the heavily used pages stay in the memory, and the replaced page should not be needed for some time. Secondly, we need to reduce the latency of a page fault. That can be assured by writing an efficient code, and replace the pages that do not need to be written out.     Flow Chart Flow Chart          Algorithm Implementation          FIFO           This Page Replacement Algorithm treats the page frames allocated to a process as a circular buffer:          1. when the buffer is full, the oldest page is replac