{"id":13607312,"url":"https://github.com/UNIkeEN/A-Simple-File-System","last_synced_at":"2025-04-12T11:32:11.540Z","repository":{"id":170982358,"uuid":"647278054","full_name":"UNIkeEN/A-Simple-File-System","owner":"UNIkeEN","description":"SJTU CS2303 Project III : A Simple File System, inspired by Linux's ex2, simulating superblocks and inodes","archived":false,"fork":false,"pushed_at":"2024-06-24T10:08:42.000Z","size":2440,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T23:08:28.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UNIkeEN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T12:44:55.000Z","updated_at":"2024-07-28T01:49:55.000Z","dependencies_parsed_at":"2024-08-01T19:53:40.756Z","dependency_job_id":null,"html_url":"https://github.com/UNIkeEN/A-Simple-File-System","commit_stats":null,"previous_names":["unikeen/a-simple-file-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNIkeEN%2FA-Simple-File-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNIkeEN%2FA-Simple-File-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNIkeEN%2FA-Simple-File-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNIkeEN%2FA-Simple-File-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UNIkeEN","download_url":"https://codeload.github.com/UNIkeEN/A-Simple-File-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560194,"owners_count":21124611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:17.567Z","updated_at":"2025-04-12T11:32:06.739Z","avatar_url":"https://github.com/UNIkeEN.png","language":"C","funding_links":[],"categories":["资源清单"],"sub_categories":["CS2303 (原 CS356) - 操作系统课程设计"],"readme":"# SJTU CS2303 Project 3: A simple File System\n\nUNIkeEN, 2023 Spring\n\n## Description\n\n这是上海交通大学操作系统课程设计的项目三：文件系统。按题目要求（见`problem set.pdf`）分为三步：实现磁盘系统、实现文件系统、使用socket连接两者。\n\n本项目借鉴了linux的ex2文件系统，自行设计了superblock和inode，但由于时间仓促，许多细节处性能仍值得优化。具体的实现细节请见报告（见`report.pdf`）\n\nAccording 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. \n\nThis 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.\n\n\u003cimg src=\"figs/pre/arch.JPG\" style=\"zoom: 67%;\" /\u003e \n\n\u003cimg src=\"figs/pre/spb.JPG\" alt=\"spb\" style=\"zoom:67%;\" /\u003e \n\n\u003cimg src=\"figs/pre/inode.JPG\" alt=\"inode\" style=\"zoom:67%;\" /\u003e \n\n## Build\n\nYou 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.\nThe compiled executable file of step3 will be located in the `step3/build/` directory\n\n## Usage\n\n### Step 1\n\n```shell\n./disk \u003ccylinders\u003e \u003csector per cylinder\u003e \u003ctrack-to-track delay\u003e \u003cdisk-storage-filename\u003e\n```\n\n* cylinders: Cylinder number of your simulated disk.\n\n* sector per cyclinder: Sector number per cylinder of your simulated disk.\n\n* track-to-track delay: Time in milliseconds to simulate the movement of the magnetic head\n\n* disk-storage-filename: File name that store disk data.\n\n### Step 2\n\n```shell\n./fs\n```\n\n### Step 3\n\n```shell\n./disk \u003ccylinders\u003e \u003csector per cylinder\u003e \u003ctrack-to-track delay\u003e \u003cdisk-storage-filename\u003e \u003cDiskPort\u003e\n\n./fs \u003cDiskPort\u003e \u003cFSPort\u003e\n\n./client \u003cFSPort\u003e\n```\n\nThe input commands supported after startup all meet the required format. \n\nIn steps 2 and 3, two debug instructions are also provided to view the inode information and block data of the specified number, respectively:\n\n```shell\ngi \u003cinode id\u003e\ngb \u003cblock id\u003e\n```\n\n## Screenshots\n\n\u003cimg src=\"figs/pre/step2shot1.png\" alt=\"s2\" style=\"zoom:67%;\" /\u003e \n\n\u003cimg src=\"figs/pre/step3shot1.png\" alt=\"s3\" style=\"zoom:67%;\" /\u003e \n\n## Code Structure\n```\n.\n├── Makefile            # Makefile that makes all 3 steps out\n├── report.pdf          # report\n├── step1               # source code of step1\n│   ├── disk.c\n│   └── Makefile\n├── step2               # source code of step2 (refer to the report for details)\n│   ├── include\n│   │   ├── dir.h\n│   │   ├── diskop.h\n│   │   ├── inode.h\n│   │   └── superblock.h\n│   ├── Makefile\n│   └── src\n│       ├── diskop.c\n│       ├── inode.c\n│       ├── main.c\n│       └── superblock.c\n├── step3               # source code of step3\n│   ├── build\n│   ├── client\n│   │   └── client.c\n│   ├── disk\n│   │   └── disk.c\n│   ├── fs\n│   │   ├── include\n│   │   │   ├── dir.h\n│   │   │   ├── diskop.h\n│   │   │   ├── inode.h\n│   │   │   └── superblock.h\n│   │   └── src\n│   │       ├── diskop.c\n│   │       ├── inode.c\n│   │       ├── main.c\n│   │       └── superblock.c\n│   └── Makefile\n└── README.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUNIkeEN%2FA-Simple-File-System","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUNIkeEN%2FA-Simple-File-System","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUNIkeEN%2FA-Simple-File-System/lists"}