Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. File Systems In a certain file system, files are allocated most of their spac

ID: 3818121 • Letter: 1

Question

1. File Systems
In a certain file system, files are allocated most of their space in large blocks (16 kB) but any final, partial block is allocated in “scraps” (1 kB each). Assume that 80% of the files have a size uniformly distributed between 1 B and 8 kB, and the other 20% of the files have sizes uniformly distributed between 8 kB and 1 MB.
a. (3) What is the amount of wasted space as a percentage of total space allocated to files? Compare to a system that uses only blocks of 4 kB each. (Do not include i-node or directory overhead.)
b. (4) Compare the data transfer rates of this system to one that uses only blocks of 4 kB each. Assume the system uses a disk that has mean seek time of 10 ms., rotational speed of 9000 RPM, and 100 sectors of 512 bytes each per track
c. (4) Suppose you had to implement this in the Minix file system (FS, used generically here). What additional structures and functions would you need to handle this? Be explicit in terms of allocation and freeing of blocks and scraps, and in caching.
d. (4) How would you organize the i-nodes and the rest of the files system utilities to handle file access (read/write, not access control)? Be explicit in terms of how the FS would determine how to find a specific byte in a file, what parts of the i-node the FS would have to consult, and how those elements would be used.

Explanation / Answer

a.    

The files having the size distribution between 1B and 8Kb= 80%

The files having the size distribution between 8KB and 1 MB= 20%

Therefore, 80/100*(8KB-1Bytes) +20/100*(1MB-8KB)

So, (0.80) *(8*2^10-1) bytes + 20/100*(2^20-8*2^10) bytes= (0.80)*81910.20*1040384     

                                                                                                  = 214629.6 bytes

b.

Since, the system uses a disk that has mean seek time of 10ms

Rotational speed = 9000RPM

The number of sectors = 100

The number of bytes per track = 512bytes

Data transfer rate = 60/ 9000RPM=0.006seconds = 6ms