简体   繁体   English

虚拟索引的物理标记缓存多级页表-分层分页

[英]Virtually indexed physically tagged cache Multi-level page tables - hierarchical paging

A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. 计算机使用46位虚拟地址,32位物理地址和三级分页页表组织。 The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. 页表基址寄存器存储正好占据一页的第一级表(T1)的基地址。 Each entry of T1 stores the base address of a page of the second-level table (T2). T1的每个条目存储第二级表(T2)的页面的基地址。 Each entry of T2 stores the base address of a page of the third-level table (T3). T2的每个条目存储第三级表(T3)页面的基地址。 Each entry of T3 stores a page table entry (PTE). T3的每个条目都存储一个页表条目(PTE)。 The PTE is 32 bits in size. PTE的大小为32位。 The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. 计算机中使用的处理器具有1 MB的16路组关联虚拟索引物理标记的缓存。 The cache block size is 64 bytes. 缓存块大小为64个字节。

Q.What is the size of a page in KB in this computer? 问:这台计算机的页面大小以KB为单位?

(A) 2 (B) 4 (C) 8 (D) 16 (A)2(B)4(C)8(D)16

Q.What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer? 问:要保证没有两个同义词映射到此计算机的处理器缓存中的不同集合,最少需要多少页颜色?

(A) 2 (B) 4 (C) 8 (D) 16 (A)2(B)4(C)8(D)16

A question from last Gate exam . 最后一次Gate考试的一个问题。 how do I solve this kind of question? 我该如何解决这类问题?

All the page table reside in the physical memory(RAM) since the physical address is 32 bit addressable each level table holds a 32 bit (4 byte)address of the RAM 所有页表都驻留在物理内存(RAM)中,因为物理地址是32位可寻址的,每个级别表都拥有RAM的32位(4字节)地址

Assume the size of a page is x bytes. 假设页面的大小为x字节。 (which we need to find) (我们需要找到)

As the size of level 1 table is also x (as given in the question that level 1 table accommodate exactly a page)it can hold x/4 base addresses of x/4 level 2 tables (which also accommodate exactly a page) and each level 2 table hold base addresses of x/4 level 3 tables. 由于1级表的大小也为x(如1级表恰好容纳一个页面的问题所示),因此它可以容纳x / 4个2级表(也恰好容纳一个页面)的x / 4基地址,并且每个2级表包含x / 4 3级表的基地址。

the level 3 table has entities equal to 2^46/x 3级表的实体等于2 ^ 46 / x

ie. 即。 (x/4) (x/4) (x/4) = 2^46/x (x / 4) (x / 4) (x / 4)= 2 ^ 46 / x

on solving x=8192 which is in bytes so 8192/1024 = 8 K bytes 在解决x = 8192(以字节为单位)时,8192/1024 = 8 K字节

第二部分的答案....由于其实际索引和物理标记,因此对于高速缓存,L个组位和B个字节位可以容纳Ram的整页以进行有效使用,因此对于有效使用,我们的缓存大小为/ 2 ^ A = 2 ^ l + b =页面大小................ http://cseweb.ucsd.edu/classes/fa10/cse240a/pdf/08/CSE240A-MBT-L18-VirtualMemory .ppt.pdf页面大小= 1 MB / 16 = 64 KB .........因此,缓存将在相同的l + b位上复制8个不同的页面,因此我们将对8个页面进行着色以区分它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM