SOLUTIONS 7-1 SOLUTIONS 9-1

6-2 1615: 000000 1 000000 0 100010 0 0 0 0001 110 00000010101 21: 100001 0 100001 0 100011 0 0 0 0010 000 00000000000 6-3 00000000 00000000 0 00 00000000 0 00000111 00000011 0 01 00010101 0 11111111 11111111 1 11 11111110 1

CHAPTER 7 SOLUTIONS 7-1

T eff = .95 × 100ns + .05 × 800ns = 135ns 7-2 Tag: 8 bits Set: 4 bits Word: 7 bits 7-3 page offset 2050 = 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 virtual 4096 = 1 0 0 0 0 0 0 0 0 0 0 1 0 physical 25 = 0 0 0 0 0 0 0 0 1 1 0 0 1 physical 4121 = 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 virtual 7-4 a 0, 2, 4, 5, 3, 11, 10 b 0, 2, 4, 5, 3, 11, 2, 10 7-5 a N - M N b M - F M c T1×N - M N + T2 × M - F M + T3 × F 7-6 C 10 7-7 Iteration 1: 5 misses and 60 hits Iterations 2 - 10: 2 misses and 63 hits per iteration Hit ratio = hitsmisses = 60 + 9 x 63 65 x 10 = 96.56 7-8 Tag Set Byte 8 bits 4 bits 7 bits 7-9 B 5; page faults: 1, 8, 7, 2, 3 7-10 False 7-11 a Tag Slot Byte 7 bits 8 bits 4 bits b Hit ratio = 34 + 9 x 38 10 x 38 = 376 380 = 98.94 T eff = [4 misses x 210nsmiss + 34 + 9 x 38 hits x 10 nshit] 380 accesses = 12.1 ns 7-12 a 00000000000 b This address is in Page 1 which is not present, so there is no virtual address. 7-13 24 7-14 D 31 7-15 T eff = .9 × T1 + .9 × 1 - .9 × T2 + [1 - .9 × 1 - .9] × T3 CHAPTER 8 SOLUTIONS 8-1 1 Read 0, 1, 2, 3 on first rotation. 2 Write 0, 1, 2, 3; read 4, 5, 6, 7 on second rotation 3 Write 4, 5, 6, 7 on third rotation. Total time = 3.0 rotations x 16 msrotation = 48 ms. 8-2 a 16 surfaces x 2048 trackssurface x 256 sectorstrack x 512 bytessector = 2 32 bytes b 7200 revmin x 160 minsec x 1 trackrev x 256 sectorstrack x 512 bytessector = 15.7 MBsec c Avg seek time = 7ms. Avg rotational delay = [17200 minrev x 60 secmin]2 = .00417s = 4.17ms Sector readwrite time = 18 x [17200 minrev x 60 secmin] = .00104s = 1.04ms Avg transfer time = [7ms + 4.17ms + 1.04ms read] + [7ms + 4.17ms + 1.04ms write] = 24.42ms 8-3 10 6 wordss per bus × 1.5 × 10 6 sword per disk = 20 disksbus

CHAPTER 9 SOLUTIONS 9-1

1 1 1 0 1 0 0 1 0 1 1 1 -- -- -- -- -- -- -- -- -- -- -- -- 12 11 10 9 C8 7 6 5 C4 3 C2 C1 9-2 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 21 20 19 18 17C16 15 14 13 12 11 10 9 C8 7 6 5 C4 3 C2 C1 9-3 We want a Hamming distance of 2 between valid numbers, in base 10. In base 2, we looked for evenodd parity, which can be generalized to mod2sum of digits in number = 0 for even parity. We want mod10sum of digits in number = 0 for this problem. So, mod_104+4+5+2+6+5+4 = 0 is a valid telephone number 445-2654 whereas mod_104+4+5+3+5+2+3 = 6 is not 445-3523. Since only 110 of the numbers will come out as mod_10 = 0, only 10 of the possible numbers can be assigned. 9-4 For each of the 10 7 valid phone numbers, there is an uncorrupted version, and 9×7 ways to corrupt each of the 7 original digits, plus 9r ways to corrupt each of the r check digits. The following relationship must hold: 10 7 9×7 + 9r + 1 = 10 7 + r which simplifies to 64 + 9r = 10 r for which r = 2 is the smallest value that satisfies the relation. 9-5 a C 1 00010 D 0 00011 E 1 00100 F 0 00101 C 0 00110 Chk 0 00110 b The letter ‘M’ 9-6 B 43 CHAPTER 10 SOLUTIONS 10-1 1 + P