A computer system has a 36-bit virtual address space with a page size of 8K, and 4 bytes per page table entry.
(a) How many pages are in the virtual address space?
Normally a 36-bit Virtual Address Space could address
236 Bytes
The Page size given is 8KB. i.e., 1 KB = 1000 bytes which is equivalent to 210 bytes
Then for 8KB = 21 x 21 x 21 x 210 = 213 Bytes
The number of pages in the Virtual Address Space for the Page size of 8KB = 236 / 213 = 223
(b) What is the maximum size of addressable physical memory in this system?
For 4 bytes per Page Table Entry, the number of pages that can be referred to is 232 pages. As each page size is now 213 Bytes, the maximum size of addressable physical memory in this system is 232 x 213 = 245 Bytes.
(c) If the average process size is 8GB, would you use a one-level, two-level, or three-level page table? Why?
(d) Compute the average size of a page table in part c above
Average Process Size = 8GB, and we are having 233 pages.
One-level page table:
Available Virtual Address Space = 223 pages.
We are using 4B for each Page Table Entry.
Now the Page Table Size = 223 x 4 = 223 x 22= 225. = 33.554432 MB
As it is not cost-effective, it cannot be considered. It is taking 1 in 242 times of its memory space.
Two-level page table:
Average Process Size = 233 pages with 8GB data. As the Page Size given is 213 pages.
We can assume that the overall size of all the varying pages is 233 Bytes.
Accordingly, we now get 233 / 213 = 220 Pages.
Here the address shall be partitioned into 12, 11, and 13.
It can be shown that the size of one low-level piece of the Page Table is 211. Hence, it is needed 220 / 211 = 29
Accordingly, now the total size of the Page Table shall be given as
The total size of the page table is then:
Size of the External page table = 1x212x22 added with Size of the Internal Page Table = 29 x 211 x 22 , we could get the result as 214 + 222 which is roughly 4.210688 megabytes
Three-Level Page Table:
Here the address shall be partitioned into 8,8,7, and 13.
As above, it is needed 220 / 27 = 213.
It can be seen that the Two-level Page table would reference 28 Three-level Page Table. Hence it is needed 213/ 28 = 25 Two-level pages. Now the overall size of the Page Table is given as
for the External page table:
1 x 28 x 22
for the Two-level page table:
25 x 28 x 22
for the Internal page table:
213 x 27 x 22
which is roughly equivalent to 4 megabytes.
From the above calculations, Two-level and Three-level page table requires less space than One-level Page table. As our Virtual address space is small, and based on the cost-effective solution, it's better to choose the Two-level Page Table.
A computer system has a 36-bit virtual address space with a page size of 8K, and...
A certain byte-addressable computer system has 32-bit words, a virtual address space of 4GB, and a physical address space of 1GB. The page size for this system is 4 KB. Assume each entry in the page table is rounded up to 4 bytes. a) Compute the size of the page table in bytes. b) Assume this virtual memory system is implemented with a 4-way set associative TLB (Translation Lookaside Buffer) with a total of 256 address translations. Compute the size...
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?
3. Virtual Memory (20 points) An ISA supports an 8 bit, byte-addressable virtual address space. The corresponding physical memory has only 256 bytes. Each page contains 32 bytes. A simple, one-level translation scheme is used and the page table resides in physical memory. The initial contents of the frames of physical memory are shown below. VALUE address size 8 bit byte addressable each byte of addressing type memory has its own address 32 B page size physical memory size 256...
Consider a virtual memory system with the following properties: 36 bit virtual byte address, 8 KB pages size, and 32 bit physical byte address. Please explain how you determined your answer. a. What is the size of main memory for this system if all addressable frames are used? b. What is the total size of the page table for each process on this processor, assuming that the valid, protection, dirty, and use bits take a total of 4 bits and...
17. A computer system implements a paged virtual memory system. Assume a 16-bit virtual address space and a 24-bit physical address space. Assume that the first 6 bits of a virtual address index the page table and the rest of the bits are the page offset. A process has the following indexed page table. Index Page Table Entry (PTE) 0x3800 0x3600 0x3200 0x1000 2 3 Each page table entry qives a hexadecimal page frame addresses. Translate the following two hexadecimal...
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...
A machine has a 16-bit byte-addressable virtual address space. The page size is 8 KB. How many pages of virtual address space exist? (25 points)
Exercise l: Suppose that we have a virtual memory space of 28 bytes for a given process and physical memory of 4 page frames. There is no cache. Suppose that pages are 32 bytes in length. 1) How many bits the virtual address contain? How many bits the physical address contain? bs Suppose now that some pages from the process have been brought into main memory as shown in the following figure: Virtual memory Physical memory Page table Frame #...
Virtual memory address translation: a) Consider a machine with a physical memory of 8 GB, a page size of 4 KB, and a page table entry size of 4 bytes. How many levels of page tables would be required to map a 52-bit virtual address space if every page table fits into a single page? b) Without a cache or TLB, how many memory operations are required to read or write a page in physical memory? c) How much physical...
A certain computer provides its users with a virtual memory space of 2^32 bytes. The computer has 2^18 bytes of physical memory. The virtual memory is implemented by paging, and the page size is 4,096 bytes. A user process generates the virtual address 11123456 hexadecimal. a. How many entries are there in the page table? b. Explain how the system establishes the corresponding physical location.