CSE3303 Sample Final

Q1: A cycle in the Resource Allocation graph indicates a deadlock provided
(a) there is more than one resource of each type
(b) there is one resource of each type
(c) there are more resources than processes
(d) there are more processes than resources
(e) none of the above

Q2: Which one of the below is NOT a method to detect a cycle in an undirected graph (ie. edges do not have arrows)?
(a) Depth-first search where we mark nodes visited
(b) Breadth-first search where we mark nodes visited
(c) Hansel-Gratel method
(d) Recursive search
(e) Identification of strongly connected components

Q3: Which of the folloing makes sure that a directed graph is a tree?
(a) The graph can be levelized
(b) Every node has exactly one incoming edge
(c) There is no cycle and every node has at most one incoming edge
(d) There is a root node
(e) None of the above

Q4: If there is a deadlock, the following actions can be taken. List them in the order of their impact on the system's performance. Go from least impact to most impact. (1) Reboot the system (2) Toggle the power switch (3) Terminate processes randomly until the deadlock is broken (4) Detect processes involved in the deadlock and terminate them until the deadlock is broken (5) Detect processes involved in the deadlock and rool them back to their previous checkpoints until the deadlock is broken.

Q5: What does PCB stand for?

Q6: What is a RAMDISK? What is it useful for?

Q7: What does RAID stand for and what is it?

Q8: What is phishing?

Q9: What is interleaving?

Q10: What is authentication?

Q11: What is RSA?

Q12: What is SAMBA?

Q13: What is automounting of drives?

Q14: What is dynamic mounting of drives?

Q15: What is the distinguishing property of hard real-time systems? Give an example of a hard real-time system.

Q16: What is different between hard and soft real-time systems? Give an example of a soft real-time system.

Q17: Give an example of a system which would lose a lot of performance if it had to only sequentially access files (ie. could not random-access files).

Q18: What is the file operation used for random-access?

Q19: What is internal fragmentation in disks?

Q20: What is external fragmentation in disks?

Q21: What does defragmentation software do?

Q22: What is the difference between a sector and block (also called cluster)?

Q23: Let's say you are the system administrator of a Linux Apache web server. One of the links (which is to a plain html file) does not work. You are sure the file is there and other html files in the same directory are displayed without any problems. What might be wrong?

Q24: I have a HD of 40GB with a file system on it that has 4KB blocks. It is half full. The disk space lost due to internal fragmentation is 1%. How many files do have?

Q25: I have a HD of 40GB with four 10GB partitions. I have FAT32 file systems on my partitions with 4KB block size. What is the size of each partition's table? What percentage of the disk space is lost to partition tables?

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

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

Q28: Consider the UNIX inode figure in the "File-Ssstem Implementation" chapter. The header is 8 words and each word is 4B. Note that intermediate index nodes contain nothing but pointers. Each pointer is 4B. What is the largest possible file size. Each block is 512B.

Q29: We have 100 processes. Pi arrives at t=2i. P0's CPU burst is 200ms. Other processes all have a burst of 20ms. The OS is doing a RR (round robin) scheduling with a time quantum of tq. What is the average completion time (a) when tq=10 (b) when tq=100.

Q30: 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) None of the above is false.

Q31: 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 suffers 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 excels in update time.

Q32: Go over the Linux questions in MQ and MT and any other Linux questions posted on the webpage.

Q33: 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 3 2 1  2 3 2 3
  P2  1 1 0 0  3 4 5 6  5 4 5 6
  P3  1 3 2 0  3 5 6 2  3 7 6 2

(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.

Q34: How do you a open a file if you are going to use it as a communication medium between two programs, ie. a substitute for IPC?

Q35: In UNIX let's say we have a file which has its x permission set but it is a plain text file. Can the file be executed? If yes, how?

Q36: Most filesystems decide whether a block is an index block (a set of pointers to blocks) or data statically. At Juniper Networks, we used a mechanism, which lets a block be either a data block or index block based on a header bit in the block itself. Give this solve the following problems. Assume a block size of 4KB. A pointer is 4B. Assume we can fit 4KB of data in a data block and 1K pointers in an index block. Let's say we have 1,000 1KB files, 500 5KB files, and 1 100MB file. (a) How much disk space will these files use in our flexible file system? (b) What is the largest file size we can have in this flexible file system? (c) Instead of this flexible file system, if we had a 3 level indexing mechanism 3 levels in all cases), how much disk space would be used? (d) What is the largest file size in this inflexible file system?

Q37: Let's say our disk's head is on track 50 and the pending requests are for tracks 29, 92, 45, 60, 49, 52. Use SSTF to schedule the disk accesses.