Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Programming Assignment 4

CS450 Spring, 2023

1. This assignment is a pair programming effort. It is due on 04/26/2023.

2. Purpose: Develop a set of tools that can help to recover a damaged file system. For many reasons, the information in a directory file, in an inode etc. may get damaged and cannot be read. As a result, a user program will not be able to access parts of the file system. In this exercise, we ask you to develop a set of tools and show that you can use them to recover a xv6 file system if one or more of its directories and/or inodes are damaged.

3. Requirements:

1) Your tools and recovery program will work on the xv6 file system.

2) (10%) Write a program, called the directoryWalker, that prints out the names of each file and directory in a file system tree, starting at a given directory in the tree. The program also prints out the inodes associated with each file and directory.

3) (10%) Write a program, called the imapWalker, that prints out all the allocated inodes.

4) (10%) Write a program, called the inodeReader, that will return information on a specific inode.

5) (10%) Write a program that can erase the information (including the block pointers) in a directory inode and in a directory file so that you can test and demonstrate your results.

6) (25%) Write a program that will repair the file system when the following situations occur. In those situations that you cannot completely repair the file system, gather and present information to the user so that it is easiest for him/her to recover from the problem.

a) A directory file is corrupted.

b) The inode of a directory is corrupted.

c) Two directory inodes are corrupted.

d) One directory inode and one directory file are corrupted.

7) Bonus: (Additional 5% or more) Can you recover the file system if other parts of the file system are damaged? Implementation not necessary but will count.

4. Deliverables:

1) (15%) A document that describes your design and why it works, the various existing xv6 functions and header files that you changed, and the manual pages for the system calls that you added to the system. The document should not be more than 6 pages with at least a 11 point font size.

2) (25%) The test data (for example, the test file system) that you use and explanation on why the test data is of good quality. If you use the equivalence partitioning method to generate your test data, describe your equivalence partitions.

3) Source (with complete xv6 source code) and executable objects, and also explaining the code based on the xv6-riscv version source code.

4) Source (with complete xv6 source code) and executable objects with a README on how to build and execute them. You source code base should be the xv6-riscv version.

5) Upload all files as a zip archive with GroupID_PA4.zip. Documents and readme only support: txt, doc, docx and pdf format.

6) Screen shots of test runs.

7) (Mandatory, i.e., no point if not submitted) Self-evaluation is due 24 hours after submission.

5. Grading standard:

1) In general, we give 65% of the points to working and full featured code, 20% to high quality test data and 15% for well-written documents. We give extra credits (maximum 10 points) to very well-written code with additional useful and original features, very high-quality test data and documents. The test drivers are coding.

2) When we have a better feel of what is difficult (or easy) to the students and what demands more work, we adjust the points allocate to the features.