99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代做CSc 360、代寫A Simple File程序

時間:2023-11-26  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



 CSc 360: Operating Systems (Fall 2023)
Programming Assignment 3
P3: A Simple File System (SFS)
Spec Out: Oct 30, 2023 Code Due: Nov 27, 2023
1 Introduction
So far, you have built a shell environment and a multi-thread scheduler with process synchronization. Excellent job! What is still missing for a “real” operating system? A file system! In this assignment, you will implement utilities that perform operations on a file system similar to Microsoft’s FAT file system with some improvement.
1.1 Sample File Systems
You will be given a test file system image for self-testing, but you can create your own image following the specification, and your submission may be tested against other disk images following the same specification.
You should get comfortable examining the raw, binary data in the file system images using the program xxd.
IMPORTANT: since you are dealing with binary data, functions intended for string manipulation such as strcpy() do NOT work (since binary data may contain binary ‘0’ anywhere), and you should use functions intended for binary data such as memcpy().
2 Tutorial Schedule
In order to help you finish this programming assignment on time successfully, the schedule of the lectures has been updated to synchronize with the tutorials and the assignment. There are three tutorials arranged during the course of this assignment. NOTE: Please do attend the tutorials and follow the tutorial schedule closely.
Date
      Oct 31/Nov 1/3
      Nov 7/8/10
      Nov 14/15/17
      Nov 21/22/24
3 Requirements
3.1 Part I (3 points)
Tutorial
P3 spec go-thru and practice questions more on design and implementation Reading break, no tutorials this week testing and submission instructions
Milestones
design done
diskinfo/disklist done
diskget/diskput done
final deliverable
In Part I, you will write a program that displays information about the file system. In order to complete Part I, you will need to read the file system super block and use the information in the super block to read the FAT.
Your program for Part I will be invoked as follows (output values here are just for illustration purposes):
./diskinfo test.img

 Sample output:
     Super block information
     Block size: 512
     Block count: 5120
     FAT starts: 1
     FAT blocks: 40
     Root directory starts: 41
     Root directory blocks: 8
     FAT information
     Free blocks: 5071
     Reserved blocks: 41
     Allocated blocks: 8
Please be sure to use the exact same output format as shown above.
3.2 Part II (4 points)
In Part II, you will write a program, with the routines already implemented for Part I, that displays the contents of the root directory or a given sub-directory in the file system.
Your program for Part II will be invoked as follows:
     ./disklist test.img /sub_dir
The directory listing should be formatted as follows:
1. The first column will contain:
(a) F for regular files, or
(b) D for directories; followed by a single space
2. then 10 characters to show the file size, followed by a single space
3. then 30 characters for the file name, followed by a single space
4. then the file creation date and time
For example:
     F       2560
     F       5120
     F      48127
     F          8
3.3 Part III (4 points)
 foo.txt 2015/11/15 12:00:00
foo2.txt 2015/11/15 12:00:00
  makefs 2015/11/15 12:00:00
foo3.txt 2015/11/15 12:00:00

 In Part III, you will write a program that copies a file from the file system to the current directory in Linux. If the specified file is not found in the root directory or a given sub-directory of the file system, you should output the message
     File not found.
and exit.
Your program for Part III will be invoked as follows:
     ./diskget test.img /sub_dir/foo2.txt foo.txt
3.4 Part IV (4 points)
In Part IV, you will write a program that copies a file from the current Linux directory into the file system, at the root directory or a given sub-directory. If the specified file is not found, you should output the message
     File not found.
on a single line and exit.
Your program for Part IV will be invoked as follows:
     ./diskput test.img foo.txt /sub_dir/foo3.txt
4 File System Specification
The FAT file system has three major components: 1. the super block,
2. the File Allocation Table (informally referred to as the FAT), 3. the directory structure.
Each of these three components is described in the subsections below.
4.1 File System Superblock
The first block (512 bytes) is reserved to contain information about the file system. The layout of the superblock is as follows:
Description
File system identifier
Block Size
File system size (in blocks)
Block where FAT starts
Number of blocks in FAT
Block where root directory starts
Number of blocks in root dir
Size
8 bytes
2 bytes
4 bytes
4 bytes
4 bytes
4 bytes
4 bytes
Default Value
CSC360FS
0x200
0x00001400
0x00000001
0x00000028
0x00000029
0x00000008

 Note: Block number starts from 0 in the file system.
