TLB following entries. Your TLB is 2-way set associative and holds 8 translation
ID: 3895935 • Letter: T
Question
TLB following entries. Your TLB is 2-way set associative and holds 8 translations. It has the Virtual memory address consist of 32 bits with a 12 bit page offset. . The virtual page number tag in the TLB excludes the 2 bit index and therefore is 18 bits. . The 18 bit tag is shown in the TLB table below in the form: ftop 16 bits in hex (0xXXXX), bottom 2 bits (bXX) in binary) . The physical page number consist of 28 bits. Index II Virtual Page # Tag | Physical Page # Tag || Virtual Page # Tag | Physical Page # Tag 0x5CDD, b01 0xA667, b10 0x1265, b10 0x6D90, b11 0 0x4227, b10 0x0000, b00 0xCCD3, b01 0xF23F, b01 0x1234567 0x345df44 0xDBD234D OxAB578BC 0x7642867 0x2345647 0x234BDCE 0x0187109 (a) Fill out the rightmost column of the memory access table below to denote whether the memory access was a hit or a miss in the TLB. The cache uses an LRU replacement policy, and you may assume that to start with, the right entry is the least recently used. Virtual Mem AccessResult (Physical Mem Address) Hit/Miss 0x42278000 0x00001077 0x8703C12E 0x5CDD4AD2 0x339541DO OxBEEDDO 20 0xA667B9DC 0xCCD35293 0x1234567000 0x345DF44077 0x764286712E 0x7642867 AD2 0xDB32D781DO 0x3092834020 0x23456479DC 0xDBD234D293 (b) What are the contents of the TLB after processing the page accesses from (a)? Index 0 Virt Page # Tag | Phys Page # Tag || Virt Page # Tag | Phys Page # Tag 2 3Explanation / Answer
For 0x42278000 take 5th hex i.e. 8 =1000. Out of 4 bit of 5th hex value, first two are tag bit and last two are index, so here index is 00 i.e. 0 line in cache. Now take tag (0x4227,b10) are compare with each set of 0th index. Here matchs with first set. So hit.
Do the same for all address.
Detailed Explaination
Given:
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x4227,b10}
0x1234567
{0x5CDD,b01}
0x7624867
1
{0x0000,b00}
0x345df44
{0xA667,b10}
0x2345647
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Now access 0x42278000
0100 0010 0010 0111 10 00 : tag=4227,b10 in 0th index
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x4227,b10}
0x1234567
{0x5CDD,b01}
0x7624867
1
{0x0000,b00}
0x345df44
{0xA667,b10}
0x2345647
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Access 0x00001077
0000 0000 0000 0000 00 01 :tag=0000,b00 index = 01 hit
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x4227,b10}
0x1234567
{0x5CDD,b01}
0x7624867
1
{0x0000,b00}
0x345df44
{0xA667,b10}
0x2345647
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Access 0x8703C12E
1000 0111 0000 0011 11 00 : tag = 8703,b11 index= 0 ,here 0 th index of cache doesn’t contain {0x8703,b11} so miss .
Now bring {0x8703,b11} to cache
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x4227,b10}
0x1234567
{0x8703,b11}
0x7624867
1
{0x0000,b00}
0x345df44
{0xA667,b10}
0x2345647
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Access 0x5CDD4Ad2
0101 1100 1101 1101 01 00 tag={5CDD,b01} index 00, here 0 th index of cache doesn’t contain {{5CDD,b01} so miss .
Now bring {5CDD,b01} to cache .
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x5CDD,b01}
0x7642867
{0x8703,b11}
0x7624867
1
{0x0000,b00}
0x345df44
{0xA667,b10}
0x2345647
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Access 0x339541D0
0011 0011 1001 0101 01 00 : tag ={0x3395,b01} index 00, here 0 th index of cache doesn’t contain {0x3395,b01} so miss .
Now bring {0x3395,b01} to cache .
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x5CDD,b01}
0x7642867
{0x3395,b01}
0xDB32D78
1
{0x0000,b00}
0x345df44
{0xA667,b10}
0x2345647
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Access 0xBEEDD020
1011 1110 1110 1101 11 01 : tag = {BEED,b11} index 01, here 1st index of cache doesn’t contain {0xBEED,b11} so miss .
Now bring {0xBEED,b11} to cache .
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x5CDD,b01}
0x7642867
{0x3395,b01}
0xDB32D78
1
{0x0000,b00}
0x345df44
{0xBEED,b11}
0x3092834
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xF23F,b01}
0xAB578BC
{0x6D90,b11}
0x0187109
Access 0xA667B9DC
1010 0110 0110 0111 10 11 : {A667,b10} index =3, here 3rd index of cache doesn’t contain {0xA667,b10} so miss .
Now bring {0xA667,b10} to cache.
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x5CDD,b01}
0x7642867
{0x3395,b01}
0xDB32D78
1
{0x0000,b00}
0x345df44
{0xBEED,b11}
0x3092834
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xA667,b10}
0x2345647
{0x6D90,b11}
0x0187109
Access 0xCCD35293
1100 1100 1101 0011 01 01 : tag ={CCD3,b01} index = 1st index,here 3rd index of cache doesn’t contain {0xCCD3,b01} so miss .
Now bring {0xCCD3,b01} to cache.
Cache after this operation
Index
Virtual Page # Tag
Physical Page # Tag
Virtual Page # Tag
Physical Page # Tag
0
{0x5CDD,b01}
0x7642867
{0x3395,b01}
0xDB32D78
1
{0xCCD3,b01}
0xDBD234D
{0xBEED,b11}
0x3092834
2
{0xCCD3,b01}
0xDBD234D
{0x1265,b10}
0x234BDCE
3
{0xA667,b10}
0x2345647
{0x6D90,b11}
0x0187109
THUMBS UP IF YOU ARE SATISFIED WITH THE ANSWER OTHERWISE REPLY WITH YOUR QUERIES.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.