HiveBrain v1.2.0
Get Started
← Back to all entries
patternMajor

Is a computer without RAM, but with a disk, equivalent to one with RAM?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
withoutequivalentdiskwithbutonecomputerram

Problem

Memory is used for many things, as I understand. It serves as a disk-cache, and contains the programs' instructions, and their stack & heap. Here's a thought experiment. If one doesn't care about the speed or time it takes for a computer to do the crunching, what is the bare minimum amount of memory one can have, assuming one has a very large disk? Is it possible to do away with memory, and just have a disk?

Disk-caching is obviously not required. If we set up swap space on the disk, program stack and heap also don't require memory. Is there anything that does require memory to be present?

Solution

Sure. In principle, given appropriate hardware, you could have just a disk, with everything stored on disk. Any time the CPU did a load or store instruction, there could be some hardware that turns that into a disk read or write. It'd be extremely slow: on a magnetic disk, each seek takes about 10ms, so you could do about 100 random-access reads and writes per second.

Some systems have flash memory-mapped into their address space. Flash memory provides non-volatile (persistent) storage. So, in some ways this resembles what you mention -- though those systems usually also have RAM as well.

Context

StackExchange Computer Science Q#53973, answer score: 25

Revisions (0)

No revisions yet.