CSE3303 Final Exam, Group A
Jan 16, 2006

Q1 (5 pts): I have a HD of 40GB with a file system on it that has 4KB blocks. It is 90% full. The disk space lost due to internal fragmentation is 2%. How many files do I approx. have?

Q2 (10 pts): Let's say I have a disk with 15 blocks (0 through 14). And I have 3 files on the disk: fA, fB and fC. fA takes up blocks 1 4 3 6 in that order. fB occupies 8 9 14 12 7. fC occupies 10. FAT file system is used. Give me the file allocation table contents. Use index -1 to mark the last block in a file. Use 15 for unused blocks.

Q3 (10 pts): Let's say I have a FAT disk with 10 blocks (0 through 9). The file allocation table contains 1, 0, 2, 4, 6, 7, 5, -1, 9, 8. Is there a file on the file system.

Q4 (15 pts): Consider the following snapshot of a system:

       
       Alloc    Req       Max     Avail
      A B C D  A B C D  A B C D  A B C D
      -------  -------  -------  -------
  P0  2 0 0 2  4 5 4 3  4 5 4 3  1 1 2 4
  P1  1 0 2 0  2 6 3 1  2 6 3 3
  P2  1 1 0 0  3 4 5 6  5 4 5 6
  P3  1 3 2 0  3 5 6 3  3 7 6 3

(a) Show that the system is in a deadlock. Explain why. (b) What is the min number extra resources we need to add to Avail to make the system free of deadlock. (c) Add that many resources and then show that the system is now in a non-deadlock state by giving a sequence.

Q5 (12 pts): Consider the filesystem we invented in SF, where a block can either be a data block or pointer block. I have a file with 1,999KB of data. Draw the index blocks (like a graph) and show how they point to each other as well as data blocks. How many pointers are there? What is the file size on disk. (Use a block size of 1KB. A pointer is 4B. Every block has a header of 4B.)

Q6 (12 pts): Let's say our disk's head is on track 30 and the pending requests are for tracks 16, 29, 33, 49, 52, 60, 92. Use SSTF to schedule the disk accesses. Give me the sequence of accesses as well as the total number of tracks traveled.

Q7 (10 pts): If a UNIX inode had a 4th level indirection, what would be the largest file size on UNIX. Use a block size of 512B and 4B pointers.

Q8 (5 pts): In Cygwin I am trying to get a list of the names of all files under the Z: drive (but not any other drive) whose filenames contain the word "bahcesehir" (case sensitive) and file contents do NOT contain "cse" (case sensitive). How do I do that?

Q9 (5 pts): In Cygwin "spell" program spell-checks a file. I am trying to find the number of unique words that are misspelled in a file called cse3303. How do I do that?

Q10 (3 pts): What is dynamic mounting of drives?

Q11 (8 pts): What is a real-time system (RTS)? What is a hard RTS? What is a soft RTS? What is different between the two? Give an example of to both hard and RTS.

Q12 (3/-1 pts): Which of the following is false in regards to free disk space management methods?
(a) Bit Vector method allows contiguous allocation.
(b) Bit Vector method excels in allocation time.
(c) Linked List method good allocation and update time.
(d) Linked List method suffers in contiguous allocation department.
(e) Counting Linked List method suffers in update time.

Q13 (3/-1 pts): Which one of the below is correct about a RAMDISK?
(a) RAMDISK is a hard disk with a RAM cache.
(b) RAMDISK is another name for USB sticks.
(c) RAMDISK provides many times faster file access than a regular disk drive.
(d) RAMDISKs are not available on UNIX systems.
(e) RAMDISK is a feature of some HDs that needs to be turned on in the OS.

Q14 (3/-1 pts): A cycle in the Resource Allocation graph indicates a deadlock provided
(a) there is more than one resource of each type
(b) there is a single resource of each type
(c) there are fewer processes than resources
(d) there are more processes than resources
(e) none of the above

Q15 (3/-1 pts): SAMBA is a
(a) UNIX web server software
(b) Windows web server software
(c) UNIX file server software
(d) Windows file server software
(e) hardware platform that runs a web server

Q16 (3/-1 pts): Which one is false in regards to swap space management in UNIX?
(a) UNIX uses a separate partition for swap space
(b) UNIX uses a different file system for swap space
(c) UNIX tries to allocate contiguous space for swapped processes since performance is the highest priority when it comes to swap space.
(d) UNIX's swap space infrastructure offers higher performance (ie. speed) than Windows.
(e) UNIX's swap space size can expand unlike Windows.