Memory hierarchy
Memory
Three features of memory :
Speed vs. Cost vs. Size(amount)
Registers
High speed (CPU speed)
Referenced by "ID", specific op-code or operands
Can't change number of registers without changing CPU design.
Expensive
Very small amount CISC 3-16 RISC 16,32,l028-4096.
Register files - cache of registers.
Memory Cache
High speed (possibly up to CPU speed but with overhead)
Looks like MAR addressable memory to program code.
Does not modify architecture of CPU.
Tiered
Level 1 16K - 256K
On CPU.
Harvard architecture.
On multi-core CPUs, each core has own L1 cache.
SRAM - gated flip-flops. Very fast but expensive.
Level 2 4-64 MiB.
Possibly on CPU die.
Stored Program architecture (mixed code and data)
May be shared or each core has own block of cache.
Level 3 4-64 MiB.
Stored Program architecture (mixed code and data)
Shared cache.
Cheaper than register
Invisible to instruction and programs.
Generally not expandable - especially if part of CPU
Primary memory
DRAM (read/write) - memory normally used.
ROM (read only)
Fast (slower than current CPUs)
MAR addressable
64K - 16TiB on newer CPUs.
Not always fully implemented on particular systems.
Secondary memory
Virtual memory
Secondary memory accessed so it appears like primary memory.
Invisible to user programs.
Requires support of hardware and Operating system.
Runs at secondary memory speed.
Slower but much cheaper than primary.
Separate from main system (technically part of I/O).
Large amount of overhead.
Addressable symbolically by OS and software.
Data labeled by names.
Os keeps a table of names that translate
into location on secondary device.
Combination of electronic and mechanical implementation.
Flash drives and new solid state drives closer to primary memory speed.
Older magnetic and optical (very cheap).
Examples
Hard drive
CD-ROM
Tape drive
The more mechanical the slower but also the cheaper.
Nice article on CPU speed limit :
www.technologyreview.com/s/421186/why-cpus-arent-getting-any-faster/
Next