ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2017331200153-梁庆龙 >
homework8 Version 0
👤 Author: by 1589080613qqcom 2019-12-03 15:35:44
The simplest page replacement algorithm is the first in, first out (FIFO) method. The essence of this algorithm is to always choose the page replacement with the longest dwell time (i.e. the oldest) in main memory, that is, to enter the page of memory first and exit from memory first.

1. When the program is running, first load the 7,0,1 three pages into memory.
2. After that, when the process wants to visit page 2, there will be a page missing interrupt. At this time, according to the first in, first out replacement algorithm, because page 7 is the first to enter the memory, so page 7 is replaced;
3. When process 0 wants to access, it does not need to generate page missing interrupt because it already exists in memory;
4. When the process wants to visit page 3, because page 0 is the first one to enter the memory, change out page 0;
5. Wait until the last page is visited. The following figure shows the permutation graph using the first in, first out permutation algorithm. As can be seen from the figure, 12 page breaks have occurred by using the best permutation algorithm. The first in, first out page replacement is twice as much as the best replacement algorithm;

Please login to reply. Login

Reversion History

Loading...
No reversions found.