计算机系统实现 8 KB 页面和 32 位物理地址空间。每个页表条目包含一个有效位、一个脏位、三个权限位和转换。如果一个进程的页表最大大小为24MB,则系统支持的虚拟地址长度为_______________位
(一) 36
(乙) 32
(三) 28
(四) 40答案:(一)
解释:
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
这个问题的测验