Operating Systems course projects, Dept. EE, Tsinghua University, Spring 2025.
This repository contains three experiments designed for an Operating Systems course, implemented in C11 using POSIX APIs on Linux:
- Topic: Process synchronisation and mutual exclusion
- Description: Simulates a multi-teller bank system where customers arrive and queue for service. Implements synchronization primitives like mutexes and semaphores.
- Topic: Advanced inter-process communication (IPC)
- Description: Implements parallel quicksort on 1,000,000 elements using POSIX shared memory and
fork(). Features a shared segment with in-place sorting, atomic process control, and performance verification.
- Topic: Processor scheduling and deadlock avoidance
- Description: A self-contained C11 simulation of the Banker's Algorithm, complete with test cases that illustrate safe, unsafe, and invalid resource requests.
- GCC with POSIX support
- Make
- Python 3 (for verification scripts)
make # Builds the project binary
./<binary> [...] # Run individual simulationsRefer to each project's subfolder for usage instructions and sample input files.
- OS: Ubuntu 22.04 LTS
- Kernel: Linux 5.15.0-94-generic
- Architecture: x86_64
This code is part of coursework and not licensed for commercial reuse.
Shuochen Chen, Tsinghua University, Spring 2025