edited by
36,782 views
66 66 votes

A CPU generates $32$-bit virtual addresses. The page size is $4$ KB. The processor has a translation look-aside buffer (TLB) which can hold a total of $128$ page table entries and is $4$-way set associative. The minimum size of the TLB tag is:

  1. $\text{11 bits}$
  2. $\text{13 bits}$
  3. $\text{15 bits}$
  4. $\text{20 bits}$

6 Answers

Best answer
84 84 votes
The page size of $4$ KB. So, offset bits are $12$ bits.

So, the remaining bits of virtual address, $32 - 12 = 20$ bits, will be used for indexing.

Number of sets $= 128/4 = 32 (4$-way set$)  \implies 5$ bits.

So, tag bits $= 20 - 5 = 15$ bits.

Correct option C.
edited by
20 20 votes

The size of virtual address is 32,now page size is 4KB given or,number of bits for offset is 12(2^12=4KB).

                                        Page(20bits)                                              OFFSET(12bits)

Now for TLB header is as:

TAG(y bits) SET(x bits) OFFSET(12bits)

Now the set is given as 4 way set associative,and it can hold 128 entries,

Now to divide 128 entries into 4 sets,number of bits required to do so:

set bits(x)=$128(or,2^7)/(4(or,2^2)))$ 

hence sets bits would be: 5

therefore:

$y+5+12=32$

or,$y=15 bits$

Hence option C is correct

 

2 2 votes
We have a total of 2$^{32}$ memory locations each of 1 B and we are grouping 2$^{12}$ entries each of 1 B. so we will have 2$^{20}$ chunks.Now these chunks are stored in the physical memory and in order to keep track of them we need the page table.to enhance the searching we are using the TLB which has 128 page table entries designed as a 4 way set associative TLB so the number of bits for set offset will be 2$^{5}$ .Earlier we have calculated that no of pages = 2$^{20}$ which is the number of page table entries as well.
So we will divide this 20 into 5 for set offset and rest 15 for the TLB tag bits

Hence option c is correct
1 1 vote

This question very similar to "Calculating Tag bits for 4-way set Associative cache"

Block = Page to draw parallels. Actually TLB concept as a whole is related to cache. 

Similar parallels in Heirarchical cache AMAT and AMAT involving TLB

0 0 votes
32 bit (VAS)
2012 
 

20 bits are used to acces the page table which is in the main memory . But in the case of TLB these 20 bits are used to access the TLB . 

 
Now as the TLB has 128 entries and is 4 way set associative which means that each set has 4 entries hence the number of sets in TLB is 128/4 = 32 
32 sets need 5 bits to get addressed.
 
therefore the TLB address bits division will look like: 
                                                               20(bits needed to access TLB)
15 
 therefore 15 bits are used for tag. 
Note: when mapping is done then multiple page table entries gets mapped to 1 set or enty of TLB depending on the kind of mapping. To diffrentiate between these multiple entries tag bits are used.
Therefore Tag stores the tag for all the Entries.

 

0 0 votes
32 bit (VAS)
2012 
 

20 bits are used to acces the page table which is in the main memory . But in the case of TLB these 20 bits are used to access the TLB . 

 
Now as the TLB has 128 entries and is 4 way set associative which means that each set has 4 entries hence the number of sets in TLB is 128/4 = 32 
32 sets need 5 bits to get addressed.
20-5=15
 therefore 15 bits are used for tag. 
Note: when mapping is done then multiple page table entries gets mapped to 1 set or enty of TLB depending on the kind of mapping. To diffrentiate between these multiple entries tag bits are used.
Therefore Tag stores the tag for all the Entries.

 

Answer:
Position:
Show:

Related questions

83 83 votes
7 answers 7 answers
40.3k
40.3k views
Rucha Shelke asked Sep 18, 2014
40,261 views
Consider the following statements about the context free grammar$$G = \left \{ S \rightarrow SS, S \rightarrow ab, S \rightarrow ba, S \rightarrow \epsilon \right \} $$$G...
77 77 votes
10 answers 10 answers
44.3k
44.3k views
Rucha Shelke asked Sep 26, 2014
44,297 views
Consider the following recurrence:$ T(n)=2T\left ( \sqrt{n}\right )+1,$ $T(1)=1$Which one of the following is true?$ T(n)=\Theta (\log\log n)$$ T(n)=\Theta (\log n)$$ T(n...
88 88 votes
7 answers 7 answers
38.2k
38.2k views
Rucha Shelke asked Sep 26, 2014
38,192 views
A computer system supports $32$-bit virtual addresses as well as $32$-bit physical addresses. Since the virtual address space is of the same size as the physical address ...
39 39 votes
5 answers 5 answers
27.6k
27.6k views
Kathleen asked Sep 21, 2014
27,556 views
Consider a disk pack with $16$ surfaces, $128$ tracks per surface and $256$ sectors per track. $512$ bytes of data are stored in a bit serial manner in a sector. The capa...