Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below Code is in C. Need to do Address Translation with a Fixed Page Table Below is the sequence for part1testsequence: Part 1 (30 points):

Below Code is in C. Need to do Address Translation with a Fixed Page Table

image text in transcribed

Below is the sequence for part1testsequence:

image text in transcribed

Part 1 (30 points): Simple Address Translation with a Fixed Page Table This is just to get you started. Assume that the page table of the process is like the following picture. l of 4 10/7/18.7:16 PM CS 3733 Operating Systems 0 Page TablePhysical Frames Here, only the first 7 entries of the process' page table are used in Part 1.Their corresponding physical frames are shown/illustrated in the above page table (for instance, page 3 is in frame 7). The frame 0 is used by OS Note: to simplify the work in Part 1, you can put the fixed mapping from page to frame as shown in the figure into an array before performing any address translation. Under the directory assign3, write a main program called assign3part1.c for this part. The program will take only one parameter, the name of address sequence file which contains a sequence of logical memory addresses accessed by the process. In this assignment, we save each logical/physical address as 64 bits (8 bytes) to make the program to be more general. That is, each logical addresses is saved as 8 bytes (unisgned long) in the address sequence file. Your program should read and analyze each logical address, and translate it into the corresponding physical addresses based on the given page table as shown in the above picture In the address sequence file, the logical memory addresses are saved in the binary format. To verify that you can read in the correct sequence of memory addresses, you can first read each address from the sequence file and print them out. You can test your program with the given simple test sequence file (partltestsequence), where the first logical address should be 0x0000000000000044 and the second one should be 0x0000000000000224. Hint: in the fox01 to fox06 Linux machines, you can also use the command "xxd partltestsequence" to check the content of the address sequence file. Note the order of bytes for each address.] The test sequene file has the size of 64 bytes and contains 8 logical memory accesses (8 bytes each). For each logical address in the sequence file, you will use the page table in the above figure to perform the address translation and generate a corresponding physical address. You need to output the translated physical address into a new file called output-partltest file. This output-partltest file should have the same binary format as the given partltestsequence file (where each physical address should be 8 bytes as an unsigned long value in the output file) Part 1 (30 points): Simple Address Translation with a Fixed Page Table This is just to get you started. Assume that the page table of the process is like the following picture. l of 4 10/7/18.7:16 PM CS 3733 Operating Systems 0 Page TablePhysical Frames Here, only the first 7 entries of the process' page table are used in Part 1.Their corresponding physical frames are shown/illustrated in the above page table (for instance, page 3 is in frame 7). The frame 0 is used by OS Note: to simplify the work in Part 1, you can put the fixed mapping from page to frame as shown in the figure into an array before performing any address translation. Under the directory assign3, write a main program called assign3part1.c for this part. The program will take only one parameter, the name of address sequence file which contains a sequence of logical memory addresses accessed by the process. In this assignment, we save each logical/physical address as 64 bits (8 bytes) to make the program to be more general. That is, each logical addresses is saved as 8 bytes (unisgned long) in the address sequence file. Your program should read and analyze each logical address, and translate it into the corresponding physical addresses based on the given page table as shown in the above picture In the address sequence file, the logical memory addresses are saved in the binary format. To verify that you can read in the correct sequence of memory addresses, you can first read each address from the sequence file and print them out. You can test your program with the given simple test sequence file (partltestsequence), where the first logical address should be 0x0000000000000044 and the second one should be 0x0000000000000224. Hint: in the fox01 to fox06 Linux machines, you can also use the command "xxd partltestsequence" to check the content of the address sequence file. Note the order of bytes for each address.] The test sequene file has the size of 64 bytes and contains 8 logical memory accesses (8 bytes each). For each logical address in the sequence file, you will use the page table in the above figure to perform the address translation and generate a corresponding physical address. You need to output the translated physical address into a new file called output-partltest file. This output-partltest file should have the same binary format as the given partltestsequence file (where each physical address should be 8 bytes as an unsigned long value in the output file)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions