From 4798d20a3ab2ebc496b6cc3e75940b43c83d3b19 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 2 May 2021 22:30:25 -0600 Subject: answer question on swapping vs paging --- doc/assignment3.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/assignment3.md b/doc/assignment3.md index 4d9a207..000ca3c 100644 --- a/doc/assignment3.md +++ b/doc/assignment3.md @@ -77,6 +77,17 @@ Your answer for each question should be about 150 words. (100 marks total) > numbers. 1. Explain the distinction between a demand-paging system and a paging system with swapping. (8 marks) + + Demand paging is a technique where a program is loaded from disk into memory on demand. + This technique loads pages of memory for a program only when it is needed rather than + loading the entire program into memory. Pages that are never used are never loaded into + memory. This technique saves on memory because it only loads what is needed. + + When memory is paged to disk a pager will only load the pages from disk into memory that + are required for the current process execution. Typically a swapper would page the entire + program memory to and from disk. The swapper provides a savings by only loading the pages + of memory that are needed. + 1. How does the second-chance algorithm for page replacement differ from the FIFO page replacement algorithm? (8 marks) > The simplest page-replacement algorithm is a first-in, first-out (FIFO) -- cgit v1.2.3