CS345 Operating Systems May 4, 1998 Quiz # 3 (OS) Tanenbaum, chapter 6, 7, 9 1) Suppose that there are five processes A, B, C, D, E. There are three resources: Tape, CD, Printer. The following snapshot describes the system: Has Max Still Free (Avail.) | Tape, CD, Printer | Tape, CD, Printer | Tape, CD, Printer A | 0 1 0 | 7 5 3 | 3 2 2 B | 2 0 0 | 3 2 2 | C | 3 0 2 | 9 0 2 | D | 2 1 1 | 2 2 2 | E | 0 0 2 | 4 3 3 | This system is in what state: ______________________________ Choices are: deadlocked, safe, unsafe If unsafe, which resource(s) is the problem? ______________ Describe. If it is safe, which sequence of process execution will fulfill these criteria: ___________________ 2) Please complete Tanenbaum [1992], chapter 7 (Unix), problem 9 with all steps clearly shown/described. 3) Write a C program for Unix which uses system calls to creat two independent child processes, one of which says "Hello World" followed by it's process id and the other saying "Good Bye" followed by it's process id. Correctness counts as the code will be tested for completeness and lack of bugs. 4) Please complete Tanenbaum [1992], chapter 7 (Unix), problem 13 with all steps clearly shown/described. 5) Please complete Tanenbaum [1992], chapter 9 (Client-Server), problem 12 with all steps clearly shown/described. Have a good summer.