retagged by
288 views

1 Answer

Best answer
3 votes
3 votes

Given Physical address (Main memory address) is 36 bits

Physical address space (Main memory size) = $2^{36}$ Bytes

The Block Size is given as 128 Bytes = $2^{7}$ Bytes

The Total no of blocks in Main memory = $\frac{ 2^{36}B }{2^{7}B}$ = $2^{29}$ Blocks

Cache size is given to be 64 KB so the no of lines (Blocks) in Cache =  $\frac{ 64KB }{2^{7}B}$ = $\frac{ 2^{16}B }{2^{7}B}$

                                                                                                             =  $2^{9}$ Lines

The minimum tag bit size can be achieved when the cache uses Direct Mapping..

The maximum tag bit size can be achieved when the cache uses Fully Associative Mapping..

 

              

               

 

From the above example we can clearly visualize that the tag bits size gets reduced when we use

Direct mapping  as we map each block of main memory to a particular Cache line using Line bits

whereas in Fully associative...any block can be mapped to any Cache line as there are no Line bits…

Here in this question….

                                           

 

The Tag bits size in Fully associative = Main memory address bits – Block offset

                                                           = 36 – 7

                                                           = 29 bits

The Tag bits size in Direct Mapping = Main memory address bits – (Line bits + Block offset)

                                                           = 36 – (9 + 7)

                                                           = 20 bits

The Difference in the size = 29 – 20 = 9 bits

selected by

Related questions

198
views
1 answers
1 votes
lovish_bhatia asked Dec 13, 2023
198 views
please explain this question
325
views
1 answers
2 votes
lovish_bhatia asked Aug 27, 2023
325 views
Assume a computer has a 32-bit address. Each block stores 64 bytes. A direct mapped cache has 512 blocks. In which block of cache would we look for each of the following ...
632
views
0 answers
0 votes
Pranavpurkar asked Sep 27, 2022
632 views
Consider a string is stored in a word addressable memory where each word is of 4 Bytes. If the string starts at 100 and ends at 104 then which of the following can be the...
575
views
0 answers
0 votes
Pranavpurkar asked Sep 27, 2022
575 views
Which of the following is/are true regarding the following code snippet?1:int *p;2:p = &q; A)*p gives faster retrieval of information than q.B)The size of p is same as si...