Find Jobs
Hire Freelancers

Virtual Memory Management Simulator Project!

$10-30 USD

Avslutat
Publicerad nästan sex år sedan

$10-30 USD

Betalning vid leverans
You are going to write a program that translates logical addresses given to physical addresses for a virtual address space of 216 = 65536 bytes. Your program will read from a text file containing logical addresses and, using a TLB as well as a page table, will translate each logical address to its corresponding physical address, and output the value of the byte stored at the translated physical address. The program will read a file converting several 16-bit integer numbers that represent logical addresses. These 16 bits are divided into (1) an 8-bit page number, and (2) 8-bit page offset. Hence, there are 28 = 256 entries in the page table, and the page/frame size of the system is also 28 = 256. The size of the physical address space is equal to the size of the logical address space, i.e., 216 = 65536 bytes. Consequently, the number of frames is also 28 = 256. Your program need only be concerned with reading logical addresses, translating them to their corresponding physical addresses, and outputting the byte stored at the physical address obtained. You do not need to support writing to the logical address space. Your program will translate logical to physical addresses using a TLB and page table. First, the page number is extracted from the logical address, and the TLB is consulted. In the case of a TLB-hit, the frame number is obtained from TLB. In the case of a TLB-miss, the page table must be consulted. In the latter case, either the frame number is obtained from the page table or a page fault occurs. A visual representation of the address translation process is shown in Figure 1. You need to design and code appropriate data structures for TLB, page table and main memory of the system. Your program should implement demand-paging. The secondary backing storage is represented by a file named [login to view URL], a binary file of size 65536 bytes, and it will be provided to you. When a page fault occurs, you will read in a 256-byte page from the file [login to view URL] and store in an available page frame in physical memory. Once the frame is stored, first the page table and then the TLB should be updated, and any subsequent accesses to that page will be resolved by either the TLB or the page table. You should treat [login to view URL] as a random access file so that you can randomly seek certain positions of the file for reading. It is suggested for you to use standard C library functions for performing I/O, including fopen(), fread(), fseek(), and fclose(). Since the size of the physical memory is the same as the size of the virtual address space, i.e., 65536 bytes, you do not need to be concerned about page replacements during a page fault, because each physical frame stored on BACKING_STORE has a corresponding place in the physical memory. On the other hand, since TLB has only 16 entries, you will need to use a replacement strategy when you update a full TLB. You should select the entry to be replaced via FIFO replacement strategy. A test file called [login to view URL] is provided which contains integer values representing logical addresses ranging from 0 to 65535. Your program will open this file, read each logical address and translate it to its corresponding physical address, and then output the value of the signed byte stored at that physical address. In C, char data type occupies one byte of storage, so you can use char values to represent physical memory contents. After completion, your program is to report the following statistics: 1. Page-fault rate: The percentage of address references that resulted in page faults. 2. TLB-hit rate: The percentage of address references that were resolved in the TLB. 3- In-line comments within your codes, giving enough information on your implementation details
Project ID: 16929294

Om projektet

2 anbud
Distansprojekt
Senaste aktivitet sex år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
2 frilansar lägger i genomsnitt anbud på $65 USD för detta uppdrag
Använd avatar
I know VM really well, and have done simillar projects. Will finish yours for a few hours...........
$30 USD Om 1 dag
4,9 (454 omdömen)
7,4
7,4
Använd avatar
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I made many great projects using c++, for example, I made the tools which could convert java codes into c++ scripts, of course garbage collection included, this was very similar to a compiler, and was very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$100 USD Om 2 dagar
4,9 (193 omdömen)
7,2
7,2

Om kunden

Flagga för TURKEY
istanbul, Turkey
5,0
4
Verifierad betalningsmetod
Medlem sedan mars 19, 2018

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.