This repository contains hands-on implementations of core system programming concepts using C++.
It is designed to demonstrate a practical understanding of operating system internals, inter-process communication (IPC), process management, and synchronization mechanisms on Unix/Linux systems.
The focus is on how things work under the hood, not just on producing output.
- Process creation and execution (
fork,exec) - Inter-process communication (Pipes, FIFOs)
- Synchronization problems (Producer–Consumer, Reader–Writer)
- File system and low-level file handling
- Shell internals and command execution
- Performance-conscious, low-level C++ programming
- Language: C++
- Platform: Linux / Unix-based systems
- Standards & APIs: POSIX system calls
A basic Unix-like shell that:
- Accepts user commands
- Spawns child processes using
fork() - Executes commands using the
exec()family - Demonstrates process lifecycle and command execution flow
Concepts: process management, system calls, command parsing
Implementation of unnamed pipes:
- Enables communication between parent and child processes
- Demonstrates unidirectional data flow
- Manages file descriptors correctly
Concepts: IPC, pipes, file descriptor handling
Implements communication between unrelated processes:
- Creates and uses named pipes (FIFOs)
- Demonstrates blocking behavior and synchronization
- Useful for producer–consumer style communication
Concepts: FIFO, IPC across independent processes
Classic synchronization problem implementation:
- Manages shared resources safely
- Demonstrates race conditions and coordination logic
Concepts: shared variables, synchronization fundamentals
Implementation of the reader–writer synchronization problem:
- Allows concurrent readers
- Ensures exclusive access for writers
- Focuses on correctness and access control
Concepts: concurrency, synchronization strategies
Utility for file inspection and analysis:
- Reads file metadata
- Demonstrates low-level file system operations
Concepts: file handling, OS-level file APIs
Use g++ to compile individual programs:
g++ filename.cpp -o output
./output