Append-only logs are simple, fast, and crash-friendly. Learn record formats, checksums, compaction, and how WAL-like designs work, with C, Zig, and Rust examples.
Read more about Append-Only Logs: The Storage Pattern Behind Databases and Durable Systems →
0xKiire: Memory, I/O, Concurrency, and Files
Exploring low-level programming, systems design, and performance optimization
Reactor (readiness) and proactor (completion) are two mental models for scalable I/O. Learn how epoll and io_uring fit, and implement tiny examples in C, Zig, and Rust.
Read more about Reactor vs Proactor: Event Loops, Async I/O, and How Servers Scale →
A practical guide to debugging memory issues: use-after-free, buffer overflows, leaks, and data races. Learn what tools catch, what they miss, and how to reproduce issues with C, Zig, and Rust.
Read more about Memory Debugging: AddressSanitizer, Valgrind, and Practical Triage →
Build a practical pipeline to process many files concurrently without overwhelming the system. Learn batching, bounded queues, and work partitioning with C, Zig, and Rust examples.
Read more about Concurrent File Processing Pipelines: Batching, Backpressure, and Work Partitioning →
Understand Linux page cache, buffered I/O, dirty pages, writeback, and how fsync interacts with durability. Includes experiments and code in C, Zig, and Rust.
Read more about The Page Cache and Writeback: Why Disk I/O Doesn't Behave Like You Think →
Practical patterns for safely updating configuration and state files. Covers temp+rename, write-ahead logs, checksums, and length-prefix formats with C, Zig, and Rust examples.
Read more about Atomic File Save Patterns: temp files, write barriers, and avoiding torn writes →
Power loss and crashes turn "it worked" into "it corrupted". Learn what fsync guarantees, why rename is special, and how to implement crash-consistent updates in C, Zig, and Rust.
Read more about Crash Consistency: fsync(), rename(), and Durable Writes You Can Trust →
Futexes are the kernel primitive behind fast mutexes and condition variables on Linux. Learn the "fast path" vs "slow path", and build a tiny mutex using C, Zig, and Rust.
Read more about Futexes and Parking: How Fast Locks Sleep Without Syscalls →
Go beyond basic mmap. Learn how to hint access patterns with madvise, check residency with mincore, and design page-fault friendly readers in C, Zig, and Rust.
Read more about Advanced mmap: madvise(), mincore(), and Page-Fault Aware Performance →
Learn message-passing concurrency: bounded vs unbounded channels, backpressure, fan-in/fan-out, and shutdown semantics. Includes C, Zig, and Rust examples and practical patterns.
Read more about Message Passing and Channels: Concurrency Without Shared Mutable State →
Thread pools are easy to create and hard to run safely. Learn bounded queues, backpressure, shutdown, and avoiding unbounded memory growth, with C, Zig, and Rust examples.
Read more about Thread Pools and Backpressure: Scaling Work Without Melting Down →
File locking is deceptively subtle. Learn advisory locks, flock vs fcntl record locks, lease-like patterns, and how to implement a safe "single instance" lockfile in C, Zig, and Rust.
Read more about File Locking on Unix: flock() vs fcntl() and What They Actually Guarantee →
File descriptors are the universal I/O handle on Unix. Learn how fd state works (offsets, flags), how dup/dup2 behave, why CLOEXEC matters, and how to build robust patterns in C, Zig, and Rust.
Read more about File Descriptors Deep Dive: open flags, offsets, CLOEXEC, and dup() →
io_uring moves beyond readiness: submit I/O and receive completions. Learn the core concepts, when it helps, and minimal examples in C, Zig, and Rust.
Read more about Async I/O on Linux with io_uring: A Practical Overview →
How do servers handle thousands of connections? Learn readiness-based I/O with select/poll/epoll, common edge cases, and build a tiny event loop in C, Zig, and Rust.
Read more about I/O Multiplexing: select(), poll(), and epoll() Explained →
Understand the core filesystem abstractions: inodes, dentries, hard links, symlinks, and why path lookup can be expensive. Includes practical code in C, Zig, and Rust.
Read more about Filesystems 101: Inodes, Directories, and What a Path Lookup Really Does →
When should you use mmap, and when are classic read/write loops better? Learn page cache behavior, page faults, random access, and safe patterns in C, Zig, and Rust.
Read more about mmap vs read/write: Choosing the Right File Access Strategy →
Build a correct single-producer single-consumer ring buffer using atomics, and understand why SPSC is simpler than MPMC. Includes C, Zig, and Rust implementations.
Read more about Lock-Free SPSC Ring Buffer: A High-Throughput Queue Between Two Threads →
A detailed, practical guide to concurrency primitives: what mutexes guarantee, how condition variables work, and how to structure correct waiting loops — with C, Zig, and Rust examples.
Read more about Threads and Synchronization: Mutexes, Condition Variables, and Semaphores →
A practical guide to atomic operations and memory ordering (relaxed/acquire/release/seq_cst). Learn what the CPU and compiler are allowed to do, with C, Zig, and Rust examples.
Read more about Atomics and Memory Ordering: Building Correct Lock-Free Code →
Learn the practical mechanics of file I/O: file descriptors, syscalls, buffering, partial reads/writes, and robust patterns with C, Zig, and Rust.
Read more about File I/O Fundamentals: read/write, Buffers, and the Cost of Syscalls →
CPU caches reward predictable access. Learn spatial/temporal locality, AoS vs SoA, prefetching, and how to measure improvements in C, Zig, and Rust.
Read more about Cache Locality and Data Layout: Turning Memory Into Throughput →
A detailed, practical walkthrough of virtual memory: pages, page tables, permissions, and what happens during a page fault — with C, Zig, and Rust examples.
Read more about Virtual Memory Foundations: Address Spaces, Paging, and Protection →
Learn how memory allocation works by implementing your own malloc() and free() functions in C. A deep dive into heap management, fragmentation, and optimization techniques.
Read more about Building a Memory Allocator from Scratch in C →
Welcome to 0xKiire, a blog dedicated to low-level programming, systems design, and performance optimization. Join me as we explore the fascinating world beneath the abstractions.
Read more about Welcome to 0xKiire - Exploring the Depths of Systems Programming →