1,047 views
2 votes
2 votes
Consider a computer system that implements physical address of 26-bits and page size of 16 KB. The processor contains TLB which can hold 128 page table entries and is 4-way set associative. The maximum page table size is 8 MB. If the page table entry contains a valid bit,  a dirty bit, 2 page protection bit and translation, then the minimum TLB tag bits supported by the system is _________.

3 Answers

Best answer
3 votes
3 votes

Although it is not explicitly mentioned but it can be observed from the given information that the cache is virtually tagged instead of physically tagged. Thus we need to find the VA bits. 

Now VA = | PageNo | PageOffset |

We have Page Size = 16KB. Thus PageOffset = 14 bits

We need to calculate bits for PageNo. Now,

PageTableSize = NoOfPageTableEntry * PTE (Page table entry size)   - (1)

Now we need to calculate PTE size.

PA = 26 bits  | FrameNo | FrameOffset |

FrameOffset = PageOffset = 14 bits

Thus FrameNo = 12 bits

PTE = FrameBits + Valid + Dirty + Protection = 12 + 1 + 1 + 2  = 16 bits = 2 B

Substituting in equation (1)

8 MB = NoOfPageTableEntry  *  2 B

NoOfPageTableEntry = 4 M = 222

Now VA  = | 22 bits | 14 bits |

TLB entry = Total Cache Line(TCL) = 128 SetAssoc(SA) = 4 way

Total Set - TCL/SA = 25

VA  = | Tagbits | SetNo | BlockOffset |

      = |   17 bits       |  5   bits    |   14  bits           |

selected by
0 votes
0 votes

We are given maximum table size and page table entry from that we can find no. Of entries which is 222 . So the number of pages in sytem gives virtual adress as 22+14=36 bits. But for TLB only 22 bits are needed to search TLb.

Now bits required for set is 5 bcoz 128/4=32= 25.

There will be no offset here. 

Therefore answer is

22-5 = 17 bits for TAG.

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Mar 20
160 views
If Page size = Frame size is always true and offset in Logical address = offset in physical address holdsThen how/why Logical address size can come different than physica...
0 votes
0 votes
1 answer
2
0 votes
0 votes
2 answers
3
Unique_999 asked Aug 17, 2023
324 views
Can Any explain the relationship between The “ Word Size “ and “ Logical Address Space “