Interview Questions of operating system: a common paging algorithm

1, FIFO scheduling algorithm (FIFO, First In First Out)

  FIFO scheduling algorithm is successively selected based on the time schedule page into the page memory, you need to enter the page according to the chronological form a queue when the algorithm, each team out of priority home side. His advantage is relatively easy to implement, can make use of historical information in the main memory paging situation, but he did not reflect the local program, because the page was first transferred to the main memory page, it is often possible to use.

2, the least recently used scheduling algorithms (LFU, Least Frequently Used)

  That is out of a period of time is the least frequently accessed pages, LFU key is to look at the frequency of a certain period of time the page is used.

3, the least recently used paging algorithm (LRU, Least Recently Used)

  First page is out of the longest unused, LRU key is to look at the page last used to occur scheduled length of time.

4, clock replacement algorithm

  Access is provided to each page bit, then all pages in the memory queue to circulate through the connection pointers, when a page has been accessed visited location, each time out, the loop through the current position pointer, the access bit is set to 1, 0, find the first access bit out of its zero.

5, optimal replacement algorithm

 Each time eliminated the longest time to find a page in the future will only be accessible to be eliminated.

  Advantages: page fault rate

  Disadvantages: the need to predict the future, can not be achieved, but can be used to measure other replacement algorithm. 

  

Guess you like

Origin www.cnblogs.com/yichengming/p/11447951.html