Computer Organization: Homework Set 10 Answer Key - Amdahl's Law & Disk Access, Assignments of Computer Architecture and Organization

The answers to homework set 10 of the introduction to computer organization course, focusing on amdahl's law and disk access. It includes calculations for speedup and cost-effectiveness of upgrading cpu and disks, as well as an explanation of why a disk is not a true random access device.

Typology: Assignments

Pre 2010

Uploaded on 08/04/2009

koofers-user-1ck
koofers-user-1ck 🇺🇸

8 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CPSC2105 Introduction to Computer Organization
Homework Set 10 Answer Key
1. Question: Is a computer with a 1GHz CPU more than 3 times faster than one with
a 300 MHz CPU?
Answer: The book correctly says to consider Amdahl’s law.
The speedup of the new component is 1000 / 300 = 10 / 3.
Amdahl’s Law states that 1 / S = (1 – f) + f / k where
S is the speedup,
f is the fraction of work performed by the faster component (0.0 f 1.0), and
k is the speedup of the new component. Here 1 / k = 3 / 10, so f / k = (3f) / 10.
If f 1, then we have 1 / S 3 / 10 or S 10/3. This might be true for “compute bound”
jobs. However, if about 50% of the work is CPU and 50% is I/O, then we have
1 / S = 1/2 + 1/2 (3 / 10) = 10 / 20 + 3 / 20 = 13 / 20, and S = 20 / 13 1.54.
2. 60% CPU activity and 40% Disk activity.
Option 1 calls for new disks. k = 2.5 for a cost of $8,000.
Option 2 calls for a new CPU. k = 1.4 for a cost of $5,000.
Answers:
a) Option 1 improves the new disks. Here f = 0.4 and (1 – f) = 0.6
The speedup is given by 1 / S = 0.6 + (0.4 / 2.5) = 0.6 + 0.16 = 0.76, so S 1.32.
Option 2 improves the CPU. Here f = 0.6 and (1 – f) = 0.4
The speedup is given by 1 / S = 0.4 + 0.6 / 1.4 = 0.4 + 0.428 = 0.828, so S 1.21.
Option 1 gives 32% improvement for $8,000 or 4% per thousand.
Option 2 gives 21% improvement for $5,000 or 4.2% per thousand.
Option 2 (the $5,000 upgrade) is slightly better.
b) I would choose both options were I to want the fastest system.
However, having to choose 1, I would choose option 1 – the $8,000 upgrade.
c) ??? NOTE: This question is too vague, so I give full credit for any answer.
3. Same problem, but with 55% CPU and 45% disk.
Answers:
a) Option 1 improves the new disks. Here f = 0.45 and (1 – f) = 0.55
The speedup is given by 1 / S = 0.55 + (0.45 / 2.5) = 0.55 + 0.18 = 0.73, so S 1.37.
Option 2 improves the CPU. Here f = 0.55 and (1 – f) = 0.45
The speedup is given by 1 / S = 0.45 + 0.55 / 1.4 = 0.45 + 0.393 = 0.828, so S 1.19.
Option 1 gives 37% improvement for $8,000 or 4.6% per thousand.
Option 2 gives 19% improvement for $5,000 or 3.8% per thousand.
pf3

Partial preview of the text

Download Computer Organization: Homework Set 10 Answer Key - Amdahl's Law & Disk Access and more Assignments Computer Architecture and Organization in PDF only on Docsity!

