1. Homepage
  2. Programming
  3. ECE-GY 6913 Computing Systems Architecture Lab 4: Multi-Level Page Table

ECE-GY 6913 Computing Systems Architecture Lab 4: Multi-Level Page Table

Engage in a Conversation
NYUECE-GY 6913Computing Systems ArchitectureMulti-Level Page TableC++ECE6913

ECE-GY 6913 Lab #4 CourseNana.COM

Lab 4: Multi-Level Page Table CourseNana.COM

The goal of this lab assignment is to design and implement a 2-level page table, which is an essential component of virtual memory. CourseNana.COM

In this assignment, you will work on implementing a 2-level page table. The assignment assumes a physical address space of 12-bits and a 14-bit virtual address space. Each page table fits into a single page, and each page table entry is 4 bytes. The page size is 64B. CourseNana.COM

Virtual address:
The virtual address size of this design will be 14 bits. The following depicts the virtual address layout: CourseNana.COM

13 0 CourseNana.COM

Page table structure:
The page/frame size is 64B. The size of a page table entry is 4B. For both levels, bit 0 is used as the valid bit. In the outer page table, the top 12 bits contain the physical address of the beginning of the next level page table. Bits 1-19 are unused and must be set to zero. The following depicts the PTE format for the outer page table.
To access the outer page table, the sign extension of the
4-bit outer page table value in the virtual address should be added to the value stored in the page table register. CourseNana.COM

31 20 19 1 0 CourseNana.COM

In the inner page table, the top 6 bits represent the frame number, and bits 1-25 are unused. The following table depicts the PTE format for the inner page table. To access this level of the page table, the sign extension of the 4-bit inner page table number value in virtual address should be added to the frame number coming from the outer page table. CourseNana.COM

4-bit outer page table CourseNana.COM

4-bit inner page table CourseNana.COM

6 bit offset CourseNana.COM

Not Used CourseNana.COM

31 26 25 CourseNana.COM

Physical addresses:
The physical address size is 12 bits. CourseNana.COM

Page table register file:
This special register points to the start of the outer page table. It is a 12-bit register. CourseNana.COM

Not Used CourseNana.COM

Number of page table levels: CourseNana.COM

To successfully complete the assignment, you must calculate the size of the inner page table yourself. CourseNana.COM

Implementation requirements: CourseNana.COM

We have provided the skeleton code that initializes the 2-level page table and the page table register file. Your task is to implement a function that can index the page table and print out the corresponding physical addresses (12-bit) and the value stored in the physical memory (32-bit) as a hex representation. CourseNana.COM

Your function should correctly translate virtual addresses to physical addresses using the 2-level page table structure. If the page does not contain a valid frame number (the valid bit is “0”), your function should print out “0” in the output, otherwise it should print out “1”.The same applies to both outer and inner level page tables. In case the physical address cannot be retrieved, print 0x000 and 0x00000000 for the physical address and the memory value, respectively. CourseNana.COM

Your output file should have the following format for each memory request: CourseNana.COM

0/1, 0/1, 0xPhysical_address(12-bits), 0xMemory_value(32-bits) CourseNana.COM

Your code will be checked with a sequence of virtual addresses. You should save the above information for each request in a file named "pt_results.txt.”.
We have provided an example of queries to the page table (
“pt_requests.txt”), initialization of physical memory (“pt_initialize.txt”) and paget table register (“PTBR.txt”), and the output file (“pt_results.txt”) in the “expected_results” directory, which shows the exact format of the output file. CourseNana.COM

The “pt_requests.txt” and “PTBR.txt” should be given as an input. Your code should be executed as follows: CourseNana.COM

>>> ./PageTable pt_initialize.txt PTBR.txt CourseNana.COM

Your Assignment: CourseNana.COM

1. We have provided the skeleton code in the file PageTable.cpp. Implement the functions where CourseNana.COM

“TODO: implement”.
A Makefile has been provided for you to compile the source code (do not modify the Makefile)
We will be compiling your code with:
g++ version 11.3.0. Please make sure that your code is compatible with g++
You can compile your design by typing “make” which will create an executable called “PageTable”. Run the executable by calling: “./PageTable.
Calling the binary “./PageTable” expects the “pt_initialize.txt” file in the same directory and produces one output file name “pt_results.txt”.
We have provided “pt_initialize.txt”, “PTBR.txt”, and “pt_requests.txt” files containing initialization of physical memory and page table register file and a sample sequence of queries to the page table. These files must be in the same directory as the source code.
f. We have provided the correct output results for the provided test case in the “expected_results” directory. Make sure you pass this test case before submitting your code. However, we encourage you to write your own sequence of requests and check your design. CourseNana.COM

2. You will be submitting your assignments on Gradescope. You must upload ONLY one file on Gradescope: “PageTable.cpp”. Do not zip the file or upload any other file. CourseNana.COM

Due Date: CourseNana.COM

Friday Nov 17, 2023, 23:59 Eastern Time.  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
NYU代写,ECE-GY 6913代写,Computing Systems Architecture代写,Multi-Level Page Table代写,C++代写,ECE6913代写,NYU代编,ECE-GY 6913代编,Computing Systems Architecture代编,Multi-Level Page Table代编,C++代编,ECE6913代编,NYU代考,ECE-GY 6913代考,Computing Systems Architecture代考,Multi-Level Page Table代考,C++代考,ECE6913代考,NYUhelp,ECE-GY 6913help,Computing Systems Architecturehelp,Multi-Level Page Tablehelp,C++help,ECE6913help,NYU作业代写,ECE-GY 6913作业代写,Computing Systems Architecture作业代写,Multi-Level Page Table作业代写,C++作业代写,ECE6913作业代写,NYU编程代写,ECE-GY 6913编程代写,Computing Systems Architecture编程代写,Multi-Level Page Table编程代写,C++编程代写,ECE6913编程代写,NYUprogramming help,ECE-GY 6913programming help,Computing Systems Architectureprogramming help,Multi-Level Page Tableprogramming help,C++programming help,ECE6913programming help,NYUassignment help,ECE-GY 6913assignment help,Computing Systems Architectureassignment help,Multi-Level Page Tableassignment help,C++assignment help,ECE6913assignment help,NYUsolution,ECE-GY 6913solution,Computing Systems Architecturesolution,Multi-Level Page Tablesolution,C++solution,ECE6913solution,