Lab 2: POSIX Shared-Memory Ring & Byte-Range Audit Ledger
Map files into process virtual memory with mmap() and msync(), coordinate concurrent writers with fcntl() byte-range record locks and flock(), and build local IPC pipelines over pipe2(), mkfifo(), and POSIX shm_open() shared memory.
Prerequisites in this module
What ./check.sh verifies
- Builds with -std=c11 -Wall -Wextra and no warnings.
- Archives shmlock.o into libshmlock.a and links shm_lock_ring.
- Streams 24 frames across 8-slot MAP_SHARED ring with process-shared semaphores.
- Writes 400-byte fcntl F_SETLKW byte-range audit ledger with digest 0x8702e998.
Subscribe or sign in to unlock this graded lab
Part of GL-C03 — Advanced I/O, IPC & Network Sockets. Full access includes all 16 KSA Terminal courses across GL-C01..GL-C04, GL-E00..GL-E07 & GL-Q01..GL-Q04 (288 lessons, 96 TAP 13 graded labs, real Linux 6.12, C11 & C++20/Qt 6 captures, slide decks, printable PDF/HTML handbooks, and flashcards).
Annual All-AccessUS$349/yrsave 25% · 3 months free
Monthly All-AccessUS$39/moCancel any time · All 16 courses
Team (3+ seats)US$290/seat/yrCard or Net-30 PO invoice
Progress is saved on this device.