4.2 Directory Entries
Each directory entry takes 64 bytes, which implies there are 8 directory entries per 512 byte block. Each directory entry has the following structure:
Description
     Status
     Starting Block
     Number of Blocks
     File Size (in bytes)
     Creation Time
     Modification Time
     File Name
     unused (set to 0xFF)
The description of each field is as follows:
Size
1 byte
4 bytes
4 bytes
4 bytes
7 bytes
7 bytes
31 bytes
6 bytes
Status This is a bit mask that is used to describe the status of the file. Currently only 3 of the bits are used. It is implied that only one of bit 2 or bit 1 can be set to1. That is, an entry is either a normal file or it is a directory, not both.
Bit 0
Bit 1 Bit 2
set to 0 if this directory entry is available,
set to 1 if it is in use
set to 1 if this entry is a normal file
set to 1 if this entry is a directory
Starting Block Number of Blocks File Size
can support is 2** bytes long.
Field Size
YYYY 2 bytes MM 1 byte DD 1 byte HH 1 byte MM 1 byte SS 1 byte
This is the location on disk of the first block in the file
The total number of blocks in this file
The size of the file, in bytes. The size of this field implies that the largest file we
The date and time when this file was created. The file system stores the system times as integer values in the format: YYYYMMDDHHMMSS
Creation Time

 Modification Time The last time this file was modified. Stored in the same format as the Creation Time shown above.
File Name The file name, null terminated. Because of the null terminator, the maximum length of any filename is 30 bytes. Valid characters are upper and lower case letters (a-z, A-Z), digits (0-9) and the underscore character (_).
4.3 File Allocation Table (FAT)
Each directory entry contains the starting block number for a file, let’s say it is block number X. To find the next block in the file, you should look at entry X in the FAT. If the value you find there does not indicate End-of-File (i.e., the last block, see below) then that value, say Y, is the next block number in the file.
That is, the first block is at block number X, you look in the FAT table at entry X and find the value Y. The second data block is at block number Y. Then you look in the FAT at entry Y to find the next data block
number... continue this until you find the special value in the FAT entry indicating that you are at the last FAT entry of the file.
The FAT is really just a linked list, with the head of the list being stored in the “Starting Block” field in the directory entry, and the ‘next pointers’ being stored in the FAT entries.
FAT entries are 4 bytes long (** bits), which implies there are 128 FAT entries per block. Special values for FAT entries are described in the following.
Value
     0x00000000
     0x00000001
     0x00000002–0xFFFFFF00
     0xFFFFFFFF
5 Byte Ordering
Meaning
This block is available
This block is reserved
Allocated blocks as part of files
This is the last block in a file
Different hardware architectures store multi-byte data (like integers) in different orders. Consider the large integer: 0xDEADBEEF
On the Intel architecture (Little Endian), it would be stored in memory as: EF BE AD DE On the PowerPC (Big Endian), it would be stored in memory as: DE AD BE EF
Our file system will use Big Endian for storage. This will make debugging the file system by examining the raw data much easier.
This will mean that you have to convert all your integer values to Big Endian before writing them to disk. There are utility functions in netinit/in.h that do exactly that. (When sending data over the network, it is expected the data is in Big Endian format too.)

 See the functions htons(), htonl(), ntohs() and ntohl().
The side effect of using these functions will be that your code will work on multiple platforms. (On machines that natively store integers in Big Endian format, like the Mac (not the ARM or Intel-based ones), the above functions don’t actually do anything but you should still use them!)
6 Submission Requirements
What to hand in: You need to hand in a .tar.gz file containing all your source code and a Makefile that produces the executables for Parts I–IV.
Please include a readme.txt file that explains your design and implementation. The file is submitted through bright.uvic.ca site.

 A An Exercise
Q1 Consider the superblock shown below:
     0000000: 4353 4333 3630 4653 0200 0000 1400 0000  CSC360FS........
     0000010: 0001 0000 0028 0000 0029 0000 0008 0000  .....(...)......
     0000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
