Understanding Low-Level Principles – Memory Series | S06 | How DDR5 Doubles Memory Bandwidth Compared to DDR4

dean
Understanding Low-Level Principles – Memory Series | S06 | How DDR5 Doubles Memory Bandwidth Compared to DDR4 Key Insight: Every new generation of memory standard is essentially bargaining with the laws of physics — when bandwidth is insufficient, find a new way to “squeeze” more data through. 1. The Bandwidth Improvement Formula Memory bandwidth calculation... » read more

A06 — new/delete vs malloc/free: Differences in C++ Memory Management

dean
# A06 — new/delete 和 malloc/free: C++ memory management的Difference **金句**: new 不是 malloc, delete 不是 free — 它们不只是allocate, 还有构造和析构. — ## new 和 malloc 的Essential Difference “` new 和 malloc 的区别: malloc: – C 库函数 – 只分配内存,不初始化 – 返回 void* – 失败返回 NULL new: – C++ 关键字 – 分配内存 + 调用构造函数 – 返回具体类型的指针(不需要类型转换) – 失败抛出... » read more

K11 — The Full Path of Physical Page Allocation: alloc_pages and the Buddy System

dean
K11 — The Full Path of Physical Page Allocation: alloc_pages and the Buddy System Key Insight: Every call to alloc_pages embarks on a complete journey from request to physical page frame. The alloc_pages Function Signature alloc_pages is the core function for allocating physical pages in Linux: struct page *alloc_pages(gfp_t gfp_mask, unsigned int order); Parameters: -... » read more

[Writing an OS Kernel from Scratch] 335 – ARM Architecture Boot: From Power-On to Kernel

dean
title: [Writing an OS Kernel from Scratch] 335 – ARM Architecture Boot: From Power-On to Kernel category: os tag: [arm, boot, embedded, u-boot] source: https://github.com/golang12306/os-kernel-from-scratch [Writing an OS Kernel from Scratch] 335 – ARM Architecture Boot: From Power-On to Kernel 1. ARM Boot Sequence Overview Embedded device boot is a layered relay race. To understand... » read more

Writing an OS Kernel from Scratch | 347: Display — From Framebuffer to GPU

dean
Writing an OS Kernel from Scratch | 347: Display — From Framebuffer to GPU Abstract: The display is the most intuitive output device of a computer, but the timing, resolution, framebuffer, and GPU rendering pipeline behind it are rarely studied in depth. This article starts from CRT timing principles, explains the DRM/KMS architecture, modetest/xrandr commands,... » read more

B10 — Why fork is Fast: The Copy-On-Write Mechanism

dean
B10 — Why fork is Fast: The Copy-On-Write Mechanism Key Insight: Don’t copy, just share. Until it’s actually needed. The Traditional Problem with fork: Massive Memory Copying The fork system call creates a new process. The traditional implementation copies the entire memory space of the parent process: 传统 fork 的问题: 父进程内存:假设 1GB fork() 执行时: -... » read more

Writing an OS Kernel from Scratch – Part 4: Entering Protected Mode (Detailed Segmented Memory Management)

dean
# Writing an OS Kernel from Scratch – Part 4: Entering Protected Mode (Detailed Segmented Memory Management) “Protected mode ≠ Paging! Its first line of defense is the segmentation mechanism that modern OSes ‘quietly bypass.'” In the previous few articles, we used GRUB to easily boot the kernel, output “Hello World,” and understood the Multiboot... » read more

H08 — DDR5 On-Die ECC and Sideband ECC: On-Chip Error Correction vs System ECC

dean
H08 — DDR5 On-Die ECC and Sideband ECC: On-Chip Error Correction vs System ECC Key Insight: ECC is not just a technology. It is a commitment to data reliability. ECC Types Introduced in DDR5 DDR5 has three types of ECC, working at different levels: DDR5 ECC 的三层架构: Layer 1:On-Die ECC(片内 ECC) → DRAM 颗粒内部,每颗颗粒自己纠错 →... » read more

Writing an OS Kernel from Scratch – Part 5: Enabling Paging — Building the Foundation of Virtual Memory

dean
# Writing an OS Kernel from Scratch – Part 5: Enabling Paging — Building the Foundation of Virtual Memory “Segmentation is just a transition; paging is the true moat of modern operating systems. Today, we manually enable x86 paging, giving the kernel virtual memory!” In the previous article, we deeply understood protected mode and segmented... » read more

354 | Interrupt Controller: How Hardware Interrupts the CPU

dean
354 | Interrupt Controller: How Hardware Interrupts the CPU Key Insight: You press a key, and a character appears on the screen almost simultaneously — behind this, the CPU has never been “waiting” for the keyboard. It has been running its own code the whole time, until the hardware forcibly “interrupts” it. 1. Problem: How... » read more

K04 — When Memory Is Exhausted: How the OOM Killer Chooses Its Victims

dean
K04 — When Memory Is Exhausted: How the OOM Killer Chooses Its Victims Key Insight: When memory is exhausted, the kernel needs a “referee” to decide who should leave. That is the OOM Killer. OOM Killer Trigger Conditions When system memory is critically low, Linux invokes the OOM Killer. The trigger is not “memory is... » read more

S08 — How Does an Address Travel from the CPU to a DRAM Cell

dean
S08 — How Does an Address Travel from the CPU to a DRAM Cell Key Insight: Every bit of data has its complete journey map. The Complete Path from CPU to DRAM How does an address issued by the CPU ultimately select a DRAM cell? It requires a complete address resolution process. Complete path (simplified):... » read more

K02 — Process Address Space: Virtual Address Management and VMA

dean
K02 — Process Address Space: Virtual Address Management and VMA Key Insight: Each process’s address space is an independent map. Every region on the map is described by a VMA. What is a VMA (Virtual Memory Area) VMA (Virtual Memory Area) is a Linux kernel data structure describing a contiguous region in a process’s virtual... » read more