1) Pick any file anywhere ever created. Make one up if you want. List three pieces of "metadata" or "file attributes" about that file.

-Size

-Create, Modify, Access time

-Owner

-Permissions

-Creater Application

2) When you click on a Macintosh icon associated with a data file, how does it know what application to run?

There is an explicit creator application stored with every file.

3) What kind of directories have only long file name entries in a VFAT

file system?

None. Every long file name has an associated short file name.

4) Which is faster to seek to the end of a 20KB long file, VFAT or EXT2.

Assume the directory and inodes are cached, but nothing else.

EXT2, since you don't have to read the FAT

5) Which is faster to seek to the end of a 20MB long file, VFAT or EXT2.

Assume the directory and inodes are cached, but nothing else.

EXT2, since you can just read the indirect block, then the direct block, then you will know where the 20MBth byte is . You don't have to follow a FAT chain.

6) What is one disadvantage of the scan disk scheduling method

compared to the c-scan method?

It favors the middle of the disk.

7) Which would be faster, to append a byte to a file in VFAT or the Bullet

file system?

One cannot append to a file in the bullet system, one can only make a file that is one byte bigger (which is slow)

8) What information is stored in a directory for a EXT2 file?

-Name

-Inode number

-Length of name

9) Assume 4 byte pointers and 1024 byte blocks. What's the biggest file

a person can create in EXT2 without creating an indirect block?

13 * 1024 bytes

10) How does VFAT know a long file name directory entry from a regular entry?

The attributes of hidden+system+read-only+volume-label

11) Two types of sharing semantics are "open-close consistency", and "single image consistency". There are lots more choices. What type did the Bullet file system use?

Neither of those. Every file has only one contents and never changes.

12) Why is there an "open" operation? Why not just pass the filename to every read/write/etc call?

Because finding a file's contents on the drive is slow. It's best not to do this on every read. That would stink.

14) Assume a 512 byte block size. Suppose I have a 1GB disk to format with VFAT32. How big is each FAT. Show math!

Find the cluster size. This is the smallest N such that N is a power of 2 and
512 bytes / sector * 2^N sectors/cluster * 2^32 clusters > 1 GB.
Notice how the units cancel to make the equation work. If the units are wrong, the equation is wrong.
N = 1

Find the number of clusters on the disk.
2^30 bytes / 512 bytes per cluster = 2^21 clusters
Notice how the units cancel to make the equation work. If the units are wrong, the equation is wrong.


Find the space needed to store the FAT.
2^21 clusters * 4 bytes/cluster = 2^23 bytes which is 8 megabytes
Notice how the units cancel to make the equation work. If the units are wrong, the equation is wrong.


15 ) About how many bytes/second can a hard drive transfer?


Maybe 40MG/second give or take a lot.


16) About how long does it take to seek a hard drive to a spot?


About 10 milliseconds which is 1/100 of a second.


17) Suppose our file system has a cache. What would be a good cache hit rate?


Something between 50% and 90%, depending on a zillion factors.


18) What is the difference between a character and a block device?

A character device transfers one byte at a time, like a keyboard.

A block device moves data by blocks, like a hard drive.


19) Do most hard drive controllers use polling?

Heck no. Go read about it and how bad it is.


20) Which holds the most data, a disk sector, a disk cylinder, or a disk track.

Track


21) Which has a higher bandwidth for writing, RAID 5 or RAID 0?

RAID 0


22) Which has a higher bandwidth, RAID 5 reading or RAID 5 writing?

RAID 5 reading, since writing must wright both the data and the associated parity.


23) Which has a higher bandwidth, RAID 1 reading or RAID 1 writing?

RAID 1 reading, since you can split the work for reading but not writing


24) In EXT2, name a piece of information in the superblock that's not also in the block descriptor.

Dirty or clean bit


25) In VFAT, are all files contiguous or can they be split?

Split.


26) I write a one byte file. I notice the file system says I have 512 bytes less available space. What does this mean?

It means you have 512 byte blocks in your file system.


27) Which would be best for a SSD style disk (like a USB stick):

circular scan disk scheduling

first come first server disk scheduling


It's an SSD disk. There really is no seek time. But FCFS is fair and avoids starvation, and that's pretty cool.



ANSWERS AT

http://cs.nmu.edu/~rappleto/Classes/CS426/Tests+Quizes/file-questions-with-answers.html