![]() 9.10 Longest distance first (LDF) page replacement algorithm.9.1 The theoretically optimal page replacement algorithm.3 Detecting which pages are referenced and modified.The page replacing problem is a typical online problem from the competitive analysis perspective in the sense that the optimal deterministic algorithm is known. ![]() ![]() A page replacement algorithm looks at the limited information about accesses to the pages provided by hardware, and tries to guess which pages should be replaced to minimize the total number of page misses, while balancing this with the costs (primary storage and processor time) of the algorithm itself. This determines the quality of the page replacement algorithm: the less time waiting for page-ins, the better the algorithm. When the page that was selected for replacement and paged out is referenced again it has to be paged in (read in from disk), and this involves waiting for I/O completion. Page replacement happens when a requested page is not in memory ( page fault) and a free page cannot be used to satisfy the allocation, either because there are none, or because the number of free pages is lower than some threshold. In a computer operating system that uses paging for virtual memory management, page replacement algorithms decide which memory pages to page out, sometimes called swap out, or write to disk, when a page of memory needs to be allocated. processor, disk, database, web), see Cache algorithms. For an outline of general cache algorithms (e.g. This article is about algorithms specific to paging.
0 Comments
Leave a Reply. |