Example Questions
Example Questions
Architecture(EET2211)
Computer Organization & Architecture(EET2211)
CALCULATE CPI AND MIPS RATE
16 LECTURE 4 6/1/2021
CALCULATE CPI AND MIPS RATE
17 LECTURE 4 6/1/2021
PROBLEMS
2.1 What will be the overall speed up if 90% of the program run 10
times faster ?
Here N =10 f =.9 1-f = 0.1
Hence f = 0.59
Here λ = 6 and L= 3
According to Little’s Law i.e. L = λ W
Therefore,W= L/ λ = 0.5 hrs = 30mins
The table shows the execution time in seconds, with 10,000,000 instructions
executed in each of the two programs. Calculate the MIPS values for each
computer for each program. Then calculate the arithmetic and harmonic
means assuming equal weights for the two programs, and rank the computers
based on arithmetic mean and harmonic mean.
Program 1 .2 .5 1
Mean calculation
Normalized w.r.t X
Benchmar Processor
k
X Y Z
1 1 .5 2
2 1 2 .5
AM 1 1.25 1.25
GM 1 1 1
Computer Organization & Architecture
(EET 2211)
Normalized w.r.t Y
Benchmark Processor
X Y Z
1 2 1 4
2 .5 1 .25
AM 1.25 1 2.125
GM 1 1 1
Hence
Speed up M4 > M2 > M1 > M3
Relative Speed M4 > M2 > M1 > M3
b. Discuss the impact on the system speed if the microprocessor bus has:
1. 32-bit local address bus and a 16-bit local data bus, or
2. 16-bit local address bus and a 16-bit local data bus.
c. How many bits are needed for the program counter and the instruction
register?
6/1/2021 Computer Organization and Architecture 3
Answer:
(a) The maximum directly addressable memory capacity in bytes is :
2^(32-8) = 2^24 = 16,777,216 bytes = 16 MB ,(8 bits = 1 byte for he
opcode).
(b)1. A 32-bit local address bus and a 16-bit local data bus. Instruction
and data transfers would take three bus cycles each, one for the
address and two for the data.
Since If the address bus is 32 bits, the whole address can be
transferred to memory at once and decoded there; however, since the
data bus is only 16 bits, it will require 2 bus cycles (accesses to
memory) to fetch the 32-bit instruction or operand.
6/1/2021 Computer Organization and Architecture 4
(b) 2. A 16-bit local address bus and a 16-bit local data bus. Instruction
and data transfers would take four bus cycles each, two for the address
and two for the data.
Therefore, that will have the processor to perform two
transmissions in order to send to memory the whole 32-bit address;
this will require more complex memory interface control to latch the
two halves of the address before it performs an access to it.
In addition to this two-step address issue, since the data bus is
also 16 bits, the microprocessor will need 2 bus cycles to fetch the 32-
bit instruction or operand.
(c) For the PC needs 24 bits (24-bit addresses), and for the IR needs 32
bits (32-bit addresses).
6/1/2021 Computer Organization and Architecture 5
• Q2. Consider a 32-bit microprocessor whose bus cycle is the same
duration as that of a 16-bit microprocessor. Assume that, on average,
20% of the operands and instructions are 32 bits long, 40% are 16 bits
long, and 40% are only 8 bits long. Calculate the improvement
achieved when fetching instructions and operands with the 32-bit
microprocessor.
a. Suppose all instructions and operands are two bytes long. By what
factor do the maximum data transfer rates differ?
b. Repeat assuming that half of the operands and instructions are one
byte long.
• a. What is the maximum memory address space that the processor can
access directly if it is connected to a “16-bit memory”?
• b. What is the maximum memory address space that the processor can
access directly if it is connected to an “8-bit memory”?
• What is the maximum data transfer rate across the bus that this
microprocessor can sustain, in bytes/sec?