Lecture 07 Flashcards
What is virtual memory?
When two or more levels of memory hierarchy are made to look like one.
You get the speed of the top level, and the size of the bottom level.
What decade was virtual memory invented in?
The 1960s
What positive effect does virtual memory have on multi-processing?
Each process can be given its own virtual address space, which means a stray pointer in one process cannot harm another one.
When caching, what is a line?
A chunk that data has been divided into.
When caching, what are addresses split into?
A chunk identifier and an offset within the chunk.
What are the main steps involving the cache to perform when a user accesses data?
- Look up the chunk identifier to see if it’s in fast memory, and where
- If not:
- Find or make space in the fast memory
- Transfer the chunk from slow memory
What is ‘Spatial Locality’?
Memory being accessed is often near memory accessed recently.
Chunk size is often chosen to exploit this.
What is ‘Temporal Locality’?
Accesses to the same area of memory tend to be grouped in time.
In a Direct Mapped Cache, how many different places could a given chunk be in?
1.
Multiple chunks may map to the same place, however.
In a Fully Associative Cache, how many different places can a given chunk be in?
A chunk in a FAC can be placed anywhere.
What is the typical line length of a Fully Associative Cache?
4 KiB
They can, however, be much bigger.
What do the least significant 12 bits represent in the address of a line of a Fully Associative Cache?
The chunk’s offset within the line.
How does a Fully Associative Cache know if a chunk is in fast memory?
It compares a chunk’s tag and offset against a lookup table which stores everything that’s in the cache.
What is it called when a cache gets rid of something?
Evict
What are the three sections that a Direct Mapped Cache address is split into?
What is each section used for?
Offset - Length determines the length of a line
Index - Length determines the number of lines in a cache
Tag - Whatever remains