Tagged articles
21 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Feb 13, 2026 · Fundamentals

Unlocking Linux Performance: How mmap Bridges Memory and I/O

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.

Page Faultmemory mappingmmap
0 likes · 57 min read
Unlocking Linux Performance: How mmap Bridges Memory and I/O
Deepin Linux
Deepin Linux
Sep 20, 2025 · Fundamentals

How Linux Handles Page Faults: Inside Virtual Memory Management

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
How Linux Handles Page Faults: Inside Virtual Memory Management
Linux Kernel Journey
Linux Kernel Journey
Apr 7, 2025 · Fundamentals

Understanding Linux Kernel Page Faults: Causes and Handling Strategies

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
Understanding Linux Kernel Page Faults: Causes and Handling Strategies
Deepin Linux
Deepin Linux
Mar 24, 2025 · Fundamentals

Understanding Page Fault Handling and Virtual Memory Management in the uCore Kernel

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
Understanding Page Fault Handling and Virtual Memory Management in the uCore Kernel
Linux Kernel Journey
Linux Kernel Journey
Jan 9, 2025 · Fundamentals

How Does a Linux Process Use Memory? A Deep Dive

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.

HeapLinuxPage Fault
0 likes · 15 min read
How Does a Linux Process Use Memory? A Deep Dive
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 9, 2024 · Fundamentals

Linux Kernel Memory Management Locks and Optimization Case Studies

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 kernelMemory Management
0 likes · 24 min read
Linux Kernel Memory Management Locks and Optimization Case Studies
Liangxu Linux
Liangxu Linux
Jul 27, 2024 · Fundamentals

Does malloc Allocate Memory? Exploring Virtual Memory, brk, and Page Faults

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.

C programmingMemory ManagementPage Fault
0 likes · 7 min read
Does malloc Allocate Memory? Exploring Virtual Memory, brk, and Page Faults
Deepin Linux
Deepin Linux
Jul 17, 2024 · Fundamentals

Understanding Page Fault Handling and Virtual Memory Management in uCore OS

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
Understanding Page Fault Handling and Virtual Memory Management in uCore OS
Liangxu Linux
Liangxu Linux
Feb 5, 2024 · Fundamentals

Why Is the First memset So Slow? Exploring Page Faults, TLB, and Huge Pages

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.

Huge PagesPage FaultTLB
0 likes · 20 min read
Why Is the First memset So Slow? Exploring Page Faults, TLB, and Huge Pages
Deepin Linux
Deepin Linux
Nov 9, 2023 · Fundamentals

Understanding Linux Memory Mapping (mmap): API, Implementation, and Use Cases

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.

Copy-on-WriteLinux kernelPage Fault
0 likes · 27 min read
Understanding Linux Memory Mapping (mmap): API, Implementation, and Use Cases
Liangxu Linux
Liangxu Linux
May 29, 2022 · Operations

Why Linux Triggers OOM Killer and How to Manage Memory Reclamation

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
Why Linux Triggers OOM Killer and How to Manage Memory Reclamation
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Jun 11, 2021 · Fundamentals

Analysis of Linux mmap File Read Process and Page Fault Handling

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 CacheKernelLinux
0 likes · 10 min read
Analysis of Linux mmap File Read Process and Page Fault Handling
360 Smart Cloud
360 Smart Cloud
Jun 1, 2021 · Fundamentals

Physical Address Space Management and Memory Allocation in Linux (NUMA, Nodes, Zones, Pages, Slab, and Page Fault Handling)

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.

LinuxMemory ManagementNUMA
0 likes · 17 min read
Physical Address Space Management and Memory Allocation in Linux (NUMA, Nodes, Zones, Pages, Slab, and Page Fault Handling)
Liangxu Linux
Liangxu Linux
May 9, 2021 · Fundamentals

How Linux Allocates Heap Memory: Inside vm_area_struct and the brk System Call

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 kernelPage Fault
0 likes · 12 min read
How Linux Allocates Heap Memory: Inside vm_area_struct and the brk System Call
Liangxu Linux
Liangxu Linux
Jul 12, 2020 · Fundamentals

Why Page Faults Occur and How MMU & TLB Resolve Them

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.

LinuxMMUPage Fault
0 likes · 12 min read
Why Page Faults Occur and How MMU & TLB Resolve Them
ITPUB
ITPUB
Nov 14, 2016 · Fundamentals

How Linux Kernel Turns malloc Calls into Physical Memory: A Simple Guide

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
How Linux Kernel Turns malloc Calls into Physical Memory: A Simple Guide
MaGe Linux Operations
MaGe Linux Operations
Oct 16, 2015 · Operations

Why Linux IO Is the Slowest Subsystem and How to Optimize It

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
Why Linux IO Is the Slowest Subsystem and How to Optimize It