Description
Description
In this project, you will get more familiar with the concepts of virtual memory and file
system in Unix.
Part I
(70 points) In this part, you will implement both FIFO and LRU replacement policies for
a virtual memory. The provided code in the project folder implements a virtual memory
manager as described in Programming Projects in page 447 in Chapter 9. (in Page 458 in
Chapter 9 in the online version of the book, also provided in blackboard). The implementation assumes that physical memory is the same size as the virtual address space. In practice,
physical memory is typically much smaller than a virtual address space.
Your implementation will use 64 page frames rather than 256 for physical memory. This
change will require modifying the provided program so that it keeps track of free page
frames as well as implementing a page-replacement policy. We are asking you to implement
both FIFO and LRU replacement policies. Add a command line argument to select a policy
such as -p 0 for FIFO and -p 1 for LRU.
Compare these two policies with the address streams provided in the project folder.
Part II
(20 points) Perform the programming problem in page 534 in Chapter 11 (if you have the
online version of the book, then it is in page 583 in Chapter 12). If you do not have the
book, we have provided the related pages on blackboard and necessary input files.
This part of the project does not require you to implement any program. Instead you have
to run some commands to get familiar with the file system in Unix. Perform the commands
1
COMP 304 ( Spring 2019): Project 3
Virtual Memory Manager and File System in Unix DELIVERABLES
and prepare a report answering the questions in the text book. Include snapshots of your
runs.
Deliverables
You are required to submit the followings packed in a zip file (named your-username(s).zip)
to blackboard :
• .c source file that implements the virtual memory manager. Please comment your
implementation.
• Any supplementary files for your implementation (e.g. Makefile)
• Submit a report describing your implementation and answers to the questions in Part
II.
• There won’t be a demo for this project. We suggest you to document your project very
well to make things easy for the TA and for yourself.
Grading
Part I (70 points), Part II (20 points), Report (10 points).