Question: Programming Assignment 3 - Virtual Memory Manager Due Date: Friday, April 2 6 , 2 0 2 4 , 1 1 : 5 9 pm
Programming Assignment Virtual Memory Manager
Due Date: Friday, April :pm CDT
In this assignment, you will design and implement a virtual memory manager with paging, and then
simulate its operation for each of the following page replacement algorithms: LIFO lastinfirstout
or stack MRU most recently used LRUX replace the page whose Kth most recent acoess is
furthest in the past; for example, LRU is simply LRU while LRU replaces pages according to
the time of their penultimate access; LRUK improves significantly on LRU with regard to locality
in time LFU least frequently used OPTlookheadX optimum with lookahead of X future
addresses and WS Working Set There will be sets of output from these runs.
The information provided here is intended to guide you in your design; it is not a complete
description of all issues that must be considered. The assignment requires a combination of
UnixLinux processes such as the page fault handler, disk driver, and page replacement process
synchronized by UnixLinux semaphores, and simulators such as the paging disk
Data Structures:
You may add additional fields to these data structures if needed in your design. There is one page
table per address space process and one table entry per page. The address can thus be divided
into parts: page number and displacement offset
A single frames table contains the address space and page number of the page currently occu
pying each page frame. The format of the entry for frame is:
FRAMESf: a p forwardlink backwardlink
Entries in the frames table are linked together in allocated and free lists. The disk page table
entry, DPT ap contains the address on the paging disk of page of address space a
Key Elements of the Assignment:
Write a page fault handler process that can be invoked by the interrupt dispatcher when a
page fault occurs. The address space and page number of the missing page are made available
to the fault handler by the addressing hardware. The fault handler requests a page transfer
by placing an entry in the disk driver work queue and signaling the associated semaphore.
Design a disk driver process which schedules all to the paging disk. disk command
STARTDISK readurite memoryaddr, diskaddr
initiates an IO operation. The paging disk is wired to the semaphore of the disk driver
process, which it signals when a command is complete. The disk has a work queue containing
entries of the form
processid readwrite frameindex, diskaddr
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
