{"id":153990,"date":"2023-08-02T10:36:37","date_gmt":"2023-08-02T05:06:37","guid":{"rendered":"https:\/\/www.gkseries.com\/blog\/?p=153990"},"modified":"2023-08-02T10:36:39","modified_gmt":"2023-08-02T05:06:39","slug":"a-certain-processor-uses-a-fully-associative-cache-of-size-16-kb-the-cache-block-size-is-16-bytes-assume-that-the-main-memory-is-byte-addressable-and-uses-a-32-bit-address","status":"publish","type":"post","link":"https:\/\/www.gkseries.com\/blog\/a-certain-processor-uses-a-fully-associative-cache-of-size-16-kb-the-cache-block-size-is-16-bytes-assume-that-the-main-memory-is-byte-addressable-and-uses-a-32-bit-address\/","title":{"rendered":"A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address"},"content":{"rendered":"\n<p>Q. A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the <em>Tag <\/em>and the <em>Index <\/em>fields respectively in the addresses generated by the processor?<\/p>\n\n\n\n<p>(A) 24 bits and 0 bits<\/p>\n\n\n\n<p>(B) 28 bits and 4 bits<\/p>\n\n\n\n<p>(C) 24 bits and 4 bits<\/p>\n\n\n\n<p>(D) 28 bits and 0 bits<\/p>\n\n\n\n<p>Ans: 28 bits and 0 bits<\/p>\n\n\n\n<p>Solution:<\/p>\n\n\n\n<p>Given cache block size is 16 bytes, so block or word offset is 4 bits. Fully associative cache of size 16 kB, so line offset should be,<\/p>\n\n\n\n<p>= cache size \/ block size<\/p>\n\n\n\n<p>= 16 kB \/ 16 B<\/p>\n\n\n\n<p>= 1 k<\/p>\n\n\n\n<p>= 1024<\/p>\n\n\n\n<p>= 10 bits Line or Index Offset<\/p>\n\n\n\n<p>Tag bit size would be,<\/p>\n\n\n\n<p>= processor address size &#8211; (line offset + word offset)<\/p>\n\n\n\n<p>= 32 &#8211; 10 &#8211; 4<\/p>\n\n\n\n<p>= 18 bits tag size<\/p>\n\n\n\n<p>Since, there no option matches, but if we assume that Line Offset is a part of Tag bits, therefore,<\/p>\n\n\n\n<p>Tag bits = 18+10 = 28 bits<\/p>\n\n\n\n<p>Line or Index offset = 0 bits (since fully associative cache memory),<\/p>\n\n\n\n<p>Word or block offset = 4 bits<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q. A certain processor uses a fully associative cache of size 16 kB. The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor? (A) 24 [&hellip;]<\/p>\n","protected":false},"author":419,"featured_media":153991,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5141],"tags":[5140],"offerexpiration":[],"class_list":["post-153990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gate","tag-gate-questions"],"_links":{"self":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/153990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/users\/419"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/comments?post=153990"}],"version-history":[{"count":1,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/153990\/revisions"}],"predecessor-version":[{"id":153992,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/153990\/revisions\/153992"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media\/153991"}],"wp:attachment":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media?parent=153990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/categories?post=153990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/tags?post=153990"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/offerexpiration?post=153990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}