Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/UNIkeEN/A-Simple-File-System
SJTU CS2303 Project III : A Simple File System, inspired by Linux's ex2, simulating superblocks and inodes
https://github.com/UNIkeEN/A-Simple-File-System
Last synced: about 1 month ago
JSON representation
SJTU CS2303 Project III : A Simple File System, inspired by Linux's ex2, simulating superblocks and inodes
- Host: GitHub
- URL: https://github.com/UNIkeEN/A-Simple-File-System
- Owner: UNIkeEN
- Created: 2023-05-30T12:44:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-24T10:08:42.000Z (6 months ago)
- Last Synced: 2024-08-01T19:44:44.749Z (4 months ago)
- Language: C
- Homepage:
- Size: 2.33 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cs - @UNIkeEN, 2023 Spring
README
# SJTU CS2303 Project 3: A simple File System
UNIkeEN, 2023 Spring
## Description
这是上海交通大学操作系统课程设计的项目三:文件系统。按题目要求(见`problem set.pdf`)分为三步:实现磁盘系统、实现文件系统、使用socket连接两者。
本项目借鉴了linux的ex2文件系统,自行设计了superblock和inode,但由于时间仓促,许多细节处性能仍值得优化。具体的实现细节请见报告(见`report.pdf`)
According to the requirements of the question (see `problem set.pdf`), there are three steps: implementing a disk system, implementing a file system, and connecting the two using sockets.
This project drew inspiration from Linux's EX2 file system and designed superblock and inode, but due to time constraints, many details of performance are still worth optimizing. Please refer to the report (see `report.pdf`) for specific implementation details.
## Build
You can use the `make` command in the root directory to compile all three step programs, or you can use the makefiles in each of the three step sub folders to compile them separately.
The compiled executable file of step3 will be located in the `step3/build/` directory## Usage
### Step 1
```shell
./disk
```* cylinders: Cylinder number of your simulated disk.
* sector per cyclinder: Sector number per cylinder of your simulated disk.
* track-to-track delay: Time in milliseconds to simulate the movement of the magnetic head
* disk-storage-filename: File name that store disk data.
### Step 2
```shell
./fs
```### Step 3
```shell
./disk./fs
./client
```The input commands supported after startup all meet the required format.
In steps 2 and 3, two debug instructions are also provided to view the inode information and block data of the specified number, respectively:
```shell
gi
gb
```## Screenshots
## Code Structure
```
.
├── Makefile # Makefile that makes all 3 steps out
├── report.pdf # report
├── step1 # source code of step1
│ ├── disk.c
│ └── Makefile
├── step2 # source code of step2 (refer to the report for details)
│ ├── include
│ │ ├── dir.h
│ │ ├── diskop.h
│ │ ├── inode.h
│ │ └── superblock.h
│ ├── Makefile
│ └── src
│ ├── diskop.c
│ ├── inode.c
│ ├── main.c
│ └── superblock.c
├── step3 # source code of step3
│ ├── build
│ ├── client
│ │ └── client.c
│ ├── disk
│ │ └── disk.c
│ ├── fs
│ │ ├── include
│ │ │ ├── dir.h
│ │ │ ├── diskop.h
│ │ │ ├── inode.h
│ │ │ └── superblock.h
│ │ └── src
│ │ ├── diskop.c
│ │ ├── inode.c
│ │ ├── main.c
│ │ └── superblock.c
│ └── Makefile
└── README.md
```