Physical memory as RAM chips; sometimes referred to as
primary, main, or core memory.
Program text (machine code instructions) as files within
filesystems on disk or
ramdisks.
Swap space consisting of one or more disk divisions or swap files
within filesystems dedicated to this purpose. The individual
pieces of swap space are known as swap areas. Swap space is also
referred to as secondary memory.
Depending on the system hardware, there may also be physical
cache memory
on the CPU
chip itself (level-one (L1) cache),
or on the computer's motherboard (level-two (L2) cache),
and on peripheral hardware controller cards.
If recently accessed data (or, for some L1
and L2 caches, machine instructions) exists
in this memory, it can be accessed immediately rather
than having to retrieve it from more distant memory.
Write-through caches store data
read from memory or a peripheral device; they
ensure that data is written synchronously to memory or a physical device
before allowing the CPU to continue. Write-back caches
retain both read and written data
and do not require the CPU to synchronize
with data being written.
NOTE:
Most L2 caches work with a limited amount of main
memory. Adding more RAM than the cache can handle may
actually make the machine slower. For some machines with a 64KB
L2 cache, this only covers the first 16MB
of physical memory.
See the documentation provided with your computer or motherboard
hardware for more details.