ENVS 1800 Lecture Notes - Lecture 38: Virtual Memory, Demand Paging
![](https://new-preview-html.oneclass.com/rBRgqlv0YP2XQykxzqyqj5V9M6zyxZLD/bg1.png)
ENVS 1800 Lecture 38 Notes – Fetch-Execute
Introduction
• The process of page replacement is also known as page swapping.
• The steps involved in handling a page fault are shown
• Most systems perform page swapping only when it is required as a result of a page fault.
• This procedure is called demand paging.
• A few systems attempt to anticipate page needs before they occur, so that a page is
swapped in before it is needed.
• This technique is called prepaging.
• To date, prepaging algorithms have not been very successful at predicting accurately the
future page needs of programs.
• When the page swap is complete, the process may be started again where it left off.
• Most systems return to the beginning of the fetch-execute cycle where the page fault
occurred, but a few systems restart the instruction in the middle of its cycle.
• Regardless of which way is used, the required page is now present, and the instruction
can be completed.
• The importance of page swapping is that it means that a program does not have to be
loaded into memory in its entirety to execute.
• In fact, the number of pages that must be loaded into memory to execute a process is
quite small.
• This issue is discussed further in the next section.
• Therefore, virtual storage can be used to store a large number of programs in a small
amount of physical memory and makes it appear that the computer has more memory
than is physically present.
• Parts of each program are loaded into memory.
• Page swapping handles the situations when required pages are not physically present.
• Furthermore, since the virtual memory mapping assures that any program page can be
loaded anywhere into memory
find more resources at oneclass.com
find more resources at oneclass.com