feat: project 1
This commit is contained in:
parent
d6ef47cff4
commit
f04d70f615
16 changed files with 702 additions and 0 deletions
25
project1/README.md
Normal file
25
project1/README.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# CS3502 Project 1: Asynchronous Banking Account Management
|
||||
|
||||
This directory contains multiple toy models of asynchronous bank account systems, demonstrating the principles of race condition and deadlock avoidance.
|
||||
|
||||
## Usage
|
||||
|
||||
There are 4 programs labeled Phases 1-4:
|
||||
|
||||
- **Phase 1**: Naive non-supervised multi-threaded account system
|
||||
- **Phase 2**: Mutex-based account system
|
||||
- **Phase 3**: Deadlock generation
|
||||
- **Phase 4**: Deadlock resolution via lock ordering
|
||||
|
||||
If you have [Nix](https://nixos.org/) installed:
|
||||
|
||||
```sh
|
||||
nix run .#p1-phase1
|
||||
```
|
||||
|
||||
Otherwise, the code must be compiled manually:
|
||||
|
||||
``` sh
|
||||
gcc -c phase1/phase1.c -o phase1.bin
|
||||
```
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue