Question: Introduction For project 2 you will implement a virtual memory simulator. This simulator consists of several important parts: the CPU which contains the memory management

 Introduction For project 2 you will implement a virtual memory simulator.This simulator consists of several important parts: the CPU which contains the

Introduction For project 2 you will implement a virtual memory simulator. This simulator consists of several important parts: the CPU which contains the memory management unit and the TLB cache, the virtual page table, physical memory, and the operating system. This system must be modular, that is, the aforementioned parts must be represented by at least one class each. You are allowed to use Java, C++, or C# to implement this simulator Implementation Data Structures You must use fixed-size arrays to simulate the page table, the TLB, the page, and physical memory. Physical memory will be a two-dimensional array to simulate the page-frame # and the page of byte-addressable, byte-sized data. The index of the elements of the page table will be the virtual page index (V-Page#). The virtual page index will be a field in the TLB. The TLB is small and must be scanned on every lookup. The arrays used to implement the page table and TLB will be arrays of data structures that represent the tables' entries. We will simulate the pages of data that must be loaded from disk with text files that will be provided with this project. Table entry for the TLB V-Page# | V | R | D | PageFrame# Table entry for the virtual page table V | R | D | PageFrame# The CPU address width is 16 bits, physical memory's address width is 12 bits. The page offset is 8 bits. Assume the TLB contains 8 entries Note: you are not permitted to use any containers or data structures Provided by your chosen language other than simple arrays (not arraylists). You must implement the clock replacement algorithm's data structure as a linked list but you cannot use the Linked List structure provided by Java or C#. Execution: Your program accept as a commandline argument. a file path to a text file populated with virtual memory addresses (in hex and also provided with this project) that are used to simulate memory accesses by a process. Your CPU will read them, hand them to the MMU for fetching or writing. If the address is preceded by a zero, then the MMU should only read and output the value. If the address is preceded by a one, then the address will be followed by a decimal value that needs to be written to physical memory. In the latter case, the page containing the data must have it's dirty bit set by the mmu in both the TLB and the page table. This page must be written back to disk if your page replacement algorithm decides to replace the file For each test file that you run, you should use an original copy of the page files that are available with the project. You do not want altered page files of a previous runs to be used. Keep the originals in a safe place and overwrite the working set on each simulation. This should be done programmatically from within your simulator, not manually. You should use a file copy facility of your chosen language, not an operating system call. You cannot assume that the operating system of the grader is the same as yours

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!