patternMajor
Why we still need Short Term Memory if Long Term Memory can save temporary data?
Viewed 0 times
whycanshortneedtemporarytermlongsavememorystill
Problem
If RAM is a short term memory and SSD is a long term memory, why don't microarchitecture of computer nowadays use SSD or another long term memory for saving temporary data like hidden variable for programming?
If it's about speed, then SSD can improve its speed, is it possible that SSD will become faster than RAM at some point?
If SSD has address for memory location and data for
opcode/instruction/operand like RAM, then will it possibly act like RAM?
If it's about speed, then SSD can improve its speed, is it possible that SSD will become faster than RAM at some point?
If SSD has address for memory location and data for
opcode/instruction/operand like RAM, then will it possibly act like RAM?
Solution
There's two simple reasons, one fundamental and one related to our current technology. First the technical one: volatile storage is (generally) faster than non-volatile storage. It has fewer requirements - it only needs to store the data for a short while until it gets refreshed, so it's not a surprise that it often is faster.
But the fundamental reason is that memory gets slower to access the bigger it is. This is why modern architectures don't just have 'RAM' and 'disk', there's layers upon layers of increasing size memory, with only the topmost layer being non-volatile:
But the fundamental reason is that memory gets slower to access the bigger it is. This is why modern architectures don't just have 'RAM' and 'disk', there's layers upon layers of increasing size memory, with only the topmost layer being non-volatile:
- CPU registers
- L1 cache
- L2 cache
- L3 cache
- RAM itself
- Cache on the disk micro-controller
- The disk itself
Context
StackExchange Computer Science Q#135237, answer score: 40
Revisions (0)
No revisions yet.