This repository contains my implementations of the two main programming assignments from the Systems Programming (Systemprogrammierung) course.
Both projects were written entirely in C and focus on low-level system concepts: TCP socket programming, multi-threading with POSIX threads (pthreads), synchronization, custom binary protocols, and efficient data structures.
Systemprogrammierung/
├── chat/ # Multi-threaded chat server (CMake)
└── factorizer/ # Concurrent factorization service (Make)
A fully functional multi-client TCP chat server.
- TCP server supporting multiple concurrent clients
- One dedicated client thread per connection
- Thread-safe user management (doubly-linked list + mutex)
- Broadcasting via a dedicated broadcast agent thread
- Custom binary network protocol
- Join/leave notifications and basic commands
- Configurable via command-line (
-p PORTfor port 1024–49151,-ddebug,-hhelp) - Rich logging with colors and optional hex dumps
C99 · POSIX Sockets · pthreads · CMake
cd chat
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
./server -p 8111 # default port is 8111Connect with:
telnet localhost 8111
# or
nc localhost 8111A concurrent client–server application for prime factorization of large (64-bit) integers.
- TCP server with a pool of 4 worker threads
- Thread-safe job queue implemented as a doubly-linked list (semaphores + mutex)
- Efficient trial-division factorization
- Separate client for submitting numbers
- Proper cleanup and error handling
C · POSIX Threads · POSIX Sockets · Makefile
cd factorizer
make
./server # starts server on port 44444# In another terminal:
./client # submit numbers to be factored- Socket programming and custom binary protocols
- Concurrency & synchronization (pthreads, mutexes, semaphores)
- Thread-safe data structures and producer-consumer patterns
- Low-level C systems programming and resource management
- CMake and GNU Make build systems