WebJun 28, 2024 · Answer: (C) Explanation: 2-way set associative cache memory, .i.e K = 2. No of sets is given as 4, i.e. S = 4 ( numbered 0 - 3 ) No of blocks in cache memory is given as 8, i.e. N =8 ( numbered from 0 -7) Each set in cache memory contains 2 blocks. The number of blocks in the main memory is 128, i.e M = 128. ( numbered from 0 -127) WebSince 64 bytes/line and size of cache line = size of main memory block, this means block offset = 6 bits. 2-way associative cache means that two lines in one set. number of sets = total cache lines/2 = (512KB/64)/2 = 2^12 , therefore 12 bits for set, and hence remaining 18 bits for the tag. Share Cite Follow answered Feb 20, 2024 at 18:03 Sumeet
caching - How many bits are needed needed for 2 way associative cache …
WebJul 7, 2014 · A two-way set-associative cache has lines of 16 bytes and a total size of 8 kbytes. The 64-Mbyte main memory is byte addressable. Show the format of main memory addresses. ... corresponding tag, cache set, and offset values for a two-way set-associative cache. Solution 6a WebApr 3, 2013 · The block-offset-bits need to be enough bits to index each byte in a cache-line (block). (So log-base-2 of the block-size.) The index-bits are used to decide which cache-line to look at (so needs to be log-base-2 of the number of cache lines.) The tag-bits are whatever is left over, and need to be compared to the tag on the cache line. lady and the tramp jock and trusty youtube
Concept of "block size" in a cache - Stack Overflow
WebDec 8, 2011 · Assuming 32-bit address, calculate the following values for a two-way set associative 32KB cache with 64B blocks (that is: S=32KB, B=64B, and A=2): The number of bits in the block offset. The number of "sets" in the cache. The total number of block frames in the cache. The number of index bits. The number of tag bits WebMay 13, 2024 · A direct-mapped cache is another name for a one-way set associative cache. Calculating number of bits in address space. Number of bits in address space = log2(Memory size) ... This means we definitely need those number of bits to access information from the cache and the remaining bits from the total address space can be … WebFeb 24, 2024 · m = v * k i= j mod v where i=cache set number j=main memory block number v=number of sets m=number of lines in the cache number of sets k=number of lines in each set . Application of Cache Memory: Usually, the cache memory can store a reasonable number of blocks at any given time, but this number is small compared to the … property for sale andorra