RAM
Random Access Memory
- In Turkish
- bellek
- Pronunciation
- RAM
In short
RAM (random access memory) is a computer's fast, temporary working memory, holding the programs and data in use; its contents are lost when power goes off.
What is RAM?
When you open an app, the operating system loads its code and data from storage into RAM, because reading from RAM takes nanoseconds while even a fast SSD is many times slower. Random access means any byte can be read directly by its address, as fast as any other, instead of scanning through in order.
RAM is volatile: it needs power to keep its contents, which is why unsaved work disappears in a crash and why files are written back to disk. Most computers use DRAM modules of the DDR family, such as DDR4 and DDR5, while CPU caches use faster and more expensive SRAM built into the processor.
The operating system shares RAM between programs through virtual memory: each process sees its own address space, and the OS maps it onto physical RAM page by page. When RAM fills up, the OS moves rarely used pages to disk in swap space, which keeps programs running but slows them down dramatically if it happens often.
A common misconception is that free RAM is good RAM. Modern operating systems deliberately fill spare memory with a cache of recently used files, which speeds things up and is released instantly when programs need it. A computer is short of memory when it starts swapping heavily, not when the usage number looks high.
Key takeaways
- RAM is fast, temporary working memory for running programs.
- It is volatile: its contents vanish without power.
- Any address can be read directly, which is what random access means.
- Virtual memory maps each process onto physical RAM; swap spills to disk.
- Unused RAM is used as a file cache, so high usage is normal.
Readers ask
What is the difference between RAM and storage?
RAM is fast, temporary memory for what is running right now and loses its contents without power. Storage, such as an SSD or hard drive, is slower but keeps files permanently.
How much RAM does a developer need?
It depends on the tools. Browsers, IDEs, containers and local databases add up quickly, so many developers find 16 GB a comfortable minimum and use 32 GB or more for heavy container or machine learning work.
What happens when RAM runs out?
The operating system moves less-used memory pages to disk (swap), which slows the system down. If memory is still not enough, it may stop programs, as Linux's out-of-memory killer does.
See also
- Virtual MemoryOperating Systems, p. 37Virtual memory is an operating system technique that gives each process its own private address space and maps it to physical RAM or disk behind the scenes.
- Swap SpaceOperating Systems, p. 30Swap space is an area on disk that the operating system uses as overflow for RAM, moving rarely used memory pages there when physical memory runs low.
- CPU CacheOperating Systems, p. 5A CPU cache is a small, very fast memory on the processor that keeps copies of recently used data from RAM, so the CPU spends less time waiting for memory.
- PagingOperating Systems, p. 22Paging is a memory management scheme that splits memory into fixed-size pages and uses page tables to map each process's virtual pages to physical RAM.
- Memory LeakOperating Systems, p. 19A memory leak is a bug where a program keeps holding memory it no longer needs, so its memory usage grows over time and can slow down or crash the system.
- CPUOperating Systems, p. 4A CPU (central processing unit) is the processor that executes a program's instructions, doing the arithmetic, logic and control work all software runs on.
Spotted a mistake or something missing on this page?Suggest an edit