B01 — BIOS’s First Map for the OS: The e820 Memory Map

dean
B01 — BIOS’s First Map for the OS: The e820 Memory Map Key Insight: When the computer starts, the first problem the OS must solve is: how much memory is there and where is it? The OS’s First Question After Power-On After power-on, BIOS (UEFI) first completes hardware initialization. Then the OS starts booting. The... » read more

331 – Android Bootloader: From Chip Power-On to Kernel Loading

dean
331 – Android Bootloader: From Chip Power-On to Kernel Loading Series Navigation: 330-Boot Overview | 332-init Process | 333-Zygote In the previous article, we outlined the complete Android boot chain. This article focuses on the first software stage — the Bootloader. The Bootloader is the first software code to run after hardware powers on (hard-coded... » read more

Writing an OS Kernel from Scratch — Part 16: VMA and Process Exit — Safely Reclaiming Every Byte of Memory

dean
从零写 OS kernel-Part 16: VMA 与process退出 — 安全reclaim每一片内存 “Allocating memory is just the beginning — safe release is the true endpoint. Today, we implement Virtual Memory Area (VMA) management, ensuring every resource is reclaimed without leaks when a process exits!” 在前几篇中, 我们Implementation了 Buddy 系统, Slab allocate器, 用户态 malloc, 但process的virtual address空间仍是一团乱麻: 无法跟踪哪些Region已allocate process退出时, 物理页, file descriptor,... » read more

Writing an OS Kernel from Scratch | NIC — From PHY to Socket

dean
Writing an OS Kernel from Scratch | NIC — From PHY to Socket Have you ever thought about this process: You type in a URL, how does the data packet get sent from your computer to the server? The CPU hands the data to the network card, and the network card sends the electrical signal... » read more

S09 — ECC Memory: How Single-Bit Errors Are Detected and Corrected

dean
S09 — ECC Memory: How Single-Bit Errors Are Detected and Corrected Key Insight: A reliable system is one that can still operate correctly under the worst conditions. Two Types of Memory Errors: Error Detection vs. Error Correction Memory errors fall into two categories: Bit Flip: Physical causes: - Cosmic rays (high-energy particles) hitting a DRAM... » read more

H07 — How DDR Power Consumption Is Calculated: IDD Parameters and Power Models

dean
H07 — How DDR Power Consumption Is Calculated: IDD Parameters and Power Models Key Insight: Every refresh, every activation, every read and write consumes power. Components of DDR Power Consumption DDR memory power consumption has three parts: Static Power (Leakage) + Dynamic Power (Switching) + I/O Power. DDR 系统功耗分解: 1. 核心功耗(Core Power): - DRAM Cell... » read more

S10 — How to Read a Memory Datasheet

dean
S10 — How to Read a Memory Datasheet Key Insight: Engineers who can read a datasheet can make correct product decisions. Basic Structure of a Datasheet A memory datasheet typically contains the following main sections: Typical memory datasheet structure: 1. Overview - Capacity, model number, voltage, package 2. Architecture - Organization (e.g., 1G × 8,... » read more

H03 — CL-tRCD-tRP-tRAS: How Memory Timings Affect Actual Latency

dean
H03 — CL-tRCD-tRP-tRAS: How Memory Timings Affect Actual Latency Key Insight: Choosing memory only by rated frequency is like buying a car only by top speed. You’ll miss a lot. What Are Memory Timings Memory timings are parameters describing delays between memory commands. They collectively determine how fast memory operations are. DDR4 主要时序参数(以 DDR4-3200 CL22... » read more

Writing an OS Kernel from Scratch – Part 30: Window Manager Mouse Support — Implementing Click, Drag, and Window Operations

dean
# Writing an OS Kernel from Scratch – Part 30: Window Manager Mouse Support — Implementing Click, Drag, and Window Operations “The keyboard is efficient, but the mouse is intuitive. Today, we integrate mouse support into the window manager, achieving true graphical interaction!” In the previous article, we successfully implemented the PS/2 mouse driver and... » read more

A07 — Memory Pool: Pre-allocate, On-demand Allocation, Avoiding Fragmentation

dean
A07 — Memory Pool: Pre-allocate, On-demand Allocation, Avoiding Fragmentation Key Insight: In scenarios with frequent allocation/deallocation, pre-allocating a pool is 100x faster than asking the system each time. What is a Memory Pool A Memory Pool pre-allocates a large block of memory and allocates from it on demand. Compared to calling malloc each time, memory... » read more

332 – Android init Process: The First Userspace Process

dean
332 – Android init Process: The First Userspace Process Series Navigation: 330-Boot Overview | 331-Bootloader | 333-Zygote Two articles ago, we covered how the Bootloader loads the kernel. Last time, we covered how the kernel decompresses, initializes hardware, and jumps to execute userspace code. Now we arrive at a pivotal role in the Android boot... » read more