Memory Hierarchy and Caching Flashcards
what does the kernel do in the context of memory hierarchy?
kernel facilitates process execution via numerous abstractions
what abstracts functions of the cpu?
exceptional control flow and process management
what are characteristics and pros and cons of SRAM?
Data is stable as long as power is applied, It is complex and expensive but fast.
what are characteristics and pros and cons of DRAM?
Much denser & cheaper than SRAM
Requires period “refresh” @ 64ms
what are characteristics and pros and cons of NVRAM?
Non-Volatile-Random-Access Memory
-Data persists without power
Updates may require block erasure
- Flash has limited writes per block (100K+)
What process is used to cache data to SRAM?
- CPU requests data at memory address k
- Fetch data from DRAM (or lower)
- Cache data in SRAM for later use
What type of concern is caching?
Hardware level , job of Memory Unit Management.
what should we do when a cache collision occurs ?
Evict the old mapping direct mapping
What type of requests are usually cache requests?
They are read requests
what happens with cache on a write request?
It does not really need data from the memory.
What are the two types of write hits?
- Write through- updates memory and cache
- Write back: Updates cache only
What are the two kinds of write miss?
- Write around- updates memory only
- Write allocate- allocate space in cache for data then write hit
Which policy would require data-to-be-evicted
to be written back to memory first?
Write back policy
which policies allow the cache to absorb multiple writes to memory?
write- back and write allocate
why would you ever want write-through /
write-around?
to minimize cache complexity