Questions tagged [cpu-cache]
A fast memory limited in space close to the CPU. A cache is designed to reduce the average time to access memory.
16
questions
7
votes
1
answer
22k
views
Tag, index and offset of associative cache
My main issue of a homework problem is trying to figure out the different parts of the chart. I have a 3 way set associative cache with 2 word blocks, total size of 24 words. I am given $3, 180, 43, 2,...
2
votes
0
answers
2k
views
Will this address result in a cache hit or miss for these cache mapping functions?
The Problem: A CPU produces the following sequence of read addresses in hex.
Suppose the cache is empty to begin with and assuming an LRU replacement, determine whether each address ...
0
votes
0
answers
87
views
Is this cache entry a hit or a miss? [duplicate]
The Problem: A CPU produces the following sequence of read addresses in hex. Suppose the cache is empty to begin with and assuming an LRU replacement, determine whether each address produces a hit or ...
63
votes
2
answers
27k
views
What happens to the cache contents on a context switch?
In a multicore processor, what happens to the contents of a core's cache (say L1) when a context switch occurs on that cache?
Is the behaviour dependent on the architecture or is it a general ...
24
votes
5
answers
303k
views
How to calculate the number of tag, index and offset bits of different caches?
Specifically:
1) A direct-mapped cache with 4096 blocks/lines in which each block has 8 32-bit words. How many bits are needed for the tag and index fields, assuming a 32-bit address?
2) Same ...
15
votes
1
answer
21k
views
How does a TLB and data cache work?
I'm trying to study for an exam and I realized I'm confused about how the TLB and data cache work.
I understand that the TLB is essentially a cache of most recently used physical addresses. However, ...
38
votes
2
answers
2k
views
Are generational garbage collectors inherently cache-friendly?
A typical generational garbage collector keeps recently allocated data in a separate memory region. In typical programs, a lot of data is short-lived, so collecting young garbage (a minor GC cycle) ...
3
votes
1
answer
2k
views
Understanding the basic concepts in memory organisation
(Before actually proceeding to the question, I want to confess that this is a homework question, please do consider it and help me in improving my understanding a bit more.)
I have recently started ...
9
votes
1
answer
2k
views
Why is quiescent consistency compositional, but sequential consistency is not
I'm having trouble in comparing these two memory consistency models.
Essentially for sequential consistency I think of real code like this:
...
14
votes
1
answer
395
views
Research on evaluating the performance of cache-obliviousness in practice
Cache-oblivious algorithms and data structures are a rather new thing, introduced by Frigo et al. in Cache-oblivious algorithms, 1999. Prokop's thesis from the same year introduces the early ideas as ...
4
votes
2
answers
17k
views
Cache effective access time calculation
In order to calculate the effective access time of a memory sub-system, I see some different approaches, a.k.a formulas. All are reasonable, but I don't know how they differ and what is the correct ...
2
votes
1
answer
11k
views
Hit/Miss in a 2-way set associative cache with offset
"In a 2-way set associative cache of 4 blocks containing 4 words each, which one of these addresses will return a hit when being read? The blocks to be retained in the cache are decided by LRU."
4 ...
1
vote
2
answers
2k
views
Understanding Multilevel Caches
I'm reading multi-level cache and came across a question through which i got confused. I've read that
Between processor and Cache Word/ Byte is transfered
Between Cache and Main memory Block(...
1
vote
1
answer
462
views
Loading a word from a byte addressed cache
In a cache with byte addressing, the byte you want to load is selected using the block offset. But what if I execute a LW instruction and don't want a single byte but a full 32 bit word?
Is there ...
0
votes
1
answer
2k
views
How many bits would be needed for the byte?
The Problem: A high speed workstation has 64 bit words and 64 bit addresses with address resolution at the byte level. Assuming a direct mapped cache with 8192 64 byte lines, how many bits are in ...
0
votes
4
answers
214
views
Compiler instructions to sync core caches: are they really needed?
I have read reviews of this book, and quote the following from one of the reviews (emphasis mine):
Other than straining your eyes with old-styled C++, you can read such
misconceptions in the book ...