CS Operating Systems Homework 5 Solution

$30.00 $24.00

Assignment (10 pts) A UNIX le system has 4096-byte blocks (this is typical) and 4-byte disk addresses. What is the maximum le size if i-nodes contain 12 direct block entries, and one single, double, and triple indirect entry each? (30 pts) Write a C program that starts at a given directory and descends the le…

Rate this product

You’ll get a: zip file solution

 

Description

Rate this product
  • Assignment

    1. (10 pts) A UNIX le system has 4096-byte blocks (this is typical) and 4-byte disk addresses. What is the maximum le size if i-nodes contain 12 direct block entries, and one single, double, and triple indirect entry each?

    1. (30 pts) Write a C program that starts at a given directory and descends the le tree from that point recording the sizes of all the les it nds. When it is all done, it should print a histogram of the le sizes using a bin width speci ed as a parameter (e.g., with 1024, le sizes of 0 to 1023 go in one bin, 1024 to 2047 go in the next bin, etc.).

    1. (60 points) You’ve been using tar and zip to archive and turn in your assignments. Write an archiving utility in C that allows you to create an archive, and add, list, and extract les. Call it… gunk. It should have the following capabilities:

      1. (20 points)

./gunk -a myarchive somefile

Gunk should add (hence the -a) the le somefile to the archive le myarchive. Subse-quent calls to add to the same archive should result in the additional les being added to the archive.

      1. (20 points)

./gunk -l myarchive

Gunk should list only the names of the les stored in the speci ed archive.

      1. (20 points)

./gunk -e myarchive somefile

Gunk should extract the named le from the archive, creating a new le with the same name and containing the exact same data as the original and stored les. Careful not to overwrite something you can’t live without.

CS Operating Systems Homework 5 Solution
$30.00 $24.00