Question: Objective: A C program that translates a virtual address to a physical address, involving a custom-sized fully associative page table . Menu Options: The program

Objective:

A C program that translates a virtual address to a physical address, involving a custom-sized fully associative page table.

Menu Options:

The program translates virtual addresses to a physical address based on selections from a menu, where each choice calls the appropriate procedure.

The possible action inputs are:

Set Parameters

Map Virtual Address

Quit

This program reads all input values from a file, whose name is entered on the command line.

Upon accepting the parameters from the file, the page table is to be dynamically allocated based on the total number of page frames. The page frames will be mapped to virtual pages, on demand, in the page frame order 0,1,2,3, etc.

Set Parameter Inputs:

When the Set Parameters option is entered, three values are subsequently read from the file whose name was previously entered on the command line. The file must reside in the same directory as the program. The three parameters read are:

The total size of physical memory (in words)

The page size (words/page)

The replacement policy (LRU, FIFO)

Map Virtual Address

When this action option is read from the file, the next value is the virtual address which the program maps into a physical frame and address.

Outputs:

Each time a virtual address is read from the file, two, and possibly three, output lines are displayed. They are:

A Page Fault (if any) in the page table

The original virtual address

The corresponding physical address for the virtual address

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!