CS 33211 "Operating Systems" HOMEWORK #3 Due in class on 4/30/07 The numbers in parenthesis refer to exercises in "Operating System Concepts" (OSC) textbook. 1. What is the effect of allowing two entries in a page table to point to the same frame in memory? Explain how this effect could be used to decrease the amount of time needed to copy a large amount of data in memory from one place to another. What would the effect of updating some byte in the one page be on the other page? 2. (OSC 8.12) Consider the following segment table ... 3. Consider the following page reference string: 1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6 How many page faults occur for the following replacement algorithms assuming four, five, and six frames? Explain your answer. The frames are initially empty, so your first unique page accesses will all cost one fault each. * LRU replacement * FIFO replacement * optimal replacement 4. (OSC 9.16) Is it possible for a process ... 5. Could you simulate a multilevel directory structure with a single-level directory structure in which arbitrary long names can be used (that is it would look the same to the user)? If no, explain why no. If yes, explain how you would implement it. How would your answer change if file names were limited to seven characters? 6. Consider a file currently consisting of 100 blocks. Assume that (FCB and the index bloc in case of indexed allocation) is already in memory. Calculate how many disk I/O operations are reacquired for contiguous, linked, and single-level indexed allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, 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 beginning e) the block is removed from the middle f) the block is removed form the end 7. Consider a system where free space is kept in a free-space list. a. suppose that the pointer to the free-space list is lost. Can the system reconstruct the free-space list? Explain your answer. b. suggest a scheme to ensure that the pointer is never lost as a result of a memory failure. 8. Differentiate between a STREAMS driver and a STREAMS module 9. (OSC 12.2) Suppose that the disk ... 10. (OSC 12.7 a. and b. only) Requests are not usually ... 11. Explain the differences in reliability of RAID levels 0+1 and 10. 12. Under what circumstances would SIGHUP signal not terminate the process? Explain what the programmer should do to have his program (rather than operating system) handle division by zero.