Question: Code in C using a linux based OS Write a program that simulates paging - based memory management and address translation using a Page Table
Code in C using a linux based OS
Write a program that simulates pagingbased memory management and address
translation using a Page Table and Translation Lookaside Buffer TLB The program
should demonstrate how logical addresses are translated into physical addresses using
a page table and how the TLB serves as a cache to speed up this process. Add your
assumptions, if any, to a ReadMe file.
Design:
Implement a page table that maps virtual page numbers VPNs to physical
frame numbers PFNs
Assume a fixed page size of KB and KB of total memory.
Simulate a TLB that caches recent translations. The TLB size should be small
enough that it cannot hold all the pages in the system.
The TLB should be consulted first to check if the translation exists TLB hit or
miss
On a TLB miss, simulate accessing the page table to fetch the PFN and update
the TLB
Use the pseudocode from Chapter for the address translation.
Input: The user can enter a bit logical address in hex format. For example: af
Output: The physical address in hex format and a string telling if this was a TLB hit or
TLB miss.
DONT USE CHATGPT
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
