subject is operating systems
Designing a Virtual Memory Manager
Write a java program that translates logical to physical
addresses for a virtual address space of
size 216 = 65,536 bytes. Your program will
read from a file containing logical addresses and, using a TLB and
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 goal is to use
simulation to understand the steps involved in translating logical
to physical addresses. This will include resolving page faults
using demand paging, managing a TLB, and implementing a
page-replacement algorithm.
The program will read a file containing several 32-bit integer
numbers that represent logical addresses. However, you need only be
concerned with 16-bit addresses, so you must mask the rightmost 16
bits of each logical address. These 16 bits are divided into (1) an
8-bit page number and (2) an 8-bit page offset. Hence, the
addresses are structured as shown as:
Other specifics include the following:
Additionally, your program need only be concerned with reading
logical addresses and translating them to their corresponding
physical addresses. You do not need to support writing to the
logical address space.
Address Translation
Your program will translate logical to physical addresses using
a TLB and page table as outlined in Section. 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 the
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:
subject is operating systems Designing a Virtual Memory Manager Write a java program that translates logical to physical
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
subject is operating systems Designing a Virtual Memory Manager Write a java program that translates logical to physical
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!