Tagged articles
page fault
22 articles · Page 1 of 1
This comprehensive guide covers Linux memory fundamentals, address space layout, buddy and slab allocation algorithms, kernel/user memory APIs, page fault handling, shared memory, common C/C++ memory pitfalls, and essential monitoring tools for backend developers.
C++ smart pointersLinux kernelShared Memory
0 likes · 25 min read

This article explains the fundamentals of Linux memory mapping (mmap), covering its API, parameters, shared vs. private modes, kernel internals, page‑fault handling, performance benefits, zero‑copy I/O techniques, practical code examples, and common pitfalls for developers.
memory mappingmmappage fault
0 likes · 57 min read

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.
Linuxmemory managementoperating system
0 likes · 41 min read

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.
LinuxMMUmemory management
0 likes · 27 min read

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.
kernelmemory managementoperating system
0 likes · 27 min read

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.
HeapLinuxmalloc
0 likes · 15 min read

The article examines Linux kernel 6.9 memory-management locks—PG_locked, lru_lock, mmap_lock, anon_vma rwsem, mapping i_mmap_rwsem, and shrinker_rwsem—explaining their roles and presenting eight community-driven optimizations such as per-memcg lru_lock, per-VMA locks, speculative faults, and lock-less shrinker techniques to improve concurrency and performance.
LRU LockLinux kernelSystem Performance
0 likes · 24 min read

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.
brkc-programmingmalloc
0 likes · 7 min read

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.
kernelmemory managementoperating system
0 likes · 23 min read

The article explains why the initial memset on a newly‑allocated 1 GB buffer is much slower than subsequent calls, detailing how page‑fault handling, TLB misses, and the MMU’s multi‑level page tables cause overhead, and demonstrates optimizations such as using huge pages, MAP_POPULATE, and pre‑mapping to eliminate the slowdown.
TLBhuge pagesmemory-management
0 likes · 20 min read

This article explains Linux memory mapping (mmap), covering its purpose, API parameters, different mapping types, internal kernel implementation, page‑fault handling, copy‑on‑write semantics, practical use cases, and includes a complete Objective‑C example demonstrating file mapping and manipulation.
Linux kernelVMAcopy-on-write
0 likes · 27 min read

This article explains how Linux allocates a process's stack virtual address space at load time, when and how physical pages are actually allocated on demand via page‑fault handling, and how the stack can automatically grow within configurable limits.
Linuxpage faultprocess stack
0 likes · 13 min read

The nightly service latency spikes were traced to major page faults triggered by the category client’s lazy mmap of a 1.7 GB off‑heap store during package switches, not to GC or CPU throttling, and were resolved by upgrading to a version that pre‑loads the store in 64 MB chunks with brief pauses.
DebuggingJVMMemory
0 likes · 15 min read

This article explains Linux virtual memory, the page‑fault allocation process, the two memory‑reclaim paths (kswapd and direct reclaim), OOM killer scoring, swappiness tuning, NUMA‑aware reclamation, and practical steps to protect critical processes from being killed.
LinuxNUMAOOM killer
0 likes · 19 min read

The article walks through Linux’s mmap file‑read workflow—from the kernel entry point and VMA creation, through page‑fault handling that allocates pages and invokes synchronous or asynchronous readahead, to munmap’s unmapping steps and the deferred file‑cache reclamation mechanisms.
File CacheLinuxkernel
0 likes · 10 min read

This article explains how Linux manages physical address space using SMP and NUMA architectures, describes the node, zone, and page data structures, details page allocation via the buddy system and slab allocator, and outlines user‑ and kernel‑mode page‑fault handling, swapping, and address translation mechanisms.
LinuxNUMAmemory management
0 likes · 17 min read

This article explains the Linux kernel's heap memory allocation process, covering the vm_area_struct and mm_struct data structures, the brk system call implementation, and the page‑fault handling that maps virtual addresses to physical memory, while also mentioning other allocation mechanisms such as mmap and HugePages.
HeapLinux kernelbrk system call
0 likes · 12 min read

This article explains the concepts of virtual and physical addresses, lazy memory allocation, the roles of the MMU, page tables, and TLB in address translation, and details the causes, classifications, and handling mechanisms of page faults in Linux systems.
LinuxMMUTLB
0 likes · 12 min read

This article explains how Linux maps logical to physical addresses, describes the buddy and slab memory allocation mechanisms, outlines their limitations and improvements such as slub and vmalloc, and details the page‑fault handling process including registers involved and swap behavior.
buddy systemkernelmemory management
0 likes · 7 min read

By generating an order file that places frequently executed code contiguously, the authors reduce iOS app cold‑launch page faults by about 15%, achieving roughly a 10% launch‑time improvement without code changes, using runtime hooking and static analysis to build the symbol ordering.
App LaunchBinary ReorderingHooking
0 likes · 13 min read


ITPUBNov 14, 2016 · Fundamentals
This article explains Linux kernel memory management by describing how user‑level malloc allocates virtual memory, how page tables map virtual to physical addresses, and how the hardware‑triggered page‑fault mechanism ultimately provides the needed physical pages.
kernelmemory managementpage fault
0 likes · 9 min read

This article explains why the Linux I/O subsystem is the slowest part of the system, describes page‑level disk access, major and minor page faults, the file buffer cache, page types, write‑back mechanisms, monitoring tools, and practical tips for reducing I/O latency.
File CacheI/OLinux
0 likes · 5 min read
