CSE 5306 Name______________________________________ Operating Systems Student ID Number_________________________ Exam 3, Summer 1997 Please read this: This is a closed book, closed notes exam. Use a dark ink and print answers on the test paper following the question. Please try to keep answers together on the test page and avoid writing on the back of the sheets of paper. Turn in all pages of the test. Write your answers legibly. Unreadable answers will be counted wrong. Make sure you have all pages of the test. Read each question carefully and be sure your answer addresses the question. Overly general (non-specific) answers will be counted wrong. Point values are given for each question. The exam has a total of 100 points. NOTE: Some of the questions will refer to the following: Disk: The "spin" disk has the following characteristics: 6 platters (12 surfaces) each has 380 tracks (numbered 0 to 379) each track has 64 sectors, each sector is 2 Kilobyte. Sectors are numbered 0 to 63. The total (raw) disk capacity is 570 Megabytes. Track 0 is the outside track, track to track movement takes 2 millisecs (ie track 3 to 5 takes 4 ms) 1. [ pts] a.) In Apple MAC OS the file system identifies the "type" of each file: pictures, text, executables, etc. 1. How does UNIX do the same (identify which files are pictures, text, executable, etc.)? 2. How can (should) each OS support a new file type (like video with sound - VIDS) and 3. list an advantage of each method (or 2 advantages if the same method) 1. 2. 3. b.) The OS.5 uses an "access matrix" for protection. When a users application program wants to print to a physical printer the application calls a runtime library routine which interfaces to a printer deamon (task) which queues print jobs and allows for "print control" (killing jobs, etc.) which finally allows data to be sent to the printer. 1. In this scheme describe the access matrix entries (in general) what do rows and columns represent and 2. what does each entry represent? 3. What are an advantage and disadvantage to using "access matrix" rather than the way UNIX does protection? 1. 2. 3. c.) In the OS.99 several processes may open and read or write from the same file concurrently but changes made by a process may only be seen when that process closes the file and another process later opens the file. 1. What is this technique (issue) called? 2. If not the same, what does UNIX do in this situation? 2. [ pts] In programming assignment 4 (File Gather) you implemented a new, simple, file system. a.) Identify and briefly describe the "disk" space allocation method. b.) Identify 2 other disk space allocation methods, and give an advantage of each as compared to part a.) 1. 2. c.) What is the "logical" equivalent to the disk boot block (or UNIX "super block") and what part (if any) is necessary for your program? Why? d.) Due to an attack on your file system (or a programming error) some blocks are pointed to (part of) two different directory entries. Some used blocks are also marked as free. 1. What type of tool (if such could exist) could "repair" (fix) your file system? 2. Very briefly describe how it could work (or why it can not). e.) Describe how a virus could attack your assignment 4, 1. where could it "hide" and how? 2. Could the virus be spread, and how? f.) To prevent any security "attacks" on your assignment 4, you require each user to setup and use a password. The "root" password is hardcoded and not changeable but is a 30 character random mixture of letters and numbers. Each user sets her own password, minimum 20 characters, which must be changed every week. 1. You have created a potential security problem, what is it called, describe it, why is it a problem? 2. What minor change this method would be more secure and why? g.) One of the problems with the implementation of assignment 4 is that there are several file size limits. 1. In one case only a few characters can occupy an entire file system. Describe how this can occur and what (if anything) can be done to improve the situation. 2. What is the maximum size of a file that can fit in this FS? Could anything be done to improve this limit? h.) 1. Identify and describe what type of directory structure in assignment 4: (for example, "acyclic graph") 2. Assuming a linear directory, in what cases is this an advantage and when is it a disadvantage? 3. [ pts] A system uses the "spin" disk. We are currently reading on track 88, sector 20 (before that we were writing track 110, sector 32). The request queue, in arrival time order is: (track 180, sector 22), (track 80, sector 58), (track 92, sector 60) How much time would EACH of the disk scheduling algorithms take for the data given: (please show your calculations): FCFS = LOOK (SCAN with look) = SSTF = 4. [ pts] a.) Is X-Windows most appropriate in a LAN, WAN, or direct terminal? Why? b.) Sometimes it is better to view an X_window application as a small OS because of call back routines, etc. Describe how (and why) this X-windows interface is like an OS. c.) At what layer of the network protocol does a WWW browser run, if it depends on X-Windows for graphics, keyboard, mouse, etc. support? Why? d.) Briefly, describe the difference between connection schemes and routing in a network. Give 2 examples of each.