in CO and Architecture retagged by
5,288 views
3 votes
3 votes
Consider a computer system with a byte-addressable primary memory of size $2^{32}$ bytes. Assume the computer system has a direct-mapped cache of size $\text{32 KB}$ ($\text{1 KB}$ = $2^{10}$ bytes), and each cache block is of size $64$ bytes.

The size of the tag field is __________ bits.
in CO and Architecture retagged by
by
5.3k views

1 comment

GO to the Root of Concept: Video Explanation with timestamp: Many Questions on Direct Mapped Cache Memory From Standard Universities | With NOTES | COA

3
3

4 Answers

9 votes
9 votes
Best answer
$\text{Tag bits} = \text{PAS}_{bits} – \log_2 (\text{Cache Size})  +  \log_2 (K)$  (where $K$ is associativity)

$\qquad = 32 - 15 + 0 = 17\; \text{bits}$
selected by
4 votes
4 votes

ANS IS 17

GIVEN DATA MAIN MEMORY = 4GB, CACHE MEMORY = 32 KB SO TAG FIELD WILL BE 17 BITS

 

2 votes
2 votes

Given that: for direct mapping technique;

  1. Main memory size= $2^{32}$ byte $\implies PAS=log_22^{32}=32$ bit
  2. Cache memory size(CM’s) = $32KB \implies 2^{15}$ B
  3. Block size/word offset = $64$ byte

we know that $N=\frac{CM’S}{B’S}$

$\therefore$ $N=\frac{2^{15}}{2^6}=2^9B$

so CLO= $\log_2N\implies \log_22^9=9$ bit

Block size= $\log_2B’S\implies \log_22^6=6$ bit

$\therefore$ tag bit= PAS-(CLO+B’S)

$\implies$Tag=32-(9+6) bit

$\implies$Tag= 17 bits.

so tag bit size in given problem is $17$ bits.

Note: same concept asked in GATE CSE 2017 Set 2 | Question: 53

edited by
0 votes
0 votes
Given, Direct mapped cache

Main memory size =2^32 byte

cache block size =64 byte

                              =2^6 byte

Cache size          =32KB

                              =2^5 *2^10 Byte

                              =2^15 Byte

Number of lines in cache = Cache size / Block size

                                            = 2^15 / 2^6

                                            = 2^9

Main memory in bits = Tag space + line offset + Block offset in bits

                     32  bits = tag space + 9 bits +6 bits  

                    tag size = 32-9-6

                    tag size = 17
by
Answer:

Related questions