Trigger (Almost) Every Signal

Type kill -L and you’ll see all the standard signals available on Linux — 31 in total. $ kill -L 1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS 8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM 15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN 22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH 29 POLL 30 PWR 31 SYS This time, let’s try to trigger these signals in their intended scenarios....

May 23, 2025 · 21 min · 4264 words · Wokron

Linux Process Memory Management

We’ve all learned that a process’s memory consists of the heap and the stack. But this model is still too abstract — it conceals many operating system details. So here’s a brief rundown of process memory management. Heap Growth libc provides the malloc function for heap memory allocation. Under the hood, it relies on the brk system call. From the kernel’s perspective, the heap is a simple structure. It consists of a fixed heap base (the end symbol) and a movable heap top (called the program break)....

May 17, 2025 · 12 min · 2543 words · Wokron

Introduction to the QEMU Emulator

This article is part of the BUAA Operating Systems course preparatory tutorial. This version was written by me. In 2024, the course lab environment was changed from GXemul to QEMU. To help students adapt to the new environment, two new articles were added to the preparatory tutorial: “GDB: Dissecting Programs” and “Introduction to the QEMU Emulator.” An operating system is a program that runs directly on computer hardware, managing hardware resources below while providing unified services to software above....

January 21, 2024 · 8 min · 1654 words · Wokron

GDB: Dissecting Programs

This article is part of the BUAA Operating Systems course preparatory tutorial. This version was written by me. In 2024, the course lab environment was changed from GXemul to QEMU. To help students adapt to the new environment, two new articles were added to the preparatory tutorial: “GDB: Dissecting Programs” and “Introduction to the QEMU Emulator.” Think back to when you first entered the world of programming. Everyone has had this experience: a carefully written program just won’t produce the correct result, and even after reviewing the code from top to bottom several times, the hidden bug remains elusive....

January 18, 2024 · 16 min · 3402 words · Wokron

A Practical CMake Tutorial

1. Introduction I’ve been working on a C++ project recently and had to learn CMake. Honestly, CMake’s quirky syntax can be quite intimidating at first. But once you get hands-on, you’ll find that only a small subset is needed day-to-day, and it generally follows predictable patterns. Master this subset and you can likely organize a fairly large project. That’s exactly what this tutorial aims to cover. Of course, you’ll need to understand compilation and linking before reading this....

September 3, 2023 · 7 min · 1408 words · Wokron