CSC 112 Final Exam Study Guide Exam time: Monday 5/13 at 10:30am The exam will cover material since the first exam. Some of the material will overlap with the last quiz. It will be approximately 1-1.3 hours in length. The amount of programming knowledge required will be approximately the same as on the first exam. You will not be asked to write entire programs, but you may be asked to write short program statements, and be able to analyze the behavior of code that I write. Topics to study: Deadlock Necessary conditions for deadlock Deadlock prevention, detection and avoidance strategies Resource allocation graphs Safe states (both single and multiple instances of resources) Banker's algorithm Memory Management Paging and Segmentation Fragmentation Page tables, including multi-level page tables Use of Hardware support - TLB, reference bit, etc ... Memory management under Windows 2000. Virtual Memory Demand paging Page replacement policies and algorithms Belady's anomaly Working set theory Thrashing Virtual Memory unders Windows 2000 ( study the page replacement algorithm, and the different states of a page ) Files and Interprocess Communication File permission bits and Setuid bit File descriptor usage (read and write) How fork() works Pipe usage Client-Server relationship between processes (but TCP/IP sockets will NOT be on the exam.) What to study: class notes text book homeworks sample programs and other material on the homepage Windows 2000 virtual memory handout Lecture material on deadlocks and virtual memory closely follows the textbook. The exercises at the end of chapters 8, 9 and 10 will make good practice problems. Some sample questions (in addition to those found in book and last quiz) 1 Suppose a system holds 256 megabytes of physical RAM. The system usese a two-level paging system. The first level table is used to identify one of 64 level-two page tables. There are a total of 8192 (8K) pages. a. How many bits are needed in a memory address (give minimum) b. How many bits are used in the first level (used to find a page table). c. How many bits are used to find a particular entry in a page table c. What is the size of each page. 2 Describe the difference between global and local page replacement policies. Describe the policy used in Windows 2000 with respect to global versus local. 3 Describe an alternative to "demand paging." 4 In Windows 2000, what's the difference between a page that's on the standby list and a page on the free list? 5 Describe the function of the "zero page thread" in Windows 2000 memory management. 6 What are the two ways that the Windows 2000 memory manager can be triggered 7 Describe the purpose of the Setuid bit - what's the difference between setting and not setting this bit? 8 What is the value returned by fork() to the process that called it? 9 What's wrong with the following statement, which is intended to read 4 bytes from a file descriptor fd: char A[4]; A = read(fd,A,4); 10 True or false: the server is the active agent and the client is the passive agent.