Content deleted Content added
m Open access bot: doi added to citation with #oabot. |
Ira Leviton (talk | contribs) m Fixed a typo found with Wikipedia:Typo_Team/moss. |
||
Line 106:
Consider a main memory of 16 kilobytes, which is organized as 4-byte blocks, and a 2-way set-associative cache of 256 bytes with a block size of 4 bytes. Because the main memory is 16kB, we need a minimum of 14 bits to uniquely represent a memory address.
Since each cache block is of size 4 bytes and is 2-way set-associative, the total number of sets in the cache is 256/(4 * 2), which equals 32 sets.
[[File:Set-Associative Cache Snehal Img.png|thumb|578x578px|Set-Associative Cache]] The incoming address to the cache is divided into bits for Offset, Index and Tag. * ''Offset'' corresponds to the bits used to determine the byte to be accessed from the cache line. Because the cache lines are 4 bytes long, there are ''2 offset bits''.
|