diff options
| author | mo khan <mo@mokhan.ca> | 2021-05-02 22:30:25 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2021-05-02 22:30:25 -0600 |
| commit | 4798d20a3ab2ebc496b6cc3e75940b43c83d3b19 (patch) | |
| tree | e39695303d65db783a7a28c3e93dc34da674a016 | |
| parent | c53c3cb4b83a3b3a659717333cd59b002914b3e1 (diff) | |
answer question on swapping vs paging
| -rw-r--r-- | doc/assignment3.md | 11 |
1 files changed, 11 insertions, 0 deletions
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) |
