Suppose a machine does not use a multi-level page table. Suppose further, that the system uses a 54-bit virtual address and a 30-bit physical address. If the page size is 16K, how many entries should you have in the page table? You may express the answer as a power of 2.
(1) Is the decision to have a single level page table a reasonable one? Explain
(2) If you are to use the inverted page table in this system, what would be the size of the page table in bytes? Assuming that a process ID takes 3 bytes to store.
(3) If you are to use a multiple level paging for the above system, how many levels would you introduce and why? Describe the format of a virtual address showing the size of each field.
logial/virtual address space= bytes
physical address space= bytes
page size=16K= x
bytes=
bytes
so,total number of pages in the logical address space=
=
also,total number of pages in the logical address space=Total
number of entries in the page table=
(1)In a single level page table, the whole table will be
searched even for a small amount of data, so space required to
access any data is = x 4 bytes
which is a huge space if we assume that size of each page table
entry is 4 bytes. But,paging pages in multilevel paging is more
specific, we can decide with the help of the multi level paging
scheme that which specific page among the
pages has
the data and selects it.So,here we need only the specific page to
be in memory while we run the process. So, instead of single level
page table, it is better to use multi level page table.
(2)Process ID needs 3 bytes.
Each entry of the inverted page table contains Process ID,Page number, and page size(offset) which is a total of 54 bits(Virtual address)
page size=16K= bytes
so,14 bits are required for offset.
therefore,bits needed to store page number=54-(offset+process ID)=54-(14+3)=37 bits
physical address space= bytes
total number of frames in the physical address space=
= Total entries in the inverted page table
here we have taken frame size=page size= bytes
size of each page table entry in the inverted page table=(process ID+page Number) bits=(3+37)bits=40 bits
so,size of the inverted page table=number of entries in the inverted page table x size of each page table entry
= x 37
bits
=2^13 x 37 bytes
=303104 bytes
(3)here, the size of each page table entry is not mentioned,it should be there in question.
let me assume it to be of 4 bytes
page size= bytes
number of page table entry in each page=()
=
total number of entries in the page table=
Number of pages in the first level page table=()=
Number of pages in the second level page table==
Number of pages in the third level page table==
Number of pages in the fourth level page table==1(we
take it as 1 as it comes less than 1 and total entries in page
table can't be in fraction)
So, 4 level page table is used, only if we take page size entry as 4 bytes.(as there is no information about page size entry in question,the result may vary with different page size entry, but the process to calculate the number of levels of the page table is the same).
Format of virtual address(total 54 bits):-
4 | 12 | 12 | 12 | 14 |
where the last 14 bits denotes offset, the three consecutive 12 bits are for the first 3 levels of the page table from right and the last 4 bits are for the fourth level of the page table.
Suppose a machine does not use a multi-level page table. Suppose further, that the system uses...
6) Paging [26 pts] Suppose you have a computer system with a 38-bit logical address, page size of 16K, and 4 bytes per page table entry a) How many pages are there in the logical address space? Suppose we use two level paging and each page table can fit completely in a frame. [4 pts] How many pages? [2 pts] Show your calculations here: b) For the above-mentioned system, give the breakup of logical address bits clearly indicating number of...
A computer system has a 36-bit virtual address space with a page size of 8K, and 4 bytes per page table entry. How many pages are in the virtual address space? What is the maximum size of addressable physical memory in this system? If the average process size is 8GB, would you use a one-level, two-level, or three-level page table? Why? Compute the average size of a page table in part c above
A system implements a paged virtual address space for each process using a one-level page table. The maximum size of virtual address space is 8MB. The page table for the running process includes the following valid entries (the -> notation indicates that a virtual page maps to the givenpage frame, that is, it is located in that frame): Virtual page 2 -> Page frame4 Virtual page 4 -> Page frame 9 Virtual page 1 -> Page frame2 Virtual page 3...
Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size of 210 bytes; 216 pages of logical address space. How many entries in the page table? How many bits in each page table entry? Assume each page table entry contains a valid/invalid bit.
A computer uses a byte-addressable virtual memory system with a four-entry TLB and a page table for a process P. Pages are 16 bytes in size. Main memory contains 8 frames and the page table contains 16 entries. a. How many bits are required for a virtual address? b. How many bits are required for a physical address?
Consider a system with 48-bit address that supports paging AND segmentation. The page size is 8KB and each page table entry (PTE) is 4B. A process can have up to 256 segments and each segment table entry (STE) is 8B. How large in bytes is the largest possible page table?
1. Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size of 210 bytes; 216 pages of logical address space. How many bits are in a logical address? How many bytes are in a frame! How many bits in the physical address specify the frame? How many entries are in the page table? How many bits are in each page table entry? Assume each page table entry contains a valid/invalid bit. 2. Consider a...
36.-Assume a 32 bit memory space with 16[KB] pages/frames and a two-level page table. Answer the following questions: a).-what is the size of the page table in bytes needed for a process that has only 64[MB] of code at the start of its virtual address range? b).-how many bits are used for address (frame) offset, and how many for page table indexing (total). Assume each page table entry has 32 bits. a).-Size of page table b).-Offset bits b).-Page table indexing...
The RISC-V 32-bit architecture supports virtual memory with 32-bit virtual addresses mapping to 32-bit physical addresses. The page size is 4Kbytes, and page table entries (PTEs) are 4 bytes each. Translation is performed using a 2-level page table structure. Bits 31:22 of a virtual address index the first-level page table. If the selected first-level PTE is valid, it points to a second-level page table. Bits 21:12 of the virtual address then index that second-level page table. If the selected second-level...
A simple paging system has a memory size of 256 bytes and a page size of 16 bytes. i. What is the size of the page table? ii. How many bits exist for an address, assuming 1-byte incremental addressing? iii. State p and d values (i.e. the page number and the offset). iv. Perform address translation of 64 bytes to physical address space using the page table below. 0 8 1 6 2 3 3 11 4 7