HW #5 Solution (Chapter 6)

6.5.

a)

Because we need a total of 10GB of disk space, this requires either twenty 500MB disks or eight 1,250MB disks. Each transaction requires ( 2 reads + 2 writes ) * 15,000 + 40,000 instructions which is a total of 100,000 instructions or 0.1 MIPS per transaction.

Units

Performance

Number of Units

Demand per Transaction

TPS limit

CPU

800 MIPS

1

0.1 MIPS

8,000

BUS

1000 MB/sec

1

400 bytes

2,621,440

Small disk

30 IOs/sec

20

4 I/Os

20*30/4 = 150

Big disk

30 IOs/sec

8

4 I/Os

8*30/4 = 60

Figure 1: TPS limits for each component of the system

b)

Organization

Cost

TPS

Cost per TPS

CPU with small disks

$52,000

150

$346

CPU with big disks

$52,000

60

$866

Figure 2: Cost per TPS

c)

In this question, we are asked how fast the CPU would have to be before it could flood the bus with requests. Since the current bus can handle 2,621,440 TPS and the current CPU can handle 8000 TPS, the CPU would have to be 2,621,440 / 8000 = 328 times faster than the current CPU. Current CPU is 800 MIPS, the new CPU would have to be 262,400 MIPS.

d)

The software approach would reduce the number of instructions per transaction. The new TPS would be: 15,000 * ( 1 read + 1 write ) + 30,000 = 60,000 inst/transaction

So the new CPU would have to be 100,000 / 60,000 = 1.67 times faster than the original CPU.

e)

Because the original CPU was limited at 8,000 TPS, the new CPU will be limited at 16,000 TPS. In order to provide enough small disks, each of which can provide 30 I/Os, we would need 16,000 * 4 / 30 = 2,134 small disks to have enough bandwidth to keep up. The problem is even worse with the big disks because, although they have more storage, they do not process any more I/O requests than the small disks. Thus, there would be also 2,134 big disks to keep up with the I/O demands.

For small disks, Cost = $50,000 + ( 2,134 * $100 ) = $263,400

For big disks, Cost = $50,000 + ( 2,134 * $250 ) = $583,500

f)

Because we originally had 20 disks, to match the CPU TPS of 16,000 (where each TPS requires 4 I/Os), we would need to have 64,000/20 = 3,200 I/Os per second per disk. Assuming the new disks cost the same as the old and since the new CPU is the same cost as the old, the new system price would still be $52,000.

 

6.6

Access Timeavg = Timeseek + Timerotlatency + Timexfer + Timecont

For the controller time, we assume that it only needs to be paid for the first sector of a particular sequential read and its cost is Timecont = 2ms

 

Timerotlatency = 0.5 / 7,200RPM = 0.5 / 120RPS = 4.2ms

 

120RPS * 16 sectors = 1920 sectors/second

Since each sector has 1KB, the maximum transfer rate is 1.9MB/sec per disk ( so the four-disk array has a transfer rate of 7.6MB/sec).

For the single-disk configuration: Timexfer = 4,096 / 1,900,000 = 2.1ms

And the cost for the four-disk configuration is one-fourth that or 0.53ms.

To compute the seek time, we are told to use the formulas from the fallacy section, as the requests are random, the average distance in tracks is 1/3 of 885, or 295 tracks.

Timeseek = a * sqrt( 294 ) + b * 294 + c

Take the inverse of the average access time, we get the number of I/Os per second that a disk configuration can handle:

I/Os per second = 1 / Access Time

MB / sec = 4KB * I/Os per second

6.7

This question is solved exactly like Exercise 6.6 except that we plug in the value 10 for the average seed distance instead of 295.

6.8

This question is solved exactly like Exercise 6.6 except that we use a transfer size of 1MB to compute the transfer time per I/O instead of 4KB.

Because more data is being transferred than can be stored on one track of one surface, we will account for that by computing the transfer time slightly differently.

Since the each track can hold 16KB worth of data, and we need to read 1,024 KB worth of data, we will need to read 64 separate tracks. Since there are 20 surfaces, that means the arm will need to seek one track 64/20 = 4 timers to get to each new cylinder. Also each time the disk has to change to a new surface, we have to pay the cost of a one-track switch (as given in the exercise statement) for the total of 64 surface switches.

Timexfer = Timexfer 1 sector + 64 * Time1 track seek + 4 * Time1track seek