CS 431W

Exam #3

Due December 3, 2003, 8:00 a.m.

This exam is a take-home examination. The exam is open book, but no collaboration is allowed. Specifically, you may not communicate with any person about any aspect of the exam until after the hand-in deadline, even if you have already handed in your exam. You may use your notes from the course and your textbook, but you may not use any other sources. Specifically, you may not use notes or problem solutions from previous courses taught here at Sam Houston State University, nor may you use notes or problem solutions from similar courses taught at other institutions.

Attach this cover sheet and the problem sheet to your exam solutions as you turn it in your work.

Name ______

(printed)

I certify that I have not collaborated with anyone else in the solution of these problems. I understand that the penalty for any academic dishonesty will be severe, up to, and including failure for this course.

Signature______

1.Consider a system that supports 5,000 users. Suppose that you want to allow 4,990 of these users to be able to access one file.

a.How would you specify this protection scheme in UNIX?

b.Suggest a protection scheme that is more effective than the scheme provided by UNIX.

1.Consider a file currently consisting of 100 blocks. Assume that the FCB (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for a contiguous allocation strategy, if, for one block, the following conditions hold. For the contiguous allocation, assume that there is no room to grow in the beginning, but room to grow in the end. Assume that the block information to be added is stored in memory.

a.The block is added at the beginning.

b.The block is added in the middle

c.The block is added at the end.

d.The block is removed from the middle.

e.The block is removed from the end.

1.Repeat problem 2 using a linked allocation strategy.

2.Repeat problem 2 using an indexed (single level) strategy.

3.Suppose that a disk drive has 5,000 cylinders, numbered from 0 to 4999. The disk drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is
86, 1470, 913, 1774, 948, 1509, 1022, 1750, 120.
Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms?

a.FCFS

b.SSTF

c.SCAN

d.LOOK

e.C-SCAN

f.C-LOOK

1.Give an advantage of having the partition specified as part of the filename (as is done on DOS) and give an advantage of doing it the other way (i.e., allowing partitions to be mounted into a unified name space.)

2.What is the advantage of allowing non-file objects in the file system structure?

3.Consider a password consisting of exactly 6 characters, constructed using lowercase letters and digits.

a.How many passwords could be constructed of this type?

b.What is the maximum time it would take to crack this password if one password can be checked every microsecond?

1.Repeat problem 8 for an 8 character password, consisting of digits, uppercase letters, and lowercase letters.

2.When a user enters a command on a DOS or Unix system, the command interpreter searches a sequence of directories for a file whose name matches the command entered. The list of directories is configurable and includes the directories where system files are stores. It also often includes the current directory. Explain why it is dangerous to have the current directory searched first.