The Operating Systems Test

Millionare Version
System Calls Section
  1. If Regis Philman asks, you should
    1. Take the $1,000,000
    2. Done the $1,000,000 to charity
    3. Buy the professor an airplane
  2. Which system call takes the longest to perform in the average case
    1. read(fd, buf, 100)
    2. open("/home/philman/prizes/week3.txt")
    3. lseek(3, 100, SEEK_BEGIN)
  3. Suppose I open a file.  Then someone comes along and changes the permissions so that I no longer have read permission.  Then I use the read() system call on that file.  What happens? (Circle all that apply)
    1. The read is successful
    2. The read returns an error
    3. My program crashes
    4. The computer crashes
  4. Which system call is quickest to perform in the average case
    1. read(fd, buf, 100)
    2. open("/home/philman/prizes/week3.txt")
    3. lseek(3, 100, SEEK_BEGIN)
VFAT and EXT2 Section
  1. I have a 20M file, and I want to seek to the end of it.  Which file system would be faster on average
    1. EXT2
    2. VFAT
  2. Is that your final answer?
    1. Yes
    2. No
  3. In an EXT2 filesystem, how many inode bitmaps are there?
    1. Zero
    2. One
    3. Lots
    4. An infinte amount.
  4. You have a VFAT file system.  It has 1K blocks, and 4 blocks per cluster, with 140 sectors per track and 87 tracks per platter and 8 platters.  It's FAT 16.  How much space does a one byte file take? ______________________
  5. The command 'ls -l' shows the contents of a directory, along with metadata from that dir.  You see the name, creation date, file size, etc. for all files in the directory.   Which file system VFAT or EXT2 would be slower at this, and WHY? ________________________________________________________________________
  6. Out of the $1,000,000 that Regis gives you, how much do you get?
    1. $1,000,000
    2. $600,000
    3. $19.95
    4. About $1,000,000 minus a $10 tip to Cathy Lee
  7. You attempt to make a file using EXT2.  The directory that would contain the file is located in a group that's full.  The rest of the disk has lots of space.   What happens?
    1. Failure -- you get an error
    2. Success -- the file is made
  8. Circle all that are 'long filenames' acording to VFAT
    command.com                        autoexec.batch                     my data.txt
    index.html                                 Program Files                        text
  9. (Yes/No) Do VFAT filesystems have inodes?
  10. Assume 4K blocks.  What's the biggest file I can make using EXT2 before I need to use the doubly indirect pointer?  ____________________________
  11. Suppose I want to make the file "Temporary Data".  How many directory entries need to be created?  (Hint.  The answer is not "one"). _____________
  12. (Yes/No)Suppose you were running a VFAT filesystem ,and you lost the contents of both FATs.  Could you recreate this from other data on the disk?
  13. (Yes/No)  Suppose you were running the EXT2 filesystem, and you lost the data from a block bitmap.  Could you recreate this from other data on the disk?
Filesystem Misc
  1. What is a normal, average hit rate for the file system cache?
    1. 2%
    2. 50%
    3. 98%
  2. Why do we defragment the disk (circle all that apply)
    1. After defragmenting, we might be able to store more data than before.
    2. After defragmenting, the filesystem might be faster than before.
    3. After defragmenting, we might have more RAM than before.
    4. It's step #3 on the road to that $1,000,000.
    5. None of the above.
  3. I notice that when I call the write sustem call, the function returns in 0.001 milliseconds.  What can I conclude from this?
    _______________________________________________________________________________________________________
    _______________________________________________________________________________________________________
  4. Why are the suing the Millonare show?
    1. Slander and Libel
    2. Copyright violation
    3. Giving away to much money
    4. Links to the Hollywood Mafia
  5. Regis and Cathy Lee are on two different clients of an NFS server.  Regis opens the file 'riggedQuestions.txt', and changes it and does a 'file save' command from his editor. Then Cathy Lee opens the file.  Finally, Regis closes the file.  The list of system calls in order looks like this:  Regis-open(), Regis-read(), Regis-write(), Cathy-open(), Cathy-read(), Regis-close().  What version of the file does Cathy Lee see?
    1. She sees the file as it is after Regis's edits.
    2. She sees the file as it is before Regis's edits.
    3. She might see either the before or after version of Regis's edit.  You cannot tell.
    4. This cannot happen.
  6. What is the purpose of the VFS file system?
    1. It's a filesystem optimzed for speed.  "Our filesystem is faster than yours, and benchmarks prove it".
    2. So that users can use multiple other filesystems like VFAT and EXT2 and NFS at the same time without knowing which is which.
    3. For teachers to show students.  It's a primative filesystem , easily understood.
    4. Regis was just showing off his computer skill when he wrote this.
Hard Drives
  1. What is a reasonable seek time for a normal hard drive?
    1. 1 microsecond
    2. 1 millisecond
    3. 10 milliseconds
    4. 100 milliseconds
    5. 3,600 RPM
    6. 7,200 RPM
    7. I choose "B".  The Caymen Islands
  2. Suppose my disk is in the process of writing data, and I pull the power cord.  What happens?
    1. The operation completes, and then the disk stops.
    2. The sector I was writing is bad, but noticably bad.
    3. The sector I was writing is bad, but it looks reasonable.
    4. The track I was writing is bad, but noticealy bad.
    5. The track I was writing is bad but looks reasonable.
    6. The drive will need to be reformatted to correct the errors.
    7. The drive will need to be replaces.
  3. Why does Cathy Lee call Regis a 'hard drive'.
    1. His serious work ethic.
    2. His annoying early morning habits.
    3. His bad taste in clothing.
    4. His golf swing.