Author

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

232 iptables: Deep Analysis of Rule Tables and Chains

dean
232 iptables: Deep Analysis of Rule Tables and Chains Preface In the previous article, we gained a deep understanding of Netfilter’s HOOK mechanism — that’s the underlying infrastructure of the entire framework. If we think of Netfilter as the ramp system of a highway, then iptables is the rulebook at the toll booths on those... » read more

356 | System Calls: How User Mode Triggers Kernel Code

dean
356 | System Calls: How User Mode Triggers Kernel Code Key Insight: User programs can never directly read or write hardware. Even just printing a character requires asking the kernel to do it on their behalf. System calls are the only gateway for this “proxy” service. 1. Problem: What If a User-Mode Program Wants to... » read more

Writing an OS Kernel from Scratch | Windows GPT+UEFI Boot: ESP Partition, NVRAM Boot Entries, and Secure Boot — Complete Analysis

dean
Writing an OS Kernel from Scratch | Windows GPT+UEFI Boot: ESP Partition, NVRAM Boot Entries, and Secure Boot — Complete Analysis The previous chapter covered the Windows boot chain in MBR+BIOS mode. The System Reserved partition was the core anchor of the entire chain — BOOTMGR and BCD both resided in that 100MB FAT32 partition,... » read more

05: Memory Management – User Mode: From brk to malloc — Deep Dive into User-Space Memory Allocators

dean
# 05: Memory Management – User Mode: From brk to malloc — Deep Dive into User-Space Memory Allocators “When a user program calls malloc, how do the kernel and libc work together? This article delves into the brk/mmap system calls, the dlmalloc algorithm, and compares glibc’s implementation details, building an efficient, low-fragmentation user-space memory allocator.”... » read more

358 | Timer: HPET and Clock Interrupts

dean
358 | Timer: HPET and Clock Interrupts Key Insight: The operating system’s sense of time doesn’t come from “watching a clock” — it’s “punched out” by interrupts. Each clock tick tells the kernel that another jiffy has passed — and then it decides who gets to run next. 1. Three Clock Hardware Components The x86... » read more