📜  操作系统|内存管理|问题10

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

考虑以上问题中给出的数据。要保证没有两个同义词映射到该计算机的处理器缓存中的不同集合,页面颜色的最少数量是多少? (GATE CS 2013)
(A) 2
(B) 4
(C) 8
(D) 16答案: (C)
解释:

1 MB 16-way set associative virtually indexed physically tagged cache(VIPT). 
The cache block size is 64 bytes.

No of blocks is 2^20/2^6 = 2^14.

No of sets is 2^14/2^4 = 2^10.

VA(46)
+-------------------------------+
tag(30) , Set(10) , block offset(6)
+-------------------------------+

In VIPT if the no. of bits of page offset = 
                  (Set+block offset) then only one page color is sufficient.

but we need 8 colors because the number bits where the cache set index and 
physical page number over lap is 3 so 2^3 page colors is required.(option 
c is ans). 

这个问题的测验