1. The errors are in column 2,6 and 7. Since if the file is consistent, each block will have a 1 either in the first row or the the second row. Here column 2 and 7 are missing blocks, they do not occur in either row, and column 6 indicates the block is present both in a file and in the free list. 2. When a file is opened, the open file structure is allocated in the open file table, and a pointer to that structure is placed in a table in the process descriptor of the process which opened the file. The file id returned by the call is an index into the open file pointer array(in the process descriptor). 3. Yes. The deadlock happens if we have process A calls RECEIVE to receive message from process B, process B sends a message, but the mailbox is full and need process A to get message from the mailbox to have space for process B's message. 4. When n=1,2,3,4,5, the system is deadlock free. If there are at least 6 processes and if each process hold 1 tape drive, deadlock happens. 5. 1)In UNIX, each file has nine bits consisting reading, writing and execution permissions for the owner, owner's group, and others. We can put the 4990 users in a group with access ability to the file while prohibit others from access. 2)A better way is to use ACL. One way to do it is to first specify the 10 users are prohibited from access the file, then have a ACL to give all users the access control. 6. Consider the file is modified while running, if paging from the file system directly, we might have old pages from the old file and new pages from the new file in the memory which results in inconsistent pages to use. 7. 10 11 104 170 73 309 185 245 246 434 458 364 ref string 0 0 1 1 0 3 1 2 2 4 4 3 ------------------------------------------------------------ 0 0 1 1 0 3 1 2 2 4 4 3 0 0 1 0 3 1 1 2 2 4 1 0 3 3 1 1 2 0 0 3 3 1 0 0 0 ------------------------------------------------------------ dis string - 1 - 1 2 - 3 - 1 - 1 4 where - represents the distance is infinity. 8. If using segmentation, the sharing occurs at the segmentation level. The sharing information can be shared by defining it to be a segmentation. But you might use more than one pages using pure paging. Furthermore, since reentrant module is non-self-modifying,i.e., it never changes during execution. This means it should be read-only or fetch-only. since segmentation is logically related, protection is easier. Single page may contain parts needing different protection. 9. The problem with stack is the processes which wait earlier(for example, the first process pushed in the stack) on the waiting lists might wait forever. Answers by: Qiao XIN