Memory Management

Techniques for allocating and protecting memory.

  • JSON4,689 B
  • YAML3,437 B · −27%
  • TOON2,941 B · −37%

The core ideas of operating-system memory management: paging and segmentation, virtual memory and page faults, and the mechanisms that make them fast or slow, including page tables, the TLB, replacement policies, copy-on-write and fragmentation.

Use it when

  • You are explaining how a process gets its address space or why a program slows down under memory pressure.
  • You need the difference between internal and external fragmentation.

Watch out for

  • Terminology varies slightly across systems (swap space versus page file) while the concepts are the same.
  • Numbers such as page size depend on the hardware; common values are 4 KiB with larger huge pages.

The data

TermDescription
PagingDivide physical memory into fixed-size frames and logical memory into pages.
SegmentationDivide memory into variable-sized segments based on logical units.
Virtual MemoryAbstraction giving each process a large, isolated address space.
Page FaultInterrupt raised when a process accesses a page not in physical memory.
ThrashingExcessive paging caused by insufficient physical memory.
SwappingMoving entire processes between main memory and disk.
Memory Management UnitHardware translating virtual addresses to physical addresses.
Page TableA per-process data structure mapping virtual pages to physical frames.
Translation Lookaside BufferA small hardware cache of recent virtual-to-physical translations that avoids walking the page table on every access.
Demand PagingLoading a page into memory only when it is first accessed.
Page ReplacementChoosing which page to evict when memory is full; policies include FIFO, LRU and clock approximations.
Copy-on-WriteSharing pages between processes until one writes, then copying only that page, which makes fork cheap.
Memory-Mapped FileMapping a file into the address space so it is accessed like memory, with the OS handling the I/O.
Internal FragmentationWasted space inside an allocated block that is larger than needed.
External FragmentationFree memory split into pieces too small to satisfy a request even though the total would suffice.
Working SetThe set of pages a process actively uses over a window of time; keeping it in memory avoids thrashing.
Kernel Space and User SpaceMemory regions that separate privileged kernel code from unprivileged programs, enforced by hardware protection.

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
datatermstringPaging
datadescriptionstringDivide physical memory into fixed-size frames a…

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.yunusemrevurgun.com/api/dataset/memory-management?format=toon"
const res = await fetch(
  "https://yjtoon.yunusemrevurgun.com/static-data/dataset/memory-management.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • os
  • memory
  • paging
  • virtual-memory

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets