CS 430 -- Midterm of the Filesystem

  1. (Seek.Switch)Which takes longer, a disk seek or a CPU context switch?
  2. (T/F) A file system supporting only files linked block by block will offer high performance for both sequential and random access applications.
  3. Which operation would be slowed the least by a long latency network.
  4. How many network round trips does it take to read small the file /boot/boot.b assuming that "/" is already mounted over NFS and nothing useful is in the cache.  What is in each data transfer?






  5. Assume a standard inode type file system, with inodes containing 12 pointers to blocks, two pointer per inode to an indirect block, and one pointer per inode to a double-indirect block.  Each pointer takes four bytes.  Each block is 4096 blocks long.  What is the maximum file size.  Show work for partial credit.









  6. Same setup as above, but how many disk accesses are needed to get at byte # 15000 (just the one byte) assuming the nothing is cached?  What must each access retrieve?









  7. Assume I have a RAID 0 setup with 2 disks each 8 gig.  How much can my filesystem hold? _______________
  8. Assume I have a RAID 5 setup, with 8 disks.  I want to read one block.  How many of my disks do I access in standard operation, with nothing failed. _________________________
  9. Assume I have a RAID 5 setup, with 8 disks, and one of them fails.  Does this slow read operations?  If so, why? 





  10. Name one problem with caching written (dirty) data indefinitely. 





  11. Excepting copy on write, in which process's virtual address space does the file system's cache live?





  12. Assume you have a machine with a single hard drive  (4.0 gig), and only 16 meg of RAM. You have a sound card (Soundblaster 16 PnP).  You have a special graphics pad that emulates a Microsoft Mouse on a PS/2 port.  Which of the following activities will significantly slow access to files on the file system?   You're an architect.
  13. You write a long log file over a long period of time during which the system is otherwise busy doing other things.  Then you reboot the computer.  Which will be slowest.  Assume that both machines just booted up, and have nothing useful in the cache.
  14. You have a hard drive.  It uses 8K blocks.  It has an access speed of 12 milliseconds.  You want to make 1000 small files of sizes ranging between 10K and 90K.  You want to make 1000 large files ranging between 100K and 900K.  The files are randomly spread out between the ranges.  What is the total amount of space wasted by internal fragmentation?  What percent is this of the total data stored?  Show work!!






  15. Can a filesystem use copy-on-write if the CPU does not support a dirty bit?  If so, how does this lack of support change copy-on-write.







  16. A filesystem makes a request for a block from the disk.  After the disk has the data, it triggers
  17. n interrupt.  Which bit of code executes next?
  18. What information does a shortest job next scheduler need that first come first serve and round robin does not?





  19. Suppose I access files on a random basis.  Once I open a file, I always access the whole file from begining to end before I move to the next file.  I can tell from my cache which pages belong to which files.  Given these assumptions, and the need to free up a cache page, which cache page should I free.  (HINT:  Don't just say the last block used.  There is a better answer given these assumptions).