A computer operating system (OS) uses paging for memory management. In paging: Main memory is divided

Question:

A computer operating system (OS) uses paging for memory management.
In paging:
– Main memory is divided into equal-size blocks, called page frames
– Each process that is executed is divided into blocks of same size, called pages
– Each process has a page table that is used to manage the pages of this process
The following table is the incomplete page table for a process, Y.

a) State two facts about Page 5.
b) Process Y executes the last instruction in Page 5. This instruction is not a branch instruction.

i) Explain the problem that now arises in the continued execution of process Y.

ii) Explain how interrupts help to solve the problem that you explained in part b) i).
c) When the next instruction is not present in main memory, the OS must load its page into a page frame.
If all page frames are currently in use, the OS overwrites the contents of a page frame with the required page.
The page that is to be replaced is determined by a page replacement algorithm.
One possible algorithm is to replace the page which has been in memory the shortest amount of time.
i) Give the additional data that would need to be stored in the page table.
ii) Copy and complete the table entry below to show what happens when Page 6 is swapped into main memory.
Include the data you have identified in part c) i) in the final column.
Assume that Page 1 is the one to be replaced.
In the final column, give an example of the data you have identified in part c) i).

Process Y contains instructions that result in the execution of a loop, a very large number of times. All instructions within the loop are in Page 1.
The loop contains a call to a procedure whose instructions are all in Page 3.
All page frames are currently in use.
Page 1 is the page that has been in memory for the shortest time.
iii) Explain what happens to Page 1 and Page 3, each time the loop is executed.
iv) Name the condition described in part c) iii).


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Cambridge International AS & A Level Computer Science

ISBN: 9781510457591

1st Edition

Authors: David Watson, Helen Williams

Question Posted: