CS2200 Summer 2005 Practice Final Use this test to help you prepare for the final. Bring a calculator to the final. A powerful calculator. 1. A memory reference is broken down as follows: Offset 6 bits Index 12 bits Tag 14 bits The cache is a 3-way set associative cache. It uses a write back policy and an LRU replacement policy. How much data memory is needed? Layout the cache in detail How many total bits are required for the cache? 2. Define spatial locality, temporal locality and working set. How do cache designs exploit these characteristics of patterns of memory access? 3. We have a very complex scientific calculation that takes 9 hours on a supercomputer. We decide to use 4 identical supercomputers but note that only 75% of the work may be parallelized. How long will the program take to run using the 4 supercomputer setup and what speedup does this represent? 4. Explain what each of the following do: mutex_lock mutex_unlock cond_signal cond_wait 5. Examine typical producer-consumer code. Construct a possible timeline of the execution of this code. At any point in the timeline be able to indicate which threads are waiting for mutexes and which threads are waiting for condition variables. Mark where in time these conditions change. 6. Compare and contrast Repeaters/Hubs, Bridges, Switches, Routers, NIC's and Hosts. What layers of the TCP/IP protocol stack are used by each device? 7. Suppose a disk drive has 4096 cylinders, numbered from 0 to 4095. There are 8 platters and both sides of each are used. Each track has 16 sectors. Each sector holds 256 bytes. How many total bytes on the drive? 8. Look up technical information about Inodes and determine the maximum file size that can be handled by an Inode. 9. Draw a state diagram which indicates the various states a process can be in. Label the diagram to indicate where your P4 accomplished each state transition. 10. Compare and contrast preemptive and non-preemptive scheduling. Include in your answer a discussion of problems such as starvation. 11. Given these parameters: Wire Band Width = 10Mbps (107 bits per second), full-duplex Time-of-flight = 10ms (10-2 seconds) Sender overhead = 100us (10-4 seconds) Receiver overhead = 100us (10-4 seconds) What's the effective bandwidth if you send 10000-bit messages with acknowledgements. i.e you can only have one message out on the network at a time. Acknowlegement messages have a size of 100bits. 12. How do networks deal with sources of unreliability? Which of these did you implement in Project 5.