retagged by
5,286 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.
retagged by

4 Answers

Best answer
9 votes
9 votes
$\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
Answer:

Related questions

13 votes
13 votes
5 answers
3
Arjun asked Feb 18, 2021
8,021 views
In an undirected connected planar graph $G$, there are eight vertices and five faces. The number of edges in $G$ is _________.
8 votes
8 votes
3 answers
4
Arjun asked Feb 18, 2021
10,695 views
Consider the following undirected graph with edge weights as shown:The number of minimum-weight spanning trees of the graph is ___________.