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

COMP604 – Operating Systems

Lab 10 Assignment

Instructions:

This lab assignment requires you to run a Python program called fsck.py similar to what you have done in Task 10.2. It is a simple simulator of various types of corruptions that may occur in a simple file system. This simple file system is the same as the one used in Task 10.2.

Refer to the file fsck.README for details on how to use this program. The root directory is inode number

0. Note that there are two random seeds for this program. -s specifies a seed for generating a random file system. -S specifies a seed for generating corruptions.

Then provide answers to the three questions below. Your answers should be accompanied by appropriate screenshots.

Submission:

Put your results and observations in a MS Word file (.doc or .docx) or a plain text file (.txt). Submit this file to Canvas.

This lab will contribute 5% towards your overall course marks.

Question 1:

Run the program with -s 20 with the corruption seed set first to -S 6 and then to -S 13.

(a) What inconsistencies do you observe?

(b) What is the difference between these two cases?

(c) What should the repair tool do when encountering such a situation?

Question 2:

Change the seed to -S 15.

(a) What inconsistency do you observe?

(b) What can a repair tool do in this case? If no repair is possible, how much data is lost?

Question 3:

Change the seed to -S 10.

(a) What inconsistency do you observe?

(b) Is there redundancy in the file system structure that can help to perform a repair?