0% found this document useful (0 votes)
14 views7 pages

# Tutorial 1

Uploaded by

aojiru.co
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views7 pages

# Tutorial 1

Uploaded by

aojiru.co
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Tutorial 1: (Note: You need to refer to recommended textbook chapter 1 & 2)

1. What, in general terms, is the distinction between computer organization and computer
architecture?

- Computer architecture refers to those attributes of a system visible to a programmer or, put
another way, those attributes that have a direct impact on the logical execution of a
program.
- Computer organization refers to the operational units and their interconnections that
realize the architectural specifications.

2. What, in general terms, is the distinction between computer structure and computer function?

- Structure: The way in which the components are interrelated


- Function: The operation of each individual component as part of the structure

3. What are the four main functions of a computer?

• Data processing • Data movement


• Data storage • Control

4. List and briefly define the main structural components of a computer.

- Central processing unit (CPU): Controls the operation of the computer and performs its data
processing functions; often simply referred to as processor.
- Main memory: Stores data.
- I/O: Moves data between the computer and its external environment.
- System interconnection: Some mechanism that provides for communication among CPU,
main memory, and I/O.

5. List and briefly define the main structural components of a processor.

- Control unit: Controls the operation of the CPU and hence the computer
- Arithmetic and logic unit (ALU): Performs the computer’s data processing functions
- Registers: Provides storage internal to the CPU
- CPU interconnection: Some mechanism that provides for communication among the control
unit, ALU, and registers

6. What is a stored program computer?

A stored program computer has the program stored alongside memory, so the computer can
read it from memory, allowing it being altered or set.

7. What are the four main components of any general-purpose computer?

- Memory
- Arithmetic-Logic Unit
- Program Control Unit
- I/O Equipment
8. At the integrated circuit level, what are the three principal constituents of a computer system?

- Transistors
- Resistors
- Capacitors

9. Explain Moore’s law.

The number of transistors that could be put on a single chip would double each year (in fact it
was revised, once it started to double each 18 months).

10. List and explain the key characteristics of a computer family.

A computer family share the same architecture, allowing older programs versions to be run in
newer hardware machines. Along versions, you can see a faster processor speed, a larger
memory capacity and increase of the number of capacitors in a processor chip.

11. What is the key distinguishing feature of a microprocessor?

A microprocessor contains all the CPU elements on a single chip.

12. A benchmark program is run on a 40 MHz processor. The executed program consists of
100,000 instruction executions, with the following instruction mix and clock cycle count:
Instruction Type Instruction Count Cycles per Instruction
Integer arithmetic 45,000 1
Data transfer 32,000 2
Floating point 15,000 2
Control transfer 8000 2

CPI A =
∑ CPI i×I i
Ic
f
MIPS A =
CPI A ×106
Calculate the followings:
CPI, MIPS rate and execution time.
13. Consider two different machines, with two different instruction sets, both of which have a
clock rate of 200 MHz. The following measurements are recorded on the two machines
running a given set of benchmark programs:
Instruction Type Instruction Count Cycles per Instruction
(Million)
Machine A
Arithmetic and logic 8 1
Load and store 4 3
Branch 2 4
Others 4 3
Machine B
Arithmetic and logic 10 1
Load and store 8 2
Branch 2 4
Others 4 3
a. Determine the effective CPI, MIPS rate, and execution time for each machine.

b. Comment on the results.

Even though, machine B has a higher MIPS than machine A, it needs a longer CPU time to execute
the similar set of benchmark programs (instructions).

14. Four benchmark programs are executed on three computers with the following results:
Computer A Computer B Computer C
Program 1 1 10 20
Program 2 1000 100 20
Program 3 500 1000 50
Program 4 100 800 100
The table shows the execution time in seconds, with 100,000,000 instructions executed in each of
the four programs. Calculate the MIPS values for each computer for each program. Then calculate
the arithmetic and harmonic means assuming equal weights for the four programs, and rank the
computers based on arithmetic mean and harmonic mean.

15. The following table, based on data reported in the literature, shows the execution times, in
seconds, for five different benchmark programs on three machines.
Processor
Benchmark
R M Z
E 417 244 134
F 83 70 70
H 66 153 135
I 39,449 35,527 66,000
K 772 368 369
a. Compute the speed metric for each processor for each benchmark, normalized to machine R.
That is, the ratio values for R are all 1.0. Other ratios are calculated using Equation (2.5) with R
treated as the reference system. Then compute the arithmetic mean value for each system
using Equation (2.3).
 Equation 2.5, ri = Trefi/Tsuti
m
1
 Equation 2.3, R A = ∑R
m i=1 i
b. Repeat part (a) using M as the reference machine.
c. Which machine is the slowest based on each of the preceding two calculations?
d. Repeat the calculations of parts (a) and (b) using the geometric mean, defined in Equation (2.6).
Which machine is the slowest based on the two calculations?

(∏ )
n 1
m
 Equation 2.6, r G = ri
i=1
16. Consider the execution of a program that results in the execution of 2 million instructions on a
400-MHz processor. The program consists of four major types of instructions. The instruction
mix and the CPI for each instruction type are given below based on the result of a program
trace experiment:
Instruction Type CPI Instruction Mix
Arithmetic and logic 1 60%
Load/store with cache hit 2 18%
Branch 4 12%
Memory reference with cache miss 8 10%

CPI = (1x0.6) +(2 x0.18) +(4x0.12) +(8x0.1) =2.24.


MIPS = (400 x106)/(2.24x106) ≈178.
The calculation of average CPI and MIPS rate, which yielded the result of CPI =2.24 and MIPS rate
=178. Now assume that the program can be executed in eight parallel tasks or threads with
roughly equal number of instructions executed in each task. Execution is on an 8-core system
with each core (processor) having the same performance as the single processor originally used.
Coordination and synchronization between the parts adds an extra 25,000 instruction executions
to each task. Assume the same instruction mix as in the example for each task, but increase the
CPI for memory reference with cache miss to 12 cycles due to contention for memory.
a. Determine the average CPI.
b. Determine the corresponding MIPS rate.
c. Calculate the speedup factor.
d. Compare the actual speedup factor with the theoretical speedup factor determined by Amdhal’s
Law.
17. A processor accesses main memory with an average access time of T 2. A smaller cache memory
is interposed between the processor and main memory. The cache has a significantly faster
access time of T1 < T2. The cache holds, at any time, copies of some main memory words and is
designed so that the words more likely to be accessed in the near future are in the cache.
Assume that the probability that the next word accessed by the processor is in the cache is H,
known as the hit ratio.
a. For any single memory access, what is the theoretical speedup of accessing the word in the
cache rather than in main memory?
b. Let T be the average access time. Express T as a function of T1, T2, and H. What is the overall
speedup as a function of H?
c. In practice, a system may be designed so that the processor must first access the cache to
determine if the word is in the cache and, if it is not, then access main memory, so that on a miss
(opposite of a hit), memory access time is T1+ T2. Express T as a function of T1, T2, and H. Now
calculate the speedup and compare to the result produced in part (b).

You might also like