17 Memory(NOT ASSESSED) Flashcards
HighRisc microprocessor – Harvard architecture
The performance of a computer depends on aspects such as:
- Instruction Set Architecture
- RISC/CISC
- Clock frequency
- Memory technology
- Memory level
Memory hierarchy and technology?
ROM
BIOS • non-volatile • fast access • made of transistors
SRAM
needs power to retain the data • typically made of CMOS transistors • accessed very quickly • volatile
DRAM (DDR2, DDR3, DDR4)
made of capacitor • needs periodic capacitor charge • slow access compared to SRAM • volatile
Non-volatile
magnetic, optical disks (slow access) • flash memory, fast access • reprogrammed multiple times
Location of ROM,SRAM DRAM NonVolitile
Memory sizes for different types?
Retrieving data with the memory hierarchy
Memory system performance metrics
hit: the requested data resides in a given level of memory
miss: the requested data is not located in a given level of memory
hit rate: the percentage of memory accesses found in a given level of memory
hit miss: the percentage of memory accesses not found in a given level of memory
Equation for miss rate and hit rate?
We want to know the performance of the cache memory. The CPU has accessed memory 10,000 times searching for data. A total of 1500 times the requested data was found in the main memory, and 8500 times the data was found in the cache. What are the hit and miss rates?
The principle of loacality?
Processors tend to access memory in a very patterned way. For example, in a program running, when the PC fetches instruction at memory address X, there is a high probability that the data from memory location X+1 will be needed soon.
There are two forms of locality
- Temporal locality: recently accessed items will tend to accessed again soon.
- Spatial locality: if an item is accessed, then items in nearby memory locations will tend to be accessed soon
Why do we use the principle of locality?
This principle allows a computer to use small and fast memory that effectively handles information, to achive low miss rate.
Cache Memory?
A cache memory holds commonly used data.
If the processor needs data, first the cache memory is checked, if the cache hits, then the data is available immediately. Otherwise, the processor check the main memory and places the data in the cache for future use.
Tasks of the Cache memory?
How is the Cache mapped?
- The cache memory is organised in sets (s), block (b) and ways (w).
- In direct mapped cache, an address in the main memory is mapped to a unique location (block and set) in the cache.
- In direct mapped cache, each set contains one block only
Cache diagram?
Direct mapped cache positioning?
If the processor needs some data then:
Checks the set bits from the address, e.g., 011
- Checks if the tag in cache matches address tag
- Checks if valid bit is 1
- If everything matches, then the cache hits and the data is sent to the processor
Otherwise,
- the cache misses
- The data is fetched from the main memory