In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about what page replacement algorithm fifo refers to. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Fifo refers to the first-in, first-out page replacement algorithm, which replaces the pages that are first called into memory for each replacement, that is, the pages with the longest waiting time in memory. Advantages: it is easy to implement and does not need the support of hardware, so there is no need to increase the cost of the system.
The operating environment of this tutorial: windows10 system, Dell G3 computer.
Fifo (FIFO page replacement algorithm)
Basic idea: give priority to eliminating the earliest pages that enter memory, that is, the pages that have been in memory for the longest time.
The algorithm is simple to implement, as long as the pages called into memory are linked into a queue according to the order, and a pointer is set to always point to the earliest page. However, the algorithm does not adapt to the law of the actual running of the process, because in the process, some pages are often visited.
Implementation process:
Suppose the system allocates three physical blocks to a process, and consider the following page number reference string: 7, 0, 1, 2, 0, 3, 0, 0, 0, 0, 3, 3, 2, 1, 2, 0, 1, 7, 0, 1. The FIFO algorithm is used for page replacement. When the process visits page 2, it swaps out page 7, which is the first to enter memory. Then visit page 3, and then swap out the pages that enter memory first in 2, 0, 1. As you can see from the following figure, there are 12 page replacements using the FIFO algorithm.
Visit page 70120304230321201701 physical block 17772
224440
00
777 physical Block 2
000
333222
eleven
100 physical Block 3
eleven
100033
thirty-two
221 missing pages No √√√√
√
√√
√√√
Disadvantages: the FIFO algorithm also produces the exception that when the number of allocated physical blocks increases, but the number of page faults increases instead of decreasing, which was discovered by Belady in 1969, so it is called Belady exception, as shown in the following figure. Only the FIFO algorithm may have a Belady exception, while the LRU and OPT algorithms will never have a Belady exception.
Thank you for reading! On "fifo refers to what page replacement algorithm" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.