DOC PREVIEW
UCLA COMSCI M151B - 08~solutions_for_chapter_8_exercises

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Solutions for Chapter 8 Exercises 1 Solutions for Chapter 8 Exercises 8.1 Each transaction requires 10,000 × 50 = 50,000 instructions.CPU limit: 500M/50K = 10,000 transactions/second.The I/O limit for A is 1500/5 = 300 transactions/second.The I/O limit for B is 1000/5 = 200 transactions/second.These I/O limits limit the machine. 8.2 System AThus system A can only support 9 transactions per second.System B—first 500 I/Os (first 100 transactions)Thus system B can support 11 transactions per second at first. 8.3 Time/file = 10 seconds + 40 MB * 1/(5/8) seconds/MB = 74 secondsPower/file = 10 seconds * 35 watts + (74 – 10) seconds * 40 watts = 2910 JNumber of complete files transferred = 100,000 J/2910 J = 34 files 8.4 Time/file = 10 seconds + 0.02 seconds + 40 MB * 1/(5/8) seconds/MB = 74.02secondsHard disk spin time/file = 0.02 seconds + 40 MB * 1/50 seconds/MB = 0.82 sec-ondsPower/file = 10 seconds * 33 watts + 0.02 seconds * 38 watts + 0.8 seconds * 43watts + 63.2 seconds * 38 watts = 330 J + 0.76 J + 34.4 J + 2401.6 J = 2766.76 JNumber of complete files transferred = 100000 J / 2766.76 J = 36 filesEnergy for all 100 files = 2766.76 * 100 = 276676 J transactions 9 compute 1I/Os 45 latency 5times 900 ms 100 us 100 ms exceeds 1 stransactions 9 compute 1 1I/Os 45 latency 5 5times 810 ms 100 us 90 ms 90 ms 990.1 ms2 Solutions for Chapter 8 Exercises 8.5 After reading sector 7, a seek is necessary to get to the track with sector 8 onit. This will take some time (on the order of a millisecond, typically), during whichthe disk will continue to revolve under the head assembly. Thus, in the versionwhere sector 8 is in the same angular position as sector 0, sector 8 will have alreadyrevolved past the head by the time the seek is completed and some large fraction ofan additional revolution time will be needed to wait for it to come back again. Byskewing the sectors so that sector 8 starts later on the second track, the seek willhave time to complete, and then the sector will soon thereafter appear under thehead without the additional revolution. 8.6 No solution provided. 8.7 a. Number of heads = 15b. Number of platters = 8c. Rotational latency = 8.33 msd. Head switch time = 1.4 mse. Cylinder switch time = 2.1 ms 8.8 a. System A requires 10 + 10 = 20 terabytes.System B requires 10 + 10 * 1/4 = 12.5 terabytes.Additional storage: 20 – 12.5 = 7.5 terabytes.b. System A: 2 blocks written = 60 ms.System B: 2 blocks read and written = 120 ms.c. Yes. System A can potentially accommodate more failures since it has moreredundant disks. System A has 20 data disks and 20 check disks. System Bhas 20 data disks and 5 check disks. However, two failures in the same groupwill cause a loss of data in both systems. 8.9 The power failure could result in a parity mismatch between the data andcheck blocks. This could be prevented if the writes to the two blocks are performedsimultaneously. 8.10 20 meters time: 20 m * 1/(1.5 * 10 8 ) s/m = 133.3 ns2,000,000 meters time: 2000000 m * 1/(1.5 * 10 8 ) s/m = 13.3 ms 8.11 20 m: 133.3 * 10 –9 s * 6 MB/sec = 0.8 bytes2000000 m: 13.3 * 10 –3 s * 6 MB/sec = 80 KBSolutions for Chapter 8 Exercises 3 8.12 4 KHz * 2 bytes/sample * 100 conversations = 800,000 bytes/secTransmission time is 1 KB/5 MB/sec + 150 µs = 0.00035 seconds/KBTotal time/KB = 800 * 0.00035 = 0.28 seconds for 1 second of monitoringThere should be sufficient bandwidth. 8.13 a. 0b. 1c. 1d. 2e. Each bit in a 3-bit sequence would have to be reversed. The percentage oferrors is 0.01 * 0.01 * 0.01 = 0.000001 (or 0.0001%) 8.14 a. 1b. 0 8.15 a. Not necessarily, there could be a single-bit error or a triple-bit error.b. No. Parity only specifies whether an error is present, not which bit the erroris in.c. No. There could be a double-bit error or the word could be correct. 8.16 (Seek time + Rotational delay + Overhead) * 2 + Processing time(0.008 sec + 0.5 / (10000/60) sec + 0.002) * 2 + (20 million cycles)(5 GHz) sec =(.008 + .003 + .002)*2 + .004 = 30 msBlock processed/second = 1/30 ms = 33.3Transfer time is 80 µsec and thus is negligible. 8.17 Possible answers may include the following: ■ Application programmers need not understand how things work in lowerlevels. ■ Abstraction prevents users from making low-level errors. ■ Flexibility: modifications can be made to layers of the protocol without dis-rupting other layers.4 Solutions for Chapter 8 Exercises 8.18 For 4-word block transfers, the bus bandwidth was 71.11 MB/sec. For 16-word block transfers, the bus bandwidth was 224.56 MB/sec. The disk drive has atransfer rate of 50 MB/sec. Thus for 4-word blocks we could sustain 71/50 = 1simultaneous disk transfers, and for 16-word blocks we could sustain 224/50 = 4simultaneous disk transfers. The number of simultaneous disk transfers is inher-ently an integer and we want the sustainable value. Thus, we take the floor of thequotient of bus bandwidth divided by disk transfer rate. 8.19 For the 4-word block transfers, each block now takes1. 1 cycle to send an address to memory2. 150 ns/5 ns = 30 cycles to read memory3. 2 cycles to send the data4. 2 idle cycles between transfersThis is a total of 35 cycles, so the total transfer takes 35 × 64 = 2240 cycles. Modify-ing the calculations in the example, we have a latency of 11,200 ns, 5.71M trans-actions/second, and a bus bandwidth of 91.43 MB/sec.For the 16-word block transfers, each block now takes1. 1 cycle to send an address to memory2. 150 ns or 30 cycles to read memory3. 2 cycles to send the data4. 4 idle cycles between transfers, during which the read of the next block iscompletedEach of the next two remaining 4-word blocks requires repeating the last twosteps. The last 4-word block needs only 2 idle cycles before the next bus transfer.This is a total of 1 + 20 + 3 ∗ (2 + 4) + (2 + 2) = 53 cycles, so the transfer takes 53 ∗ 16 = 848 cycles. We now have a latency of 4240 ns, 3.77M transactions/second,and a bus bandwidth of 241.5 MB/sec.Note that the bandwidth for the larger block size is only 2.64 times higher giventhe new read times. This is because the 30 ns for subsequent reads results in feweropportunities for overlap, and the larger block size performs (relatively) worse inthis situation. 8.20 The key advantage would be that a single transaction takes only 45 cycles, ascompared with 57 cycles for the larger block size. If because of poor locality wewere not able to make use of the extra data brought in, it might make sense to


View Full Document

UCLA COMSCI M151B - 08~solutions_for_chapter_8_exercises

Download 08~solutions_for_chapter_8_exercises
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 08~solutions_for_chapter_8_exercises and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 08~solutions_for_chapter_8_exercises 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?