This article explains the complete CPU memory access process, covering cache hierarchy (L1/L2/L3), write-through vs write-back policies, multi-core cache coherence with MESI protocol, virtual memory translation via MMU, and how memory acts as a cache for disk storage.
This article explains the fundamental differences between RAM and hard drives, using analogies like a desk versus a bookshelf to illustrate how RAM provides fast temporary workspace for the CPU while hard drives offer permanent but slower storage, covering HDD vs. SSD, virtual memory, and why insufficient RAM causes system slowdowns.
This article explains segmented memory management, contrasting it with paging, detailing segment types, segment tables, address translation, protection mechanisms, dynamic growth, advantages, drawbacks, and how modern systems combine segmentation with paging for efficient virtual memory handling.
address translationmemory managementoperating system
The article explains paging as a memory‑management technique that divides physical memory into fixed‑size pages, maps virtual pages to page frames via page tables, uses multi‑level tables and a TLB for speed, and discusses its advantages, drawbacks, and practical workflow.
This extensive article explains Linux memory management fundamentals, covering physical and virtual memory, allocation and release mechanisms, key kernel functions, performance tuning, leak detection, fragmentation handling, and real‑world code samples for developers and system engineers.
The article explains how operating systems use virtual memory to extend physical RAM with disk space, covering concepts like paging, page tables, multi‑level tables, swap space, replacement algorithms (LRU, FIFO, LFU), and practical Python and JVM examples.
This article explains Linux process virtual address spaces, details the multi‑step internals of the C++ new operator, and analyzes its memory‑fragmentation, time, and space overheads through code examples and benchmarks, then offers practical mitigation techniques such as memory pools and smart pointers.
Linux’s Virtual Memory Area (VMA) is the kernel’s core structure for managing a process’s address space, and this article explains its definition, key fields, linked‑list and red‑black‑tree organization, allocation, protection, page‑fault handling, copy‑on‑write, and practical usage examples.
World Labs' open‑source Spark 2.0 renderer integrates with Three.js and WebGL2 to stream and display ultra‑large 3D Gaussian Splatting scenes—over 100 million splats—on desktops, mobiles and VR, using level‑of‑detail, progressive streaming, and virtual‑memory techniques.
This article explains the role of the Translation Lookaside Buffer (TLB) in Linux virtual‑memory translation, covering basic address concepts, page‑table mechanics, TLB operation, flush and synchronization strategies, hardware vs software management, Linux kernel APIs, and a practical C benchmark comparing sequential and random memory accesses.
This article explains how the Memory Management Unit (MMU) underpins Linux's virtual memory, process isolation, and protection mechanisms, detailing its architecture, address‑translation workflow, TLB caching, practical C implementations, real‑world use cases, and debugging techniques for kernel developers.
This article explains how Linux virtual memory lets each process appear to have a large, independent address space by using paging, page tables, swap, and the MMU, covering concepts from basic virtual memory principles to page replacement algorithms and practical tools.
This article explains the role of the Memory Management Unit (MMU) and paging in modern operating systems, covering hardware structure, address translation, permission checks, page tables, TLB behavior, virtual memory mechanisms, and practical Linux kernel code examples for memory protection, sharing, and performance optimization.
This chapter uses vivid analogies and exam‑focused breakdowns to explain the Von Neumann architecture, CPU performance metrics, memory hierarchy, operating‑system concepts such as processes, threads, scheduling, memory management, virtual memory, file systems and deadlock, showing how mastering these basics gives architects a decisive edge in system‑design exams.
The article explains Linux virtual memory layout, shows that a 32‑bit process can create roughly 380 threads due to an 8 MB default stack, while a 64‑bit process can theoretically spawn millions of threads but is constrained by kernel parameters such as threads‑max, pid_max and max_map_count.
This article explains how Paged Attention, introduced by the vLLM team, applies virtual‑memory techniques, non‑contiguous block mapping, copy‑on‑write reuse, distributed scheduling, and hardware‑level optimizations to improve KV‑cache efficiency and reduce memory fragmentation in large language model serving.
Linux memory management relies on virtual address spaces that map to physical RAM, using page tables, multi-level paging, and dynamic allocation across segments like stack, heap, and mmap, while tools such as free, top, and ps let administrators monitor usage and handle OOM scenarios.
This article explains Linux page faults, describing how the kernel intercepts invalid or unmapped memory accesses, the step‑by‑step handling process, the four typical fault scenarios, and optimization techniques, while providing code examples and diagrams to illustrate virtual‑memory management in depth.
This article demystifies Linux process memory by explaining the layered architecture of virtual and physical memory, the role of the MMU and page tables, dynamic allocation mechanisms such as brk and mmap, and practical tools for inspecting and optimizing memory usage.
This article explores the fundamentals of memory management, covering static and dynamic allocation, virtual memory, paging, segmentation, protection mechanisms, garbage collection, common strategies, pitfalls like leaks and fragmentation, concurrency challenges, and practical tips and tools for optimizing memory usage across operating systems and applications.
This article explores the hardware foundations of memory management, detailing the role of the Memory Management Unit, page tables, caching mechanisms like TLB, and strategies such as paging, segmentation, and large‑page optimization that together enable efficient virtual‑to‑physical address translation and protect process memory.
mmap maps a file directly into a process’s address space, allowing programmers to read and write disk data as if it were memory, eliminating extra system calls and copies, while introducing complexities like page faults, address‑space limits, and performance trade‑offs that must be evaluated per workload.
This article explains how linkers determine virtual memory addresses during linking, describes the operating system's per‑process virtual address space, outlines ABI and ELF conventions including default base addresses and linker scripts, and shows how the loader later maps those virtual addresses to physical memory.
This article explains the role of the page‑table cache (TLB) in the Linux kernel, describing how it speeds up virtual‑to‑physical address translation, the underlying mapping process, cache organization, replacement policies, and its impact on system performance across desktops, servers, and high‑performance applications.
This article explores the role of the Memory Management Unit (MMU) in Linux, detailing how it translates virtual addresses to physical memory, enforces protection, utilizes page tables, TLB caching, multi‑level paging, and supports process isolation and efficient memory allocation, illustrating concepts with diagrams and code examples.
The article traces the evolution of memory management in 1960s mainframes, explaining fixed partitioning, its inefficiencies, the shift to dynamic partitioning, the problem of fragmentation, and how overlay techniques paved the way for modern virtual memory.
The article explains what page faults are, how the Linux kernel handles them, methods to measure their frequency with tools like perf, vmstat and ftrace, and discusses why frequent faults degrade performance and how to mitigate them through memory, configuration, and code optimizations.
This article explains how CPUs, memory, and operating systems interact, why simply adding RAM seldom speeds up a computer when memory is already sufficient, and how OS techniques like demand paging and disk caching affect performance under both ample and scarce memory conditions.
This article explains the principles of CPU cache, the multi‑level memory hierarchy, virtual memory, data consistency, and concurrency control mechanisms, illustrating how they together bridge the speed gap between the fast processor and slower memory/storage in modern computer systems.
Early computers used fixed‑size partitions that wasted space, then dynamic partitions that improved utilization but caused fragmentation, and finally overlay techniques that let programs exceed physical RAM by swapping modules, each step exposing limitations that ultimately drove the creation of virtual memory systems.
This article traces the evolution of memory layout from early punched‑card computers through assembly‑level innovations, segment‑based designs, and virtual memory, then demonstrates a real 32‑bit Linux C++ program showing where globals, stack, heap, and mapped regions reside, and explains how this knowledge helps debug segmentation faults, stack overflows, and memory leaks.
This article provides a comprehensive overview of Linux virtual memory, explaining its purpose, page‑based architecture, page‑table mappings, fault handling, swap mechanisms, useful monitoring commands, and practical optimization techniques for both kernel parameters and application code.
The article explains how Linux triggers a page fault when a process accesses a virtual memory page that is not resident in physical RAM, describes the underlying virtual memory and MMU concepts, the kernel data structures involved, the detailed fault‑handling flow, different fault types, and their performance impact.
This article explains the Linux kernel reverse‑mapping (RMAP) mechanism, covering its historical background, core concepts, key data structures such as anon_vma and anon_vma_chain, and the detailed workflow for page creation, fork handling, and page reclaim or migration, with full code examples.
This article explains how Linux-like operating systems use virtual memory and the MMU to map virtual addresses to physical memory, describes the data structures (vma_struct and mm_struct) used by uCore, details the page‑fault handling flow, classifies fault types, and shows how these mechanisms affect system performance.
This guide explains how to create a swap file on a Linux server, enable it, configure it to start at boot, and adjust the swappiness parameter to control virtual memory usage, providing step‑by‑step commands and explanations for each operation.
Adding more RAM only speeds up a computer when the existing memory is insufficient, because RAM supplies data to the CPU and serves as cache; with ample RAM the CPU remains the bottleneck, so extra memory mainly enables more simultaneous programs rather than increasing raw processing speed.
This article explains the Linux kernel’s memory management for a process, covering virtual address spaces, page‑fault handling, VMA allocation, stack and heap initialization, sbrk/brk usage, thread‑stack creation, and the glibc ptmalloc heap allocator with concrete code examples and diagrams.
This talk presents the Ant Group team's recent work on large‑model inference memory optimization, covering GPU memory challenges, virtual memory management (VMM), the Virtual Tensor framework, LayerKV techniques, performance comparisons with Page Attention and FlashAttention, and extensive experimental results demonstrating reduced latency and higher QPS.
This article traces the evolution from real‑mode segmentation to modern paging, explains segment and page‑table structures on x86 and ARM, dissects kernel macros such as PGDIR_SHIFT and PUD_SHIFT, and demonstrates a kernel module that translates a process's virtual address to its physical address.
The article explains how CPUs read and write memory through a hierarchy of caches, virtual memory translation, and coherence protocols, revealing that the seemingly simple operation actually involves multiple hardware and software layers that programmers must understand to write high‑performance code.
This article introduces a new book 'Deep Understanding of Linux Processes and Memory' that systematically explains CPU, memory, and process scheduling principles, covering hardware fundamentals, virtual memory, Golang coroutines, container resource management, and performance optimization techniques.
This article explains why calling malloc in C only reserves virtual address space, how the kernel maps it to physical memory on demand, and the roles of the brk pointer, memory layout, and page‑fault handling, illustrated with a 1 GB allocation example and detailed diagrams.
This article explains the principles of virtual memory, the data structures and functions used in uCore to manage page faults, and how the operating system handles demand paging, page swapping, and invalid accesses through detailed code examples and workflow descriptions.
Memory paging, a core memory‑management technique used in modern operating systems and x86‑64 processors, divides physical memory into fixed‑size pages, enabling virtual memory, isolation, sharing, lazy loading, and protection, while the article explains page tables, hierarchical paging modes, and provides assembly code for enabling paging.
This article reviews Linux virtual memory layouts for 32‑bit and 64‑bit systems, explains the kernel and user address spaces, details how threads consume stack memory, and outlines both virtual‑memory and kernel‑parameter limits that affect the maximum number of threads a process can create.
This article explains Linux's mmap mechanism, its relationship with shared memory, the advantages and disadvantages of mmap versus traditional shared memory, and provides practical code examples and detailed steps for using mmap in interprocess communication and large‑file handling.
This article explains core memory‑management concepts—including logical vs. physical address spaces, allocation strategies, paging, segmentation, virtual memory, and page‑replacement algorithms—while highlighting how operating systems prevent overflow and optimize memory usage.
Linux’s shmem subsystem provides hybrid anonymous/file‑backed pages that enable diverse shared‑memory scenarios—parent‑child communication, IPC, tmpfs, Android ashmem, and memfd—by using APIs such as shmem_file_setup, handling page faults through cache and swap mechanisms, and employing a specialized reclamation process to manage memory efficiently.
The article surveys the evolution of POSIX abstractions from the 1970s to the present, explains why hardware trends and modern workloads expose limitations of the CPU‑centric model, and argues that a new set of higher‑level interfaces is needed for future systems.
This article explains how the Linux kernel allocates dynamic memory, distinguishes kernel and user‑space allocation strategies, describes the mm_struct layout of a process address space, and shows how pages and page tables translate virtual addresses to physical memory.
This article reviews Linux virtual memory layouts for 32‑bit and 64‑bit systems, explains the different memory segments, shows how the default 8 MiB thread stack impacts virtual address consumption, and calculates practical thread limits based on virtual memory and kernel parameters.
This article explains how Linux organizes physical memory, allocates pages using the buddy system and SLUB, structures virtual address spaces for user and kernel modes, and maps virtual addresses to physical memory through page tables, TLBs, and dynamic mappings.
This article explains how Linux organizes physical memory into pages, zones, and nodes, allocates memory using the buddy system and SLUB, structures virtual address spaces for user and kernel, and maps virtual addresses to physical memory through page tables, dynamic mapping, and TLB caching.
This article explains Linux's memory management, detailing how physical memory is organized into pages, zones, and nodes, how virtual addresses are structured for user and kernel space, and how page tables, the buddy system, SLUB, and TLB work together to map virtual addresses to physical memory.
This article walks through the Linux kernel's memory‑management subsystem, explaining how virtual memory is linked to physical memory via page tables, covering single‑level, two‑level and multi‑level paging, the structure of page‑table entries, the role of the MMU and TLB, and the complete CPU address‑translation process.
Linuxmemory managementoperating system fundamentals
This comprehensive guide explains Linux memory management concepts, covering physical and virtual memory, allocation and release methods, related kernel functions, process switching interactions, performance tuning, leak detection, fragmentation mitigation, and real‑world application examples with practical C code snippets.
This article explains how mmap maps file segments into a process's virtual address space, how virtual memory and physical memory interact, and the mechanisms of address translation, paging, and segmentation that enable efficient memory sharing and file I/O in Linux.
This comprehensive guide covers Linux memory management fundamentals, detailing physical and virtual memory concepts, allocation and release mechanisms, key kernel functions, code examples, process switching, performance tuning, leak detection, fragmentation mitigation, and real‑world applications across system, driver, and optimization layers.
This article explains how modern computer systems use a hierarchical memory structure and virtual memory to overcome physical memory limitations, address translation challenges, fragmentation, and security issues, detailing concepts such as page tables, TLB caching, multi‑level paging, and practical examples.
This comprehensive guide explains Linux memory management, covering physical and virtual memory concepts, allocation and release methods, related kernel functions, process switching interactions, performance tuning, leak detection, fragmentation handling, and real‑world application scenarios for servers, embedded systems, and driver development.
Virtual memory abstracts physical memory, giving each process a private, contiguous address space, and relies on CPU virtual addressing, MMU translation, page tables, TLB caching, multi-level paging, Linux’s memory mapping, dynamic allocation, and garbage collection to efficiently manage memory and protect processes.
The article explains the role of a Memory Management Unit (MMU) in translating virtual to physical addresses, managing page tables, providing memory protection and sharing, and why modern operating systems like Linux rely on it while some embedded systems can operate without one.
This article explains why a Linux process’s address space contains the kernel, covering virtual memory concepts, user and kernel mode separation, page table mappings, and how mapping the kernel into each process avoids costly page‑table switches during system calls, interrupts, and exceptions.
Process Address Spacekernel mappingoperating system
Virtual memory abstracts physical memory, providing each process with a private, contiguous address space, while the CPU, MMU, page tables, TLB, and paging mechanisms collaborate to translate virtual addresses, manage page faults, and optimize performance through locality, multi‑level tables, and memory‑mapped files.
This article explains the architecture of Mach virtual memory in iOS, details its page‑based management, describes the core data structures and kernel APIs, analyzes the Objective‑C alloc implementation, and walks through the memory‑pressure (Jetsam) mechanism that triggers low‑memory warnings.
Virtual memory extends limited physical RAM by giving each process a large address space translated via page tables and a TLB, while multi‑level tables manage size, and the OS separates kernel and user space, offering blocking/non‑blocking, synchronous/asynchronous, multiplexed I/O, reactor patterns, and zero‑copy techniques to optimize data transfer.
This comprehensive guide explores Linux kernel memory management, explaining virtual and physical address concepts, the layout of process and kernel virtual memory spaces on 32‑ and 64‑bit systems, the role of mm_struct and vm_area_struct, and how ELF binaries are mapped into memory, while also detailing DRAM organization and CPU memory access.
This article explains the mmap system call’s core concepts, mapping process, kernel mechanisms, differences from traditional file I/O, performance benefits, and practical usage details, helping readers understand how memory‑mapped files work in Linux and why they’re advantageous for high‑performance applications.
The article explains how requesting memory larger than physical RAM interacts with virtual memory, page faults, swap mechanisms, and OOM handling on 32‑bit and 64‑bit operating systems, illustrated with C code experiments and Linux/macOS observations.
This article explains how operating systems acquire execution rights from BIOS, traces their historical evolution from mainframes to modern platforms, examines their core functions and business value, and delves into memory management techniques such as real‑mode, protected‑mode, virtual memory, paging, and page‑fault handling.
This article explains the role of the Translation Lookaside Buffer (TLB) in virtual‑to‑physical address translation, details multi‑level page‑table walks, discusses aliasing and ambiguity issues across processes, and explores techniques such as ASID and global mappings to minimize costly TLB flushes.
This article reviews virtual memory concepts and explains five page replacement algorithms—Optimal (OPT), First‑In‑First‑Out (FIFO), Least Recently Used (LRU), CLOCK (including a simple and improved version), and Least Frequently Used (LFU)—detailing their principles, operation, advantages, drawbacks, and illustrative examples.
This article explains the fundamentals of Translation Lookaside Buffers (TLB), their relationship with MMU and multi‑level page tables, how alias and ambiguity issues arise in multi‑process environments, and practical techniques such as ASID and global mapping to minimize costly TLB flushes.
This article provides a comprehensive guide to Linux memory management on x86‑32 systems, covering virtual address spaces, physical address translation, memory zones, user and kernel space layouts, the buddy and slab allocators, malloc/kmalloc/vmalloc mechanisms, and useful commands for inspecting memory usage.
This article provides a comprehensive guide to Linux memory management on x86 32‑bit systems, covering virtual and physical address spaces, kernel zones, user‑space regions, key data structures, and practical commands for inspecting memory layout.
This article explores memory management concepts from both operating system and MySQL perspectives, covering virtual vs physical memory, process memory usage analysis using tools like top and /proc, and experimental verification of memory allocation behaviors.
This article explains how modern operating systems use virtual memory, memory management units, and multi‑level page tables to isolate processes, improve efficiency, and handle limited physical RAM, covering basic concepts, paging schemes, address translation, and swapping mechanisms.
The article explains how operating systems acquire execution control, traces their historical evolution from early mainframes to modern mobile platforms, and details memory management techniques in real and protected modes, highlighting the roles of BIOS, boot loaders, virtual memory, and the shifting boundaries between hardware, OS, and browsers.
This article explains the fundamentals of virtual memory, including paging, page tables, swap, and Linux management commands, highlighting how virtual memory abstracts physical addresses, resolves process memory conflicts, and enhances security and data sharing while providing practical tips for monitoring and tuning memory usage.
This guide explains how Linux processes share physical memory using the shmget, shmat, and shmdt system calls, detailing their prototypes, parameters, example programs, kernel structures, and the internal workings of the associated kernel functions.
This article explains Redis's virtual memory (VM) feature, how it swaps cold data to disk while keeping keys in memory, details configuration parameters, describes the two threading models for data swap-in/out, and highlights why Redis's custom VM implementation boosts performance.
This article explains the fundamentals of Linux virtual memory, covering its origin, paging and page tables, memory addressing, the role of swap, common questions about 32‑bit vs 64‑bit systems, and practical commands for monitoring and configuring virtual memory on Linux.
This article explains the core concepts of Linux virtual memory, including why it exists, how paging and page tables work, the role of the MMU, swap usage, common pitfalls, and practical commands for inspecting and tuning memory behavior on a Linux system.
This article explains the fundamentals of virtual memory in Linux, covering its purpose, paging and page tables, address translation, swap usage, common questions about 32‑ vs 64‑bit systems, direct memory access, JVM memory consumption, and essential commands for monitoring and configuring memory.
This article explains Linux virtual memory fundamentals, covering its purpose, paging and page tables, address translation, swap usage, common issues like 32‑bit vs 64‑bit limits, and practical commands such as free, vmstat, pmap, and sysctl for monitoring and configuring memory management.
This article uses vivid analogies to explain the concepts of physical memory, virtual memory, and Linux's paging mechanism, showing how operating systems abstract hardware resources to simplify programming while managing limited RAM through disk-backed storage.
This article explains how Linux manages virtual memory by describing the organization of virtual and physical address spaces, the mechanisms of segmentation and paging, multi‑level page tables, and the layout of user‑mode and kernel‑mode memory, including relevant kernel code examples.
The article explains Android virtual memory concepts, address space limits for 32‑ and 64‑bit apps, layout of QQ Music/Karaoke process memory, tools for inspecting /proc/pid/smaps, and shows how memory growth (e.g., loading libYTCommon.so) can cause 32‑bit apps to hit the 4 GB limit and crash.
This article explains the fundamentals of operating‑system memory management, covering physical memory limits, the need for address spaces, base‑limit protection, paging, virtual memory mapping, page‑fault handling, and a comprehensive review of page‑replacement algorithms such as FIFO, LRU, Clock, and Working‑Set.
This article explains Linux's swapping mechanism, detailing how the kernel moves rarely used memory pages to disk to handle memory shortage and idle memory, the underlying allocation paths, key parameters, and the trade‑offs involved for system performance and stability.
This article introduces fundamental operating‑system concepts—including processes, address spaces, file systems, I/O devices, protection mechanisms, and virtual memory—explaining their roles, state models, and how they enable reliable communication between hardware and application software.
This article explains why virtual memory is essential in modern operating systems, covering its role as an abstraction layer, caching benefits, memory protection, multi‑level page tables, and how it enables efficient resource utilization and process isolation.
This article explains how Linux creates a new process with its own virtual address space, maps ELF executable segments to memory regions, describes the roles of code, data, and BSS sections, shows how to inspect mappings via /proc/pid/maps, and clarifies segment‑section relationships and loading details.
This article explains Linux’s virtual address space, the mmap system call, its prototype and typical applications—including shared file mapping, inter‑process communication, and file I/O optimization—while illustrating concepts with diagrams and code examples, and discusses alignment, copy‑on‑write, and memory swapping considerations.
This article explains the Linux mmap system call, covering virtual address space fundamentals, how mmap interacts with the page cache and inode structures, typical use‑cases such as shared memory and anonymous mappings, code examples, and special considerations like alignment, copy‑on‑write and memory swapping.
From Bill Gates’s 640 KB claim to today’s multi‑gigabyte machines, this article explains how loaders map executable files, the evolution from segmentation to swapping and paging, and why virtual memory lets programs run with far less physical RAM despite performance trade‑offs.
This article explains the physical characteristics of RAM, the concept of virtual memory, how address translation works, and why Linux uses paging and multi‑level page tables to efficiently manage memory.