📜  门| GATE-CS-2015(Set 2)|第65章

📅  最后修改于: 2021-06-29 19:16:28             🧑  作者: Mango

计算机系统实现8 KB页和32位物理地址空间。每个页表条目都包含一个有效位,一个脏位和三个权限位以及转换。如果进程的页表的最大大小为24 MB,则系统支持的虚拟地址的长度为_______________位
(A) 36
(B) 32
(C) 28
(D) 40答案: (A)
解释:

Max size of virtual address can be calculated by 
calculating maximum number of page table entries.

Maximum Number of page table entries can be calculated 
using given maximum page table size and size of a page 
table entry.

Given maximum page table size = 24 MB

Let us calculate size of a page table entry.

A page table entry has following number of bits.
1 (valid bit) + 
1 (dirty bit) + 
3 (permission bits) + 
x bits to store physical address space of a page.

Value of x = (Total bits in physical address) - 
             (Total bits for addressing within a page)
Since size of a page is 8 kilobytes, total bits needed within
a page is 13.
So value of x = 32 - 13 = 19

Putting value of x, we get size of a page table entry =
                                   1 + 1 + 3  + 19 = 24bits.

Number of page table entries 
           = (Page Table Size) / (An entry size)
           =  (24 megabytes / 24 bits)                             
           =  223

Vrtual address Size 
             = (Number of page table entries) * (Page Size)
             =  223 * 8 kilobits
             = 236  
Therefore, length of virtual address space = 36

这个问题的测验