CSCI 2321 (Computer Design), Spring 2018:
Homework 1

Credit:
40 points.

Reading

Be sure you have read, or at least skimmed, the assigned readings from Chapter 1.

Honor Code Statement

Please include with each part of the assignment the Honor Code pledge or just the word ``pledged'', plus one or more of the following about collaboration and help (as many as apply).1Text in italics is explanatory or something for you to fill in. For written assignments, it should go right after your name and the assignment number; for programming assignments, it should go in comments at the start of your program(s).

Problems

Answer the following questions. You may write out your answers by hand or using a word processor or other program, but please submit hard copy, either in class or in one of my mailboxes (outside my office or in the ASO).

Tips:

  1. (10 points) Below are two lists, one of terms from Chapter 1 and one of short definitions/descriptions. For each definition say which term matches it best.


    Terms:

    • desktop computer         • server
    • low-end server         • supercomputer
    • embedded computer         • multicore processor
    • RAM         • CPU
    • operating system         • compiler
    • bit         • instruction
    • assembly language         • machine language
    • assembler         • high-level language
    • system software         • application software

    Definitions/descriptions:

    1. Computer used to run large problems and usually accessed via a network.
    2. Computer composed of hundreds or even thousands of processor and terabytes of memory and having the highest performance and cost.
    3. Random access memory.
    4. Central processing unit.
    5. Microprocessor containing several processors in the same chip.
    6. Desktop-class computer without a screen or keyboard and usually accessed via a network.
    7. Computer used for running one predetermined application or collection of applications, often found as part of another piece of hardware.
    8. Personal computer delivering good performance to a single user at low cost.
    9. Program that translates statements in high-level language to assembly language.
    10. Program that translates symbolic instructions to binary instructions
    11. Binary language that a processor can understand.
    12. Command that a processor understands.
    13. Symbolic representation of machine instructions.
    14. Interface between user's program and hardware providing a variety of services and supervision functions.
    15. Software/programs developed by a user.
    16. Binary digit (value 0 or 1).
    17. Software layer between the application software and the hardware that includes the operating system and compilers.
    18. Portable language usually composed of words and algebraic expressions that must be translated into assembly language before being run on a computer.

  2. (10 points) Suppose two processors implement a given instruction set architecture, in which the instructions can be grouped into four classes A, B, C, and D. Processor P1 has a clock rate of 2.5GHz, and the CPI (cycles per instruction) for the four classes are 1, 2, 3, and 3 respectively. Processor P2 has a clock rate of 3GHz and a CPI of 2 for all classes. For a program that at runtime executes 10E9 ($ 10^9$) instructions, of which 10% are class A, 20% class B, 50% class C, and 20% class D, answer the following:

    1. How many seconds does this program take on P1? on P2?

    2. If ``global CPI'' is an average CPI over all four classes, calculate global CPI for this program on both P1 and P2. (Note here that this average is probably best computed as total cycles divided by total instructions, to allow for the different frequencies of the different classes of instructions.)

  3. (10 points) Review the scenario described in problem 1.9 in the textbook (a program being executed on a particular multiprocessor system) and answer the following questions:

    1. Assuming there is what you might call an original sequential program that just executes all the instructions mentioned in the description as well as a parallel program for which the number of instructions per processor is as described, calculate execution time for the sequential program and for the parallel program running on 1, 2, 4, and 8 processors, and compute speedups relative to the sequential program (i.e., sequential time divided by time on $ n$ processors).

      Suggestion: The calculations here are kind of tedious. If you like programming you might consider writing a short throw-away program to help you, in whatever language appeals to you. If you do, include a copy of your source code; that will be the equivalent of ``showing your work''. (Note that while normally I prefer to get source code by e-mail, since I don't plan to test anything you write for this problem it will be simpler just to turn in hardcopy.)

    2. What would happen if the clock rate were changed to 2.5GHz but arithmetic instructions now had a CPI of 2? (Recalculate all the times in the first part of the problem and also the speedups.)

    3. For up to 2 extra-credit points, plot the calculated speedups and a line showing what linear speedup would look like. (If you don't already have a favorite program for making plots, ask me about gnuplot.)

  4. (10 points) Do problems 1.12.1, 1.12.2, and 1.12.3 from the textbook. (Note that you will need information from the paragraph numbered 1.12.)



Footnotes

... apply).1
Credit where credit is due: I based the wording of this list on a posting to a SIGCSE mailing list. SIGCSE is the ACM's Special Interest Group on CS Education.


Berna Massingill
2018-01-20