Arch: Memory Flashcards
SRAM and DRAM access times
- SRAM: 0.5 to 2.5 ns
- DRAM: 50 to 70 ns
Access times for Flash and disk drives
- Flash: 5000 to 50,000 ns
- disk drive: 5,000,000 - 20,000,000 ns
Memory hierarchy of a computer in ascending order?
Fastest to slowest
- Registers
- Caches ( 3 levels )
- RAM
- SSD
- HDD
Storage for registers, SSDs and HDDs
- Registers: 100s of bytes
- SDD: few 100s of GBs
- HDD: few TBs
Different levels of caches and their storage sizes
- Level 1 cache: 10x kbs
- Level 2 cache: 100x kbs
- Level 3 cache: 1000x kbs
What is nearline storage?
Archives of tapes controlled by robot.
Why do fast processors need to be small in size?
Why is there a hierarchy in the different types of memory.
If a processor has a clock cycle of 4GHz ( 4 billion clock cycles in 1 second ), then it can complete one clock cycle in about .25 nano seconds ( after doing the math ). Light can travel about 7.5 cm in that time (.25 ns) which is the time taken for one clock cycle. The speed of electric signals is about 2/3 of that of light at the best. Therefore, the farthest it can travel is about (2/3) * 7.5 = 5cm for one clock cycle. Therefore, the smaller the size, the less distance is to be travelled.
What are some other factors ( 7 ) that are to be considered while designing a process apart from speed.
- Access Paradigms: serial vs random access
- Writeability: write once , rewrite-able
- Energy usage while idle and in use
- Volatility: persistent data even when the power is off
- latency vs bandwidth
- density: space requirements
- dependability and error correction
Most efficient way to make use of the memory technologies?
- Keep most frequently used data in the fast memory
- Everything else to be kept in the slow memory.
Disadvanatages of keeping a working copy of the data in the fast memory.
- Need to maintain 2 copies of the data
- Keeping them consistent is complex
What is the concept of virtual memory and how does it work?
Virtual memory is the concept of using disks to create the illusion of extra RAM .
Combines:
- Speed of the top level
- Size of the bottom level
Apart from extra RAM, what else is virtual memory used for and what are the drawbacks?
Virtual memory is also used for multi-tasking as each process gets its own virtual address space
Need to make sure that there is protection by making sure that stray pointers in one V address space cannot access another address space
What are the basics of caching.
In caching, data is split into small chunks or lines or pages
The address is split into a chunk identifier and an offset which refers to data within chunks
How does caching work?
Data is divided into chunks for caching and some of these chunks are stored within the fast memory. When the user tries to access a chunk of data, one of 2 things can happen.
- The chunk is present in the fast memory, then find where exactly in the fast memory and then access it from there.
- Otherwise, it is not present in the fast memory then make space for it in the fast memory, get the chunk from the slow memory and store it in the fast memory and access it from there.
What is spatial locality?
Memory that is accessed is often near memory that was accessed recently
Give an example