CPSC2105 Introduction to Computer Organization Homework Set 10 Answer Key

  1. Question: Is a computer with a 1GHz CPU more than 3 times faster than one with a 300 MHz CPU? Answer: The book correctly says to consider Amdahl’s law. The speedup of the new component is 1000 / 300 = 10 / 3. Amdahl’s Law states that 1 / S = (1 – f) + f / k where S is the speedup, f is the fraction of work performed by the faster component (0.0  f  1.0), and k is the speedup of the new component. Here 1 / k = 3 / 10, so f / k = (3f) / 10. If f  1, then we have 1 / S  3 / 10 or S  10/3. This might be true for “compute bound” jobs. However, if about 50% of the work is CPU and 50% is I/O, then we have 1 / S = 1/2 + 1/2  (3 / 10) = 10 / 20 + 3 / 20 = 13 / 20, and S = 20 / 13  1.54.
  2. 60% CPU activity and 40% Disk activity. Option 1 calls for new disks. k = 2.5 for a cost of $8,000. Option 2 calls for a new CPU. k = 1.4 for a cost of $5,000. Answers: a) Option 1 improves the new disks. Here f = 0.4 and (1 – f) = 0. The speedup is given by 1 / S = 0.6 + (0.4 / 2.5) = 0.6 + 0.16 = 0.76, so S  1.32. Option 2 improves the CPU. Here f = 0.6 and (1 – f) = 0. The speedup is given by 1 / S = 0.4 + 0.6 / 1.4 = 0.4 + 0.428 = 0.828, so S  1.21. Option 1 gives 32% improvement for $8,000 or 4% per thousand. Option 2 gives 21% improvement for $5,000 or 4.2% per thousand. Option 2 (the $5,000 upgrade) is slightly better. b) I would choose both options were I to want the fastest system. However, having to choose 1, I would choose option 1 – the $8,000 upgrade. c) ??? NOTE: This question is too vague, so I give full credit for any answer.
  3. Same problem, but with 55% CPU and 45% disk. Answers: a) Option 1 improves the new disks. Here f = 0.45 and (1 – f) = 0. The speedup is given by 1 / S = 0.55 + (0.45 / 2.5) = 0.55 + 0.18 = 0.73, so S  1.37. Option 2 improves the CPU. Here f = 0.55 and (1 – f) = 0. The speedup is given by 1 / S = 0.45 + 0.55 / 1.4 = 0.45 + 0.393 = 0.828, so S  1.19. Option 1 gives 37% improvement for $8,000 or 4.6% per thousand. Option 2 gives 19% improvement for $5,000 or 3.8% per thousand.
  1. Why might one not consider a disk a random access device. Answer : In a true random access device, the time to access any given memory location is independent of the location. This is not true for a disk which has variable delays for both seeking a new track and rotation of the disk. The disk is not a sequential access device, such as a magnetic tape, that must at least pass over every intermediate data record to find the desired record. Nevertheless, the time to access a segment does depend on location. COMMENT: This is a great “sucker punch” question. What students will copy the answer in the book’s hint section, which should be viewed as an attempt at humor? The key to answering this question is to find the precise definition of the term “random access device” as used by the computer science community. It is not sufficient to work from the common definition of the word “random” as that will lead to answers that are either too vague or just plain wrong. For example, many commercial CD players have a “random mode”, which has nothing to do with random access as we define the term.
  2. Suppose a disk drive with the following characteristics. 5 surfaces 1024 tracks per surface (2^10 tracks per surface) 256 sectors per track (2^8 sectors per track) 512 bytes per sector (2^9 bytes per sector) 8 millisecond track–to–track seek time 7500 RPM rotational speed (125 revolutions per second) Answers: NOTE the error on page 290. It is 1000 ms / second. a) 512 sectors/track  256 bytes/sector = 2^9  28 = 2^17 bytes / track. 217 bytes / track  210 tracks / surface = 2^27 bytes / surface. 5 surfaces means 5  227 bytes capacity or 5  27  220 bytes capacity. To some people this is 5  27 MB or 5  128 MB = 640MB. To others, this is 640  1048576 = 671,088,640 bytes or 671.1 MB. b) The track to track seek time is 8 milliseconds. The disk rotates 125 times per second, or once every 1/125 = .008 seconds. This is one rotation every 8 milliseconds. Average latency is 4 milliseconds. The access time is 12 milliseconds. NOTE: See the next page for more on this problem.