The main memory of a computer has 2 cm blocks while the cache has 2 c blocks. If the cache uses the set associative mapping scheme with 2 blocks per set, then block 'k' of the main memory maps to the set.
A
(kmod2cm)ofthecache
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
(kmodc)ofthecache
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
(kmodm)ofthecache
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
(kmod2c)ofthecache
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is B(kmodc)ofthecache
# of set in set associative cache
=#of blocks in cache#of blocks in one set
=2c2=c
# of sets in cache =c
Therefore, the block 'k' of the main memory maps to the set kmodc of the cache.