15-347 Spring '98, Exam 1 Official solution --------------------------------------------------------------------------- PROBLEM 1. MAX ERROR = 5/(10000 - 5) ~= 5E-4 --------------------------------------------------------------------------- PROBLEM 2. [There were some problems in the design of this problem. The results were less "interesting" than had been intended.] A. Bits n=1 n=2 000 0 0 001 1/2 1/2 010 1 1 011 3/2 3/2 100 inf 2 101 nan 3 110 nan inf 111 nan nan B. Value n=1 n=2 1/8 0 0 1/3 1/2 1/2 1/4 0 0 1 1 1 4 inf inf --------------------------------------------------------------------------- PROBLEM 3. A. 12 tag, 2 index, 2 offset bits B. Referencing any of the following byte addresses could cause the block containing address 0x0103 to be overwritten 0x0110 .. 0x0113 0x0120 .. 0x0123 0x0130 .. 0x0133 0x0140 .. 0x0143 C. Addresses 0x0121, 0x0125, 0x0129, 0x012D D. Addresses 0x0140, 0x0144, 0x0148, 0x014C E. 75% [Misses 1st byte in each block, hits rest] --------------------------------------------------------------------------- PROBLEM 4. A. 128 B. 128 * 3 * 19 = 7296 C. 128 * 3 * 2 = 768 D. 128 * 3 = 384 E. 7296 + 768 + 384 + 96*1024*8 = 794,880 F. Must be a data cache, since it has a dirty bit [Icache is read-only] --------------------------------------------------------------------------- PROBLEM 5. Must send 30 * 1024 * 1024 = 30 Megapixels/second over bus with 80 Mbit/second capacity. Can have 8/3 bits per pixel. Round this down to 2 bits per pixel, allowing 4 gray scale levels. --------------------------------------------------------------------------- PROBLEM 6. A. 4KB = 8 sectors = 2/5 revolutions Disk requires 10ms to make full revolution Maximum Transfer time = 10ms seek + 10ms rot. latency = 2/5 * 10 transfer = 24 ms B. Speeding disk by k would give transfer time 10 + 14/k Must have k=7 to get 12. Disk must run at 6000 * 7 = 42000 RPM --------------------------------------------------------------------------- PROBLEM 7. Part 1: 1 7FFFFFFF 2 FFFFFFFF 3 00080000 4 00080000 Part 2: 1 F e.g., ux = 0 2 T [Must have MSB = 1] 3 F e.g., x = Tmin, y = 1 or Tmax 4 T [ux must have MSB = 1, and ux != TMin] 5 T [Low order bits of product identical for unsigned & signed] 6 F e.g., x = y = Tmax ---------------------------------------------------------------------------