国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

代做CSC3150、代寫Java,c++編程

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



CSC3150-Instruction-A4
Introduction
This assignment uses xv6, a simple and Unix-like teaching operating system, as the platform to
guide you in implementing the indirect block to support big file management. In existing
implementation, singly-indirect blocks can handle limited blocks that are invalid for large file
management. In this assignment, you'll increase the maximum size of an xv6 file by
implementing doubly-indirect blocks for further extension.
We suggest you read Chapter 8: File system before writing code.
Preliminaries
The mkfs program creates the xv6 file system disk image and determines how many total blocks
the file system has; this size is controlled by FSSIZE in kernel/param.h. You'll see that FSSIZE in
the repository for this lab is set to 200,000 blocks. You should see the following output from
mkfs/mkfs in the make output:
1 nmeta 70 (boot, super, log blocks 30 inode blocks 13, bitmap blocks 25) blocks 1
This line describes the file system that mkfs/mkfs built: it has 70 meta-data blocks (blocks used
to describe the file system) and 199,930 data blocks, totaling 200,000 blocks.
If at any point during the lab you find yourself having to rebuild the file system from scratch, you
can run 'make clean', which forces make to rebuild fs.img.
Submission
• Due on: 23:59, 06 Dec 2023
• Plagiarism is strictly forbidden. Please note that TAs may ask you to explain the meaning of
your program to ensure that the codes are indeed written by yourself. Please also note that
we would check whether your program is too similar to your fellow students' code and
solutions available on the internet using plagiarism detectors.
• Late submission: A late submission within 15 minutes will not induce any penalty on your
grades. But 00:16 am-1:00 am: Reduced by 10%; 1:01 am-2:00 am: Reduced by 20%; 2:01
am-3:00 am: Reduced by 30% and so on. (e.g., Li Hua submitted a perfect attempt at 2:10
a.m. He will get (100+10 (bonus))*0.7=77p
Format guide
The project structure is illustrated below. You can also use ls command to check if your
structure is fine. Structure mismatch would cause grade deduction.
For this assignment, you don't need a specific folder for the bonus part. The source folder
should contain four files: fs.c, file.h, fs.h, sysfile.c
main@ubuntu:~/Desktop/Assignment_4_120010001$ ls
Report.pdf source/
(One directory and one pdf.)
1
2
3
4
main@ubuntu:~/Desktop/Assignment_4_120010001/source$ ls
file.h fs.c fs.h sysfile.c
(two .c files and two .h file)
1
2
3
4
Please compress the folder containing all required files into a single zip file and name it using
your student ID as the code shown below and above, for example,
Assignment_4_120010001.zip. The report should be submitted in pdf format, together with
your source code. Format mismatch would cause grade deduction. Here is the sample step for
compressing your code.
main@ubuntu:~/Desktop$
zip -q -r Assignment_4_120010001.zip Assignment_4_120010001
main@ubuntu:~/Desktop$ ls
Assignment_4_120010001 Assignment_4_120010001.zip
1
2
3
4
5
Instruction Guideline
We limit your implementation within fs.c, file.h, fs.h, sysfile.c four files, starting with "TODO:"
comments. The entry (where you may start learning) of the test program is the main function in
bigfile.c, symlinktest.c (Bonus) under the 'xv6-labs-2022/user' directory.
Sections with (*) are introduction sections. These sections introduce tools and functions that
will help you understand what this system is about and how the system works with these
components. You might need to use it for this assignment. Do NOT CHANGE them except the
TODO parts.
1. For the introduction sections, please figure out how functions work and how to use them.
2. Be sure you have a basic idea of the content before starting your assignment. We believe that
those would be enough for handling this assignment.
3. (option) For students who are interested in the xv6 system and want to learn more about it,
you are welcome to read "xv6-book" to get more details.
a. https://pdos.csail.mit.edu/6.828/2022/xv6/book-riscv-rev3.pdf
Sections without (*) are TODO sections. In these sections, the logic of how this component/
function should work is a detailed list. You should implement functions in given places.
1. However, no sample code will be shown here. You need to figure out the implementation
based on the logic and APIs provided in the introduction sections.
Task1: Large Files
1. In this assignment, you'll increase the maximum size of an xv6 file. Currently, xv6 files are
limited to 268 blocks or 268*BSIZE bytes (BSIZE is 1024 in xv6).
a. This limit comes from the fact that an xv6 inode contains 12 "direct" block numbers and
one "singly-indirect" block number, which refers to a block that holds up to 256 more
block numbers for a total of 12+256=268 blocks.
2. The bigfile command creates the longest file it can and reports the size
a. The template we provide will fail to write 256 blocks. The test fails because bigfile expects
to be able to create a file with 65803 blocks, but unmodified xv6 limits files to 268 blocks.
3. You'll change the xv6 file system code to support a "doubly-indirect" block in each inode,
containing 256 addresses of singly-indirect blocks, each of which can contain up to 256
addresses of data blocks.
a. The result will be that a file can consist of up to 65803 blocks, or 256*256+256+11 blocks
(11 instead of 12 because we will sacrifice one of the direct block numbers for the doubleindirect block).
Definitions*
For more details, read <xv6-book> chapter 8.10
Following the hints and definitions above, we have provided you with the modified
structure. Please read the comments on the codes.
// Defined in kernel/fs.h
#define NDIRECT 11 // 12->11 By 3.a, we sacrifice 1 block for "doubly-indirec
#define NINDIRECT (BSIZE / sizeof(uint)) // = 1024/4 = 256
1
2
3
#define DNINDIRECT (NINDIRECT * NINDIRECT) // = 256*256
#define MAXFILE (NDIRECT + NINDIRECT + DNINDIRECT) // = 256*256 + 256 + 11
///NOTE: Do not modify the structure
// On-disk inode structure
struct dinode { short type; // File type
short major; // Major device number (T_DEVICE only)
short minor; // Minor device number (T_DEVICE only)
short nlink; // Number of links to inode in file system
uint size; // Size of file (bytes)
///NOTE: +2 instead of +1 because we NDIRECT is change from 12 to 11
uint addrs[NDIRECT+2]; // Data block addresses
};
//Defined in kernel/file.h
///NOTE: Do not modify the structure
// in-memory copy of an inode
struct inode { uint dev; // Device number
uint inum; // Inode number
int ref; // Reference count
struct sleeplock lock; // protects everything below here
int valid; // inode has been read from disk?
short type; // copy of disk inode
short major;
short minor;
short nlink;
uint size;
uint addrs[NDIRECT+2]; ///NOTE: +2 instead of +1 because we NDIRECT is chan
Learn from examples
For APIs provided above, they have been used to implement functions. You can learn how to use
those functions to develop our system.
You may take a look at how it is used in bmap(), itrunc(), bzero(), balloc(), bfree()
Especially read existing code in bmap() and itrunc() as these two functions are where we need
to modify, and they have already been implemented singly-indirect .
bmap()
See <xv6-book> chapter 8.10
// Inode content
//
// The content (data) associated with each inode is stored
// in blocks on the disk. The first NDIRECT block numbers
// are listed in ip->addrs[]. The next NINDIRECT blocks are
// listed in block ip->addrs[NDIRECT].
// Return the disk block address of the nth block in inode ip.
// If there is no such block, bmap allocates one.
// returns 0 if out of disk space.
// TODO: implement doubly-indirect
static uint bmap(struct inode *ip, uint bn);
bmap() is called both when reading and writing a file. When writing, bmap() allocates new
blocks as needed to hold file content, as well as allocating an indirect block if needed to hold
block addresses.
bmap() deals with two kinds of block numbers. The bn argument is a "logical block number" -- a
block number within the file, relative to the start of the file. The block numbers in ip->addrs[],
and the argument to bread(), are disk block numbers. You can view bmap() as mapping a file's
logical block numbers into disk block numbers.
itrunc()
See <xv6-book> chapter 8.10
itrunc frees a file’s blocks, resetting the inode’s size to zero. itrunc (kernel/fs.c:430) starts by
freeing the direct blocks(kernel/fs.c:436-441), then the ones listed in the indirect block
(kernel/fs.c:446- 449), and finally the indirect block itself (kernel/fs.c:45**452).
(TODO) Modify to support doubly-indirect block
///TODO: modify it to support doubly-link
// Inode content
//
// The content (data) associated with each inode is stored
// in blocks on the disk. The first NDIRECT block numbers
// are listed in ip->addrs[]. The next NINDIRECT blocks are
// listed in block ip->addrs[NDIRECT].
// Return the disk block address of the nth block in inode ip.
// If there is no such block, bmap allocates one.
// returns 0 if out of disk space.
static uint bmap(struct inode *ip, uint bn);
Modify bmap() so that it implements a doubly-indirect block in addition to direct blocks and a
singly-indirect block.
You'll have to have only 11 direct blocks, rather than 12, to make room for your new doublyindirect block; you're not allowed to change the size of an on-disk inode.
i.e., Do NOT modify the structure or size of addrs in dinode or inode. We have already set it
up for you.
///TODO: add discard of doubly-link correspondingly
// Truncate inode (discard contents).
// Caller must hold ip->lock.
void itrunc(struct inode *ip);
1
2
3
4
Hint
• The first 11 elements of ip->addrs[] should be direct blocks
• The 12th should be a singly-indirect block (just like the current one)
• The 13th should be your new doubly-indirect block. You are done with this exercise when
bigfile writes 65803 blocks
• Remember that it needs modification to release Double-Indirect blocks (modify itrunc())
Task2(Bonus): Symbolic links
In this exercise, you will add symbolic links to xv6.
• Symbolic links (or soft links) refer to a linked file by pathname; when a symbolic link is
opened, the kernel follows the link to the referred file.
• Symbolic links resembles hard links, but hard links are restricted to pointing to file on the
same disk, while symbolic links can cross disk devices.
• Although xv6 doesn't support multiple devices, implementing this system call is a good
exercise to understand how pathname lookup works.
(TODO) Implementation of symlink
You will implement the symlink(char *target, char *path) system call, which creates a new
symbolic link at path that refers to the file named by target. For further information, see the man
page symlink.
Your solution is complete when you pass all cases in symlinktest.
Hints
• Add a new file type (T_SYMLINK) to kernel/stat.h to represent a symbolic link. (We already
add it for you)
• Add a new flag to kernel/fcntl.h, (O_NOFOLLOW), that can be used with the open system call.
Note that flags passed to open are combined using a bitwise OR operator, so your new flag
should not overlap with any existing flags. This will let you compile user/symlinktest.c once
you add it to the Makefile. (We already define it for you)
• Implement the symlink(target, path) system call to create a new symbolic link at the path
that refers to target. Note that 'target' does not need to exist for the system call to succeed.
You will need to choose somewhere to store the target path of a symbolic link, for example,
in the inode's data blocks. symlink should return an integer representing success (0) or
failure (-1), similar to link and unlink.
• Modify the open system call to handle the case where the path refers to a symbolic link. If the
file does not exist, open must fail. When a process specifies O_NOFOLLOW in the flags to
open, open should open the symlink (and not follow the symbolic link).
• If the linked file is also a symbolic link, you must recursively follow it until a non-link file is
reached. If the links form a cycle, you must return an error code. You may approximate this
by returning an error code if the depth of links reaches some threshold (e.g., 10).
• Other system calls (e.g., link and unlink) must not follow symbolic links; these system calls
operate on the symbolic link itself.
• You do not have to handle symbolic links to directories for this lab.
Grading Rules
You can test the correctness of your code using the following commands under '~/xv6-labs-2022'
directory.
Test Task1
To run Task1, use the following command
make clean
make qemu
bigfile
1
2
3
By running the template we provide, you will receive the following information that tells you to
implement functions for big file.
$ bigfile
..
wrote 268 blocks
bigfile: file is too small
When you finish Task1 correctly, you should see the following output
$ bigfile
wrote 65803 blocks
done; ok
1
2
3
4
Test Task2
To run Task1, use the following command
1 make clean
make qemu
symlinktest
2
3
Template Output:
$ symlinktest
Start: test symlinks
FAILURE: symlink b -> a failed
Start: test concurrent symlinks
test concurrent symlinks: ok
1
2
3
4
5
Target Output:
$ symlinktest
Start: test symlinks
test symlinks: ok
Start: test concurrent symlinks
test concurrent symlinks: ok
5
Program part **' + bonus 10'
bigfile 40p
Compile Success 50p
symlinktest (bonus) 10p
Report part 10'
You shall strictly follow the provided latex template for the report, where we have emphasized
important parts and respective grading details. Reports based on other templates will not be
graded.

請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:代做COM661、代寫 Stack Strategies編程
  • 下一篇:GEOG3代寫、代做Python編程設(shè)計(jì)
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動(dòng)
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手,多多出評軟件徽y1698861
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺(tái)
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 目錄網(wǎng) 排行網(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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久久久免费视频| 国产精品视频免费一区二区三区| 日韩无套无码精品| 欧美激情欧美激情在线五月| 国产精品国产一区二区| 国产精品手机视频| 国产精品久久久久久久久久99| 国产精品久久久久久久久久久久久久 | 国模吧一区二区| 欧美亚洲国产免费| 国产专区欧美专区| 国产精品揄拍500视频| www亚洲国产| 久久久亚洲天堂| 丝袜美腿亚洲一区二区| 国产精品免费观看高清| 久久97久久97精品免视看| 亚洲欧洲一区二区福利| 日韩尤物视频| 欧美有码在线观看视频| 麻豆精品视频| 97精品欧美一区二区三区| 97国产精品久久| 久久99精品久久久久久秒播放器| 久久久精品视频在线观看| 国产精品黄色影片导航在线观看| 欧美激情久久久久久| 午夜精品一区二区三区在线| 欧美中文在线免费| 国产麻豆乱码精品一区二区三区| 国产精品69av| 国产精品视频一区二区高潮| 蜜月aⅴ免费一区二区三区| 欧美一区二区三区四区在线| 欧美性视频在线播放| 国产免费色视频| 久久波多野结衣| 久久国产精品99国产精| 天天操天天干天天玩| 免费在线国产精品| 国产精品av在线| 国产精品久久国产| 日本一区美女| 国产久一一精品| www.欧美三级电影.com| 亚洲一区影院| 韩国日本不卡在线| 国产黄色激情视频| 一区二区在线观| 欧美日韩精品在线一区二区 | 99精品一区二区三区的区别| 国产成人av网址| 久久综合久中文字幕青草| 日本在线观看a| yellow视频在线观看一区二区| 国产精品爽爽爽| 日本电影亚洲天堂| 91久久国产精品| 欧美激情视频一区二区| 免费一级特黄特色毛片久久看| 91观看网站| 欧美激情精品久久久久久变态 | 91九色在线视频| 日韩中文字幕在线视频| 欧美成人精品在线观看| 欧洲精品久久久| 久久精品日韩| 午夜精品久久久99热福利| 国产深夜男女无套内射| 久久久精品在线| 日本三级韩国三级久久| 国产精品10p综合二区| 久久久久久91香蕉国产| 国产一区二区三区黄| 久久精品视频在线| 人人澡人人澡人人看欧美| 久久网站免费视频| 亚洲区成人777777精品| av一本久道久久波多野结衣| 永久免费看av| 国产精品中文久久久久久久| 久久av红桃一区二区小说| 欧美 日韩 国产在线观看| 久久精品美女视频网站| 欧美日韩一区二| 国产精品日日做人人爱| 欧美高清视频一区| 国产精品天天av精麻传媒| 欧美午夜小视频| 国产精品爽爽爽爽爽爽在线观看| 欧美日韩天天操| 国产精品无码电影在线观看| 欧美最大成人综合网| 久久精品91久久久久久再现| 欧美自拍视频在线观看| www国产亚洲精品久久网站| 日韩高清av| 色偷偷噜噜噜亚洲男人| 欧美在线中文字幕| 国产精品麻豆免费版| 国产最新精品视频| 又粗又黑又大的吊av| av资源站久久亚洲| 一区二区精品免费视频| 国产精品99久久久久久大便| 少妇性饥渴无码a区免费| 99热国产免费| 天天在线免费视频| 色妞一区二区三区| 精品日韩欧美| 亚洲国产一区二区三区在线| 久久人人爽人人爽人人av| 日韩免费不卡av| 欧美大成色www永久网站婷| 99热成人精品热久久66| 日韩av免费网站| 国产精品免费看一区二区三区| 国产欧美日韩中文字幕| 亚洲女人毛片| 久久久成人的性感天堂| 国产男女激情视频| 欧美一级淫片播放口| 日日骚av一区| 国产日本一区二区三区| 亚洲www视频| 国产精品美女在线| 99久久精品免费看国产一区二区三区 | 国产日本欧美一区二区三区| 亚洲专区国产精品| 国产成一区二区| 黄色www网站| 宅男一区二区三区| 久久久久久网站| 国产日产欧美a一级在线| 日本网站免费在线观看| 国产精品成人观看视频国产奇米 | 精品一区二区三区视频日产| 美女精品久久久| 国产av无码专区亚洲精品| 国产日韩欧美在线观看| 欧美一乱一性一交一视频| 国产精品二区三区| 久久久久久亚洲精品| 99精品国产高清在线观看| 蜜臀av无码一区二区三区| 日韩av电影中文字幕| 欧美日韩国产999| 国产精品免费看一区二区三区| 久久久天堂国产精品女人 | 久久久久久久免费| 不卡一区二区三区视频| 欧美精品卡一卡二| 亚洲精品免费av| 精品国产乱码久久久久久108| 久久久久久久中文| 91精品国产亚洲| 国产欧美亚洲视频| 国产综合 伊人色| 精品欧美日韩| 热re99久久精品国产99热| 亚洲色精品三区二区一区| 久久夜精品香蕉| 国产精品欧美久久久| 国产成人免费观看| 九一国产精品视频| 久久婷婷五月综合色国产香蕉| wwwwww欧美| 国产视频一视频二| 美国av一区二区三区| 欧美久久在线| 欧美中文字幕在线| 青青视频免费在线| 日韩欧美一区三区| 欧美一级视频免费在线观看| 亚洲精品免费在线看| 亚洲一区二区中文字幕| 在线观看一区欧美| 在线视频不卡一区二区三区| 久久成人免费视频| 欧美精品性视频| 九九精品在线观看| 国产99在线免费| 一区二区三区久久网| 欧美麻豆久久久久久中文| 国产精品久久精品视| 久久资源免费视频| 欧美日韩成人在线播放| 欧美激情一级精品国产| 中文字幕欧美人妻精品一区| 伊甸园精品99久久久久久| 亚洲最大福利视频网| 亚洲日本精品一区| 欧美一区二区视频97| 日本不卡一区二区三区视频| 日韩精品一区在线视频| 欧美乱大交xxxxx潮喷l头像| 蜜桃网站成人| 国产精品亚洲激情| 操人视频欧美| 久久精品欧美|