Memory Flashcards
What is:
Physical memory
Volatile memory
Non Volatile memory
The memory that exists on the hardware of a computer chip
Memory that doesn’t persist (when a power supply is cut off, the memory disappears)
Memory that does persist even when the power supply is cut off
What are the different types of non-volatile memory
Read only
- Program written / burned at time to manufacture
- Expensive to design, cheap to mass produce
One Time Programable memory (Programmable Read Only Memory)
- Comes with blank space - once written on once, can’t be written over
- cheap to manufacture
Programmable Non Volatile Memory
- programs written to this form of memory can be overwritten but they still persist even if the power supply is cut off
What are the different types of volatile memory and what do they mean
Dynamic Random Access Memory
-High Density (can store more things relative to size)
- capacitators are charged (1) or discharged (0) to represent data
- doesn’t need continuous power supply
- Slower to Access
Static Random Access Memory
- lower density, more ‘expensive’ to store things
- faster access
- 1 and 0 values of capacitors only maintained whilst there is a power supply
What is cycle time
time to find, access, read data into the system bus & be ready for next request (determines /limits performance of CPU)
What are different techniques to improve memory access time?
Increase memory Bandwidth
- from 8 bits to 16 or 32
- allows more data to be accessed at one time
Use burst mode access
- If items to retrieve are consecutive can send just row & column address to the DRAM and then the rest of the items are red consecutively - saving the clock cycles used to send more addresses (can mix with single cycle depending on the type of data)
Page mode access
- Sending the row number once and then the column numbers for that row
- Can send the column numbers in any order (unlike burst mode)
- Have to send the column number (resulting in more clock cycles than burst mode)
-Semi random - like many programs
What is cache and how does it improve memory performance
Programs often use a small amount of their code multiple times
Cache utilises a small amount of SRAM (fast access but expensive) and a large amount of DRAM (slower access but can hold more relative to size)
When a particular bit of data is needed, the sram is checked first - if it’s not there then the DRAM is checked and the code copied from the SRAM to the DRAM - this means if there are some bits of data used regularly - more often than not they’ll be available in the SRAM
What is a multilevel cache
on chip cache and external memory
on chip cache can be split into dual cache (data & instruction)
if on chip cache - can fetch data / instruction at same time - if one available on chip and one externally can also fetch at same time
if both data & instruction needed externally - clash
What is a replacement policy and how is it relevant to a cache
Used to decide what should be replaced in the cache and what shouldn’t:
Least Frequently Used
Least Recently Used
FIFO
Random Replacement
What are examples of Writeback policies and when are they used?
Delayed Writeback
- Written to the cache only - DRAM is not updated unless memories are being deleted from the cache
- faster (saves cycles)
- DRAM memories go stale and if fetched by another process - could cause issues
Cache Write Through
- all memory written to the cache is written to long term memory - meaning it’s fully coherent
Give 2 examples of situations where memory should not be cached
- I/O devices where the information needs to be updated regularly e.g. the status of caps lock key
- where two processes have access to the same area of memory but not to the same cache