(a) Which block does the FAT start from? How many blocks are used for the FAT?
(b) Which block does the root directory start from? How many blocks are used for the root directory?

 Q2 Consider the following block from the root directory:
     0005200: 0300 0000 3100 0000 0500 000a 0007 d50b ....1...........
     0005210: 0f0c 0000 07d5 0b0f 0c00 0066 6f6f 2e74 ...........foo.t
     0005220: 7874 0000 0000 0000 0000 0000 0000 0000 xt..............
     0005230: 0000 0000 0000 0000 0000 00ff ffff ffff ................
     0005240: 0300 0000 3600 0000 0a00 0014 0007 d50b ....6...........
     0005250: 0f0c 0000 07d5 0b0f 0c00 0066 6f6f **2e ...........foo2.
     0005260: 7**8 7400 0000 0000 0000 0000 0000 0000 txt.............
     0005270: 0000 0000 0000 0000 0000 00ff ffff ffff ................
     0005280: 0300 0000 4000 0000 5e00 00bb ff07 d50b ....@...^.......
     00052**: 0f0c 0000 07d5 0b0f 0c00 006d 616b 6566 ...........makef
     00052a0: **00 0000 0000 0000 0000 0000 0000 0000 s...............
     00052b0: 0000 0000 0000 0000 0000 00ff ffff ffff ................
     00052c0: 0300 0000 9e00 0000 0100 0000 0807 d50b ................
     00052d0: 0f0c 0000 07d5 0b0f 0c00 0066 6f6f 3**e ...........foo3.
     00052e0: 7**8 7400 0000 0000 0000 0000 0000 0000 txt.............
     00052f0: 0000 0000 0000 0000 0000 00ff ffff ffff ................
(a) How many files are listed in this directory? What are their names?
(b) How many blocks does the file makefs occupy on the disk?

 Q3 Given the root directory information from the previous question and the FAT table shown below:

