https://github.com/BugenZhao/OSProject1
https://github.com/BugenZhao/OSProject1
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/BugenZhao/OSProject1
- Owner: BugenZhao
- Created: 2020-03-04T17:03:55.000Z (over 5 years ago)
- Default Branch: submission
- Last Pushed: 2020-06-04T15:20:02.000Z (about 5 years ago)
- Last Synced: 2024-10-14T09:29:45.465Z (9 months ago)
- Language: C
- Size: 1.62 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cs - @BugenZhao, 2020 Spring
README
# README for CS356 Operating System Projects - Spring 2020 - Project 1
## Personal Information
Ziqi Zhao (赵梓淇, Bugen Zhao, 518030910211), F1803302, CS, SEIEE, SJTU.## Report
Please refer to [`Report.pdf`](./Report.pdf)## Testscript
All build and test commands are in `Makefile`.To run the test, you should determine some required arguments then execute the following commands:
```sh
# For more info about the arguments, please refer to Makefile
# Start the emulator
make emulator (AVD_NAME=xxx KERNEL_ZIMG=yyy)
# Build and run tests, will output in `output.txt`
make testall (KID=xxx TOOLCHAIN=yyy)
# Do some cleanup
make clean
```## Directory Structure
```
.
├── BurgerBuddies # Problem 4: Burger Buddies
│ ├── jni
│ │ ├── Android.mk
│ │ ├── bugen_bbc.h # A header including other nessary headers
│ │ ├── BurgerBuddies.c # Main code of problem 4
│ │ ├── BurgerBuddies.h # Header for BurgerBuddies.c with some `random` utilities
│ │ ├── sbuf.c # A simple thread-safe FIFO buffer library inspired by CSAPP
│ │ ├── sbuf.h # Header for `sbuf.c`
│ │ ├── sem.c # A wrapper library for semaphores
│ │ └── sem.h # Header for `sem.c`
│ └── Makefile
├── include
│ └── ptree.h # Definition of `prinfo`, both for kernel and user
├── Makefile # Makefile of project
├── Prj1README.md # This README file
├── ptree_prtchld # Problem 3: Parent and child
│ ├── jni
│ │ ├── Android.mk
│ │ └── ptree_prtchld.c # Main code of problem 3
│ └── Makefile
├── ptree_syscall # Problem 1: `ptree` system call module
│ ├── Makefile
│ └── ptree.c # Main code of problem 1 - `ptree` syscall
└── ptree_test # Problem 2: Print the tree
├── jni
│ ├── Android.mk
│ └── ptree_test.c # Main code of problem 2
└── Makefile
```## Sample Output
Please refer to [`output.txt`](output.txt)
## Reference
- *Computer Systems: A Programmer's Perspective* for `sbuf.c` in Problem 4
- Visual Studio Code `c_cpp_properties.json` reference [ (link) ](https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference)
- Stack Overflow