you are asked to develop a virtual memory simulation tool and do some experiments with it

Cancelled Posted 6 years ago Paid on delivery
Cancelled Paid on delivery

you are asked to develop a virtual memory simulation tool and do some experiments with it.

Your program will read a file called data.txt. This file consists of a long series of memory references. Each line of the file has three values, delimited by a space. The first field is an integer, showing the process number. The second is also an integer, showing a memory reference (address). And the third is a char, either “R” (Read) or “W” (Write). If this char is a “W”, it means that the referenced memory address is modified.

Each memory reference happens in one time unit, i.e. every line in the data file should have a unique timestamp.

The page table you maintain should also have a dirty bit and a reference bit for each page. You may want to include other data as well.

All addresses are 16 bits; so all processes have a virtual address space of 64KB (216). All addresses read from the file will be in the range 0 ... 65535. Each page is 512 bytes, so each process has a page table of size 128 (216/29 ). In other words, in each virtual address, the first (most significant) 7 bits determine the virtual page number, and the last 9 bits determine the offset of the address within the page frame.

There are 32 addressable physical pages in the main memory, i.e. the physical memory size is 32pages*512bytes/page = 16KB.

You have to keep track of three statistics, the total number of page faults, the total number of disk references and the total number of dirty page writes. Every page fault has at least one disk reference, but if the page to be replaced is dirty, then there will be two disk references, one to copy the dirty page back to the disk and one to load the new page.

Each process has its own page table, so address 12340 in process 1 is different from address 12340 in process 2.

You should have a global variable debug. The user should be able to set this variable via command line. If debugging is on (debug == 1 or debug = True), your program should display information about each page fault whenever a page fault occurs. It should list the line that generated the page fault, the physical page being replaced, the process number, the virtual page, and whether or not the page being replaced was dirty.

C Programming C++ Programming Embedded Software

Project ID: #15662531

About the project

6 proposals Remote project Active 6 years ago

6 freelancers are bidding on average $80 for this job

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on client side, using c++ under windows envir More

$120 USD in 2 days
(202 Reviews)
7.3
Wadjet

Hello, I am very interested in your project, and ready to start working on it. Relevant Skills and Experience I am very experienced with assignments like this, especially when C/C++ is required. Please check my review More

$149 USD in 7 days
(37 Reviews)
5.4
RaqiyaTawfeeq

Hello, I am full-time freelancer, I have gone through your project description I can do it. I am familiar with virtual memory simulation tool & having a good experience in programming. Relevant Skills and Experience I More

$30 USD in 3 days
(0 Reviews)
0.0
expertdeveloper8

Hello, I've reviewed your complete job description, and I perfectly develop virtual memory simulation tool I have 8 years+ experience in C programming, Software Architecture, Linux, I have completed 300+ projects i More

$50 USD in 3 days
(0 Reviews)
0.0
SayanProgrammer

Hey ! I'm SAYAN PROGRAMMER I've reviewed your complete job description, and I fulfill all the qualifications required for this project. I always try to provide good quality work to my clients. I have more than More

$30 USD in 2 days
(0 Reviews)
0.0