Anda di halaman 1dari 3

A computer uses 46bit virtual address, 32bit physical address, and a threelevel paged page table

organization. The page table base register stores the base address of the firstlevel table (T1), which
occupies exactly one page. Each entry of T1 stores the base address of a page of the secondlevel table
(T2). Each entry of T2 stores the base address of a page of the thirdlevel table (T3). Each entry of T3
stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1
MB 16 way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.
What
(A) 2
(B) 4
(C) 8
(D) 16

is

the

size

of

page

in

KB

in

Answer: (C)
Explanation:
Let the page size is of 'x' bits

Size of T1 = 2 ^ x bytes

(This is because T1 occupies exactly one page)

Now, number of entries in T1 = (2^x) / 4

(This is because each page table entry is 32 bits


or 4 bytes in size)

Number of entries in T1 = Number of second level


page tables

(Because each I-level page table entry stores the


base address of page of II-level page table)

Total size of second level page tables = ((2^x) / 4) * (2^x)

Similarly, number of entries in II-level page tables = Number


of III level page tables = ((2^x) / 4) * ((2^x) / 4)

this

computer?

(GATE

2013)

Total size of third level page tables = ((2^x) / 4) *


((2^x) / 4) * (2^x)

Similarly, total number of entries (pages) in all III-level


page tables = ((2^x) / 4) * ((2^x) / 4) * ((2^x) / 4)
= 2^(3x - 6)

Size of virtual memory = 2^46

Number of pages in virtual memory = (2^46) / (2^x) = 2^(46 - x)

Total number the pages in the III-level page tables =


Number of pages in virtual memory

2^(3x - 6) = 2^(46 - x)

3x - 6 = 46 - x

4x = 52
x = 13

That means, page size is of 13 bits


or Page size = 2^13 bytes = 8 KB

1. Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page
size is 4KB, what is the approximate size of the page table? (GATE 2001)
(a) 16 MB
(b) 8 MB
(c) 2 MB
(d) 24 MB
Answer: (c)
Explanation:
A page entry is used to get address of physical memory. Here we assume that single level of Paging is
happening. So the resulting page table will contain entries for all the pages of the Virtual address space.

Number of entries in page table =


(virtual address space size)/(page size)

Using above formula we can say that there will be 2^(32-12) = 2^20 entries in page table.
No. of bits required to address the 64MB Physical memory = 26.
So there will be 2^(26-12) = 2^14 page frames in the physical memory. And page table needs to store the
address of all these 2^14 page frames. Therefore, each page table entry will contain 14 bits address of
the page frame and 1 bit for valid-invalid bit.
Since memory is byte addressable. So we take that each page table entry is 16 bits i.e. 2 bytes long.
Size of page table =
(total number of page table entries) *(size of a page table entry)
= (2^20 *2) = 2MB

Anda mungkin juga menyukai