Tagged articles
2 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Dec 3, 2022 · Backend Development

Implementing a Multi-Level Timing Wheel in C for Efficient Timer Management

This article explains the design and C implementation of a five‑level hierarchical timing wheel, covering its data structures, pointer handling with bitwise operations, timer insertion, modification, deletion, cascade processing, and a demo program that highlights blocking behavior of long‑running timer callbacks.

C programmingconcurrencykernel timer
0 likes · 22 min read
Implementing a Multi-Level Timing Wheel in C for Efficient Timer Management
Liangxu Linux
Liangxu Linux
Aug 10, 2021 · Operations

How Linux Implements High‑Performance Timers with a Hierarchical Timing Wheel

This article explains the various timer implementations—sorted linked list, min‑heap, balanced binary tree, and especially the hierarchical timing wheel used in the Linux kernel—detailing their time complexities, data structures, and the core C code that inserts and executes timers efficiently.

C programmingLinuxO(1) complexity
0 likes · 11 min read
How Linux Implements High‑Performance Timers with a Hierarchical Timing Wheel