Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS_Projects

Operating Systems course projects, Dept. EE, Tsinghua University, Spring 2025.

Contents

This repository contains three experiments designed for an Operating Systems course, implemented in C11 using POSIX APIs on Linux:

Project 1: Bank Teller Simulation

  • 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.

Project 2: Parallel Quick Sort with Shared Memory

  • 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.

Project 3: Banker's Algorithm

  • 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.

Requirements

  • GCC with POSIX support
  • Make
  • Python 3 (for verification scripts)

Running

make               # Builds the project binary
./<binary> [...]   # Run individual simulations

Refer to each project's subfolder for usage instructions and sample input files.

Environment

  • OS: Ubuntu 22.04 LTS
  • Kernel: Linux 5.15.0-94-generic
  • Architecture: x86_64

License

This code is part of coursework and not licensed for commercial reuse.

Author

Shuochen Chen, Tsinghua University, Spring 2025

About

Operating Systems course projects, 2025 Spring.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages