I would like to hire a C Programmer

已关闭 已发布的 7 年前 货到付款
已关闭 货到付款

In this project, you will implement a simple simulated file system. This project will let you get familiarwithimportantdatastructuresinafilesystem,includingi)volumecontrolblock,ii)thedirectory structure,iii)openfiletables(system-wideandper-process),andiv)FileControlBlock(FCB).Youwill also learn how basic file operations, such as open(), interact with these data structures. Before we describe the tasks of this project, we make the following assumptions. The simulated file system is implemented on main memory. More specifically, a slot of main memory of 1M is used to simulate a disk. We assume that a data block is of 2K. Therefore, the disk has 512 blocks. In this project, we assume the disk is a data disk, i.e., no OS installed. So the first data block is used as the volume control block. We assume that the volume control block contains the following items:

number of blocks size of block a free-block count a bit-map of free blocks Table 1: Volume control block

Weassumethatthefileallocation(i.e.,datablockallocation)iscontiguousallocation. Forsimplicity, our file system uses a flat directory structure to manage files. In other words, the directory contains no subdirectories. With the assumption of contiguous allocations, the content of the directory of our file system can be organized as a table as follows:

file name start block number file size file1 0 2 file3 6 3 . . . . . . . . . Table 2: Flat directory structure.

To be consistent with the contiguous allocation, the FCB contains the following items:

file size pointer to the first data block Table 3: File control block (FCB).

A system-wide open file table is a set of FCBs of open files. An example of a system-wide open file table is shown in Table 4. Given a specific process, its per-process open file table contains a set of file handles of files opened by the process. For example, assume that a process has open files: f1 and f4, its per-process table will be the one shown in Table 5.

1

file name FCB f1 FCB1 f3 FCB3 f4 FCB4 Table 4: System-wide open file table.

file name handle f1 0 f4 2 Table 5: Per-process open file table. 1 PartI:Basicfileoperations You will need to implement the following file operations: • create(). create a file with a specified size. The size is in terms of the number of blocks. • open(). open a file, and update system-wide and per-process open file tables. • close(). close a file, and update system-wide and per-process open file tables. • read(). read a file to a local variable. • write(). Write specified content to selected free blocks. CS445Ggraduate students should implement two additional file/directory operations: • dir(). display all files in the file system. • delete(). remove a specified file from the directory. 2 PartII:Asimulation Write an application to demonstrate a sequence of file operations of different threads. A better way of simulation is based on processes rather than threads. (Recall that threads in the same process share the same open files.) But in this project, we use a thread to simulate a process to simplify your work in case that you use Java language for the implementation. The following is a sample of file operations, where p1, p2 and p3 are three pthreads. p2 and p3 should be created simultaneously after p1 is completed.

1. p1: create file1 2. P1: write file1 3. p1: close file1 4. p1: create file2

2

5. P1: write file2 6. p1: close file2 7. p2: open file1 8. p2: read file1 and print it in the screen 9. p2: close file1 10. p3: open file2 11. p3: read file2 and print it in the screen 12. p3: close file2

CS 445G graduate students should further test the correctness of dir() and delete() operations. For example, you can insert a dir() call in front of the above simulation and append a delete() and a dir() at the end of the above simulation. This project is a team project, and each team can have up to 2 students. You can use C/C++ or Java to implement this project. But if you use Java, keep in mind to demonstrate the simulation with multi-threading Java programming.

Onsubmission: Submit your source code and readme to blackboard. The source code should be well-documented, i.e., having good readability. The readme file should summarize: i) tasks that you completed, and ii) tasks that you did not complete.

C 编程 编程

项目ID: #13162820

关于项目

15个方案 远程项目 活跃的7 年前

有15名威客正在参与此工作的竞标,均价R2822/小时

Yknox

Hello. I am Smile Song, developer in China. I'm interesting your project very well I'm a Good C, C++, Video Streaming, OpenCV, Math, java, c#, Algorithm expert. I m quite well experienced in these jobs. Let's 更多

R2577 ZAR 在7天内
(427条评论)
8.5
utkarshkatiyar19

I can do

R3684 ZAR 在3天内
(356条评论)
7.3
hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ 更多

R1500 ZAR 在3天内
(129条评论)
6.9
octopus823

Hi, I'm a OS expert experienced C/C++/ObjC developing. I can develop almost kinds of C/C++/ObjC codes for any OS : Windows, Linux, MAC OS X... I can use almost of develop libraries such as QT, MFC, boost... and ant I 更多

R3157 ZAR 在2天内
(67条评论)
6.5
unixmaniac

Hello, I can do this project Have a big experience in system programming. 更多

R3647 ZAR 在3天内
(4条评论)
4.1
tiaratechies

Hello, we are qualified software engineers and especially doing simulation in C and Java. We know the work involved in it if given an opportunity. will deliver the best in given time frame. Thanks & regards Techies

R11111 ZAR 在5天内
(1条评论)
3.0
ArcLength

strong knowledge of data structures and algorithms, extensive C/C++ development experience, ability to contribute to all levels of software development

R2222 ZAR 在10天内
(0条评论)
0.0
harsha2chourasia

Hi , I have very good experience in file handling and can able to deliver this project within 3 days i have read the detailed requirement and get an understanding with your requirement I have around 14 yrs of 更多

R1666 ZAR 在3天内
(0条评论)
0.0
bdngfreelancer

I know C, data structures, Linux I have ported UBI file system in Linux ; So I am familiar with VFS ..etc in Linux The project description is very lengthy and its not fomratted properly.. so could not go through it 更多

R5555 ZAR 在15天内
(0条评论)
0.0
rutupatel55

Hie I would like to complete this project as programming in C language is just like game for me

R611 ZAR 在2天内
(0条评论)
0.0