0xKiire
Home About

0xKiire: Memory, I/O, Concurrency, and Files

Exploring low-level programming, systems design, and performance optimization

Append-Only Logs: The Storage Pattern Behind Databases and Durable Systems
February 23, 2025
filesiostoragelogswaldurabilityczigrust
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 →
Reactor vs Proactor: Event Loops, Async I/O, and How Servers Scale
February 22, 2025
ioconcurrencyevent-loopepollio_uringasyncczigrust
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 →
Memory Debugging: AddressSanitizer, Valgrind, and Practical Triage
February 21, 2025
memorydebuggingasanvalgrindsanitizersczigrust
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 →
Concurrent File Processing Pipelines: Batching, Backpressure, and Work Partitioning
February 20, 2025
concurrencyfilesiopipelinesbackpressureperformanceczigrust
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 →
The Page Cache and Writeback: Why Disk I/O Doesn't Behave Like You Think
February 19, 2025
iofilespage-cachelinuxperformancedurabilityczigrust
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 →
Atomic File Save Patterns: temp files, write barriers, and avoiding torn writes
February 18, 2025
filesiodurabilitycrash-consistencychecksumsczigrust
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 →
Crash Consistency: fsync(), rename(), and Durable Writes You Can Trust
February 17, 2025
filesiodurabilityfsyncrenamefilesystemlinuxczigrust
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 and Parking: How Fast Locks Sleep Without Syscalls
February 16, 2025
concurrencyfutexlinuxsynchronizationmutexczigrust
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 →
Advanced mmap: madvise(), mincore(), and Page-Fault Aware Performance
February 15, 2025
memoryiommapmadvisemincorelinuxperformanceczigrust
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 →
Message Passing and Channels: Concurrency Without Shared Mutable State
February 14, 2025
concurrencychannelsmessage-passingbackpressureczigrust
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 and Backpressure: Scaling Work Without Melting Down
February 13, 2025
concurrencythreadsthread-poolbackpressurequeuesczigrust
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 on Unix: flock() vs fcntl() and What They Actually Guarantee
February 12, 2025
filesiolockingflockfcntlunixlinuxczigrust
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 Deep Dive: open flags, offsets, CLOEXEC, and dup()
February 11, 2025
iofilesunixlinuxfile-descriptorssyscallsczigrust
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() →
Async I/O on Linux with io_uring: A Practical Overview
February 10, 2025
ioconcurrencyasyncio_uringlinuxperformanceczigrust
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 →
I/O Multiplexing: select(), poll(), and epoll() Explained
February 9, 2025
ioconcurrencyepollnetworkinglinuxevent-loopczigrust
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 →
Filesystems 101: Inodes, Directories, and What a Path Lookup Really Does
February 8, 2025
filesfilesysteminodeslinuxioczigrust
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 →
mmap vs read/write: Choosing the Right File Access Strategy
February 7, 2025
iofilesmmappage-cachelinuxperformanceczigrust
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 →
Lock-Free SPSC Ring Buffer: A High-Throughput Queue Between Two Threads
February 6, 2025
concurrencylock-freering-bufferatomicsspscczigrust
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 →
Threads and Synchronization: Mutexes, Condition Variables, and Semaphores
February 5, 2025
concurrencythreadsmutexcondition-variablesemaphoresystems-programmingczigrust
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 →
Atomics and Memory Ordering: Building Correct Lock-Free Code
February 4, 2025
concurrencyatomicsmemory-orderinglock-freesystems-programmingczigrust
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 →
File I/O Fundamentals: read/write, Buffers, and the Cost of Syscalls
February 3, 2025
iofilessyscallslinuxperformanceczigrust
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 →
Cache Locality and Data Layout: Turning Memory Into Throughput
February 2, 2025
memorycacheperformancelocalitydata-layoutczigrust
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 →
Virtual Memory Foundations: Address Spaces, Paging, and Protection
February 1, 2025
memoryvirtual-memoryospagingsystems-programmingczigrust
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 →
Building a Memory Allocator from Scratch in C
January 31, 2025
cmemory-managementallocatorssystems-programmingheap
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 - Exploring the Depths of Systems Programming
January 31, 2025
welcomeintroductionsystems-programming
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 →
📡 Subscribe via RSS
Twitter Codeberg Email Subscribe via RSS Subscribe via Atom Subscribe via JSON

© 2025 0xKiire. All rights reserved.