(a) Which blocks does the file foo.txt occupy on the disk?
(b) Which blocks does the file foo2.txt occupy on the disk?
請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機打開當(dāng)前頁
  • 上一篇:代做 2811 User Interfaces、代寫 C++語言程序
  • 下一篇:代做6CCS3AIN MDP-solver
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團(tuán)工具
    出評 開團(tuán)工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                国产大陆亚洲精品国产| 麻豆精品视频在线观看| 成人理论电影网| 日韩精品1区2区3区| 亚洲精品成人精品456| 国产精品国产三级国产aⅴ原创| 91麻豆精品国产91久久久久久久久 | 91精品久久久久久久91蜜桃| www.久久久久久久久| 99久久精品国产导航| 成人午夜在线视频| 九九九精品视频| 国产一区免费电影| 国产很黄免费观看久久| 国产精品2024| 成人免费黄色大片| 色综合夜色一区| 欧美性大战久久久久久久蜜臀 | 中文字幕日韩精品一区| 中文字幕亚洲一区二区av在线| 中文字幕一区二区三区不卡在线 | 欧美日本免费一区二区三区| 欧美一区二区精品久久911| 欧美成人三级电影在线| 欧美激情综合在线| 一区二区三区在线观看网站| 日韩精品电影在线观看| 韩国中文字幕2020精品| 成人免费毛片片v| 在线观看视频一区| 日韩三级中文字幕| 中文一区二区完整视频在线观看| 亚洲精品久久久蜜桃| 日韩av在线免费观看不卡| 国产麻豆精品视频| 色88888久久久久久影院野外| 欧美精品九九99久久| 久久久亚洲精品石原莉奈| 亚洲欧美综合在线精品| 免费高清不卡av| 成人免费看片app下载| 欧美日韩和欧美的一区二区| 精品国内片67194| 欧美一级日韩一级| 1000精品久久久久久久久| 亚洲综合精品自拍| 国产又黄又大久久| 欧美日韩电影在线播放| 国产偷v国产偷v亚洲高清| 午夜精品影院在线观看| 国产69精品久久777的优势| 91搞黄在线观看| 国产欧美精品日韩区二区麻豆天美| 一区二区三区精品视频在线| 国产盗摄一区二区三区| 欧美三片在线视频观看| 久久久久久久久久久99999| 午夜精品一区二区三区免费视频| 岛国精品在线观看| 日韩欧美黄色影院| 亚洲成a天堂v人片| 色综合久久天天| 国产精品午夜在线| 国产精品一区二区你懂的| 91麻豆精品国产综合久久久久久| 亚洲精品成a人| 91色视频在线| 成人免费一区二区三区在线观看| 国产精品综合二区| 久久看人人爽人人| 激情欧美日韩一区二区| 日韩精品影音先锋| 久久www免费人成看片高清| 欧美一区二区视频观看视频| 亚洲va国产天堂va久久en| 色噜噜狠狠色综合中国| 日韩毛片精品高清免费| hitomi一区二区三区精品| 中文字幕的久久| 成人开心网精品视频| 国产精品入口麻豆原神| 成人污视频在线观看| 久久精品视频一区| 国产剧情一区二区三区| 国产日韩视频一区二区三区| 国产传媒日韩欧美成人| 欧美激情一区二区| 国产99久久久国产精品潘金| 国产日韩欧美综合在线| 国产91在线观看| 欧美激情中文字幕| 色婷婷国产精品久久包臀| 亚洲乱码中文字幕| 欧美日韩另类国产亚洲欧美一级| 丝袜美腿亚洲一区| 欧美一级专区免费大片| 看片的网站亚洲| 精品国产百合女同互慰| 风间由美中文字幕在线看视频国产欧美| 欧美一级精品大片| 国产精品一区二区久激情瑜伽| 国产欧美视频一区二区三区| 成人av资源在线观看| 亚洲色图清纯唯美| 欧美一区二区三区啪啪| 国产成人在线影院| 一区二区在线观看av| 91麻豆精品国产91久久久| 激情小说亚洲一区| 亚洲青青青在线视频| 欧美日本在线一区| 风流少妇一区二区| 三级欧美在线一区| 中文字幕乱码久久午夜不卡 | 亚洲最快最全在线视频| 日韩一级免费一区| 91在线无精精品入口| 日韩精品国产精品| 国产精品麻豆视频| 91精品国产高清一区二区三区蜜臀| 国产精品888| 午夜激情久久久| 国产精品天干天干在观线| 91精品国模一区二区三区| 99久久精品免费看| 麻豆久久久久久| 一区二区三区日韩欧美精品| 久久男人中文字幕资源站| 欧美日韩黄色影视| 91丨porny丨国产入口| 国产麻豆精品一区二区| 日本vs亚洲vs韩国一区三区二区 | 国产精品1024| 亚洲午夜视频在线观看| 欧美成人a∨高清免费观看| 国产福利91精品一区二区三区| 亚洲精品日韩一| 中文一区在线播放| 欧美一二三在线| 欧美在线一区二区三区| av亚洲精华国产精华| 国产乱人伦精品一区二区在线观看 | 亚洲综合在线观看视频| 国产午夜精品久久久久久免费视| 7777精品伊人久久久大香线蕉的 | 蜜臀91精品一区二区三区| 亚洲伦在线观看| 日本一区二区三区免费乱视频| 日韩一区二区三区av| 欧美日韩成人一区| 91国在线观看| 91黄色小视频| 91国产视频在线观看| 91日韩在线专区| 91免费观看视频| 91麻豆国产香蕉久久精品| 国产精品18久久久久久久网站| 久久99精品一区二区三区| 日韩经典中文字幕一区| 午夜精品久久久久久久久久 | 成人免费视频caoporn| 国产成人免费视频| 成人免费av在线| 粉嫩aⅴ一区二区三区四区五区| 精品一区二区免费在线观看| 精品一区二区三区免费播放| 久久91精品国产91久久小草| 日韩成人免费电影| 免费在线观看一区二区三区| 日本在线不卡视频一二三区| 欧美aaa在线| 久久国内精品视频| 国产福利91精品一区二区三区| 国产suv一区二区三区88区| 成人av电影在线观看| 99视频在线观看一区三区| av亚洲精华国产精华精华| 91久久一区二区| 日韩一二三四区| 国产亚洲一本大道中文在线| 日本一区二区电影| 亚洲激情六月丁香| 日本不卡视频在线观看| 国产一区二区三区在线观看免费| 国产精品一区二区黑丝| 91亚洲永久精品| 欧日韩精品视频| 日韩欧美色综合网站| 国产精品视频第一区| 亚洲乱码精品一二三四区日韩在线| 亚洲chinese男男1069| 国产在线视频一区二区| 91在线国产观看| 91精品国产入口| 久久久无码精品亚洲日韩按摩| 中文字幕一区二区视频| 秋霞午夜av一区二区三区| 国产精品亚洲视频| 欧美精品一二三| 久久久久久久久久久久久久久99 |