Starting from:

$29.99

COMP304 Project 3- Operating Systems Solution


GitHub Classroom Link: https://classroom.github.com/a/EMsOClKs
Description
In this project, you will get more familiar with the concepts of virtual memory.
Part I (50 points)
In this part, you will implement a virtual memory manager similar to the one described in Programming Projects in page 447 in Chapter 9 in 9th edition of the book.
The first version of the memory manager will be implemented with the assumption that physical address space is the same size as the virtual address space. Therefore, you will not implement any page-replacement policy. You are given the base source code for the virtual memory manager in the virtmem.c file, and you will complete its implementation by filling in the missing parts marked by TODO comments.
The virtual memory manager will use a TLB (Translation Lookaside Buffer) and a page table.
You are required to use a Second Chance (Clock) replacement policy for the TLB. Differently
1

from the specification in Programming Projects, you will use 20 bits addresses instead of 16 bits. The address bits will be divided into a 10-bit page number and a 10-bit page offset, which are also specified in virtmem.c. In order to test your implementations, addresses.txt and BACKINGSTORE.bin files are provided in the project folder.
Part II (50 points)
The implementation in Part I assumes that physical memory is the same size as the virtual address space. In practice, physical memory (PM) is typically smaller than virtual memory (VM). Part II will implement the case when VM is larger than PM.
Your implementation for Part II will use 256 page frames rather than 1024 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 Second Chance and LRU. replacement policies. Add a command line argument to select a policy such as -p 0 for Second Chance and -p 1 for LRU.
Compare these two policies with the address streams provided in the project folder.
Deliverables
You are required to submit the followings packed in a zip file (named your-username(s).zip) to Blackboard :
• Two .c source files that implement the virtual memory manager, one for each part. The names of the files must be part1.c and part2.c. Please comment your implementation.
• Report briefly describing your implementation
• Do not submit any executable files (a.out) or object files (*.o).
• Make sure your implementation works in a Linux environment.
Good luck.

Page 2 of 2

More products