0% found this document useful (0 votes)
224 views4 pages

Computer Architecture Homework:01

This document discusses different types of computers including servers, PCs, supercomputers, and embedded computers. It also describes how compilers transform high-level programs into machine-readable code and how processors with different clock rates and CPI values will have varying performance for executing the same number of instructions. Metrics like execution time, clock cycles, and global CPI are calculated and compared for two processors running the same program.
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)
224 views4 pages

Computer Architecture Homework:01

This document discusses different types of computers including servers, PCs, supercomputers, and embedded computers. It also describes how compilers transform high-level programs into machine-readable code and how processors with different clock rates and CPI values will have varying performance for executing the same number of instructions. Metrics like execution time, clock cycles, and global CPI are calculated and compared for two processors running the same program.
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/ 4

Computer Architecture

Homework:01
Group: Vo Hoang Chuong

1) Aside from the smart cell phones used by a billion people, list and describe
four other types of computers:
- Servers: A computer used for running larger programs for multiple users, often
simultaneously, and typically accessed only via a network.
- Personal Computer (PC): A computer designed for use by an individual, usually
incorporating a graphics display, a keyboard, and a mouse.
- Super Computers: A class of computers with the highest performance and cost;
they are configured as servers and typically cost tens to hundreds of millions of
dollars.
- Embedded Computers: A computer inside another device used for running one
predetermined application or collection of software.
2) Describe the steps that transform a program written in a high-level language
such as C into a representation that is directly executed by a computer
processor
Compilers transform high - level language
programs (in C for example) into assembly
language program (for MIPS) and the assembler
transform assembly language into binary machine
language (for MIPS).
Example:

3)
a) The minimum size in bytes of the frame
buffer to store a frame:
3 colors where each color uses 8 bits/pixel: 3 x 8 =
24 bits/pixel = 3 bytes/pixel
Frame Size = 1024 x 1280 pixels = 1310720 pixels
Minimum size in bytes of the frame buffer to store a
frame = 1310720 x 3 = 3932160 bytes
3932160 x 8
b) It takes: = 0.315 s for the
100∗106
frame to be sent over a 100Mbit/s network
4)
a) CPUTime1 = Instruction Count x CPI1 x CycleTime1
1
= Instruction Count x CPI1 x
ClockRate1
1
= I x 1.5 x
3x10^9

= I x 0.5 x 10 ^ -9 s

CPUTime2 = Instruction Count x CPI2 x CycleTime2


1
= Instruction Count x CPI2 x
ClockRate2
1
= I x 1.0 x
2.5x10^9

= I x 0.4 x 10 ^ -9 s

CPUTime3 = Instruction Count x CPI3 x CycleTime3


1
= Instruction Count x CPI3 x
ClockRate3
1
= I x 2.2 x
4x10^9

= I x 0.55 x 10 ^ -9 s

Processor P2 has the highest performance

b)
 P1:
ClockCycles1 = CPUTime x ClockRate1
= 10s x 3 x 109 Hz
= 3 x 1010 cycles
CPUtime1 10𝑠
Number of Instructions = = −9 = 2 x 1010
CPI1 x CycleTime1 0.5 𝑥 10
 P2:
ClockCycles2 = CPUTime x ClockRate2
= 10s x 2.5 x 109 Hz
= 2.5 x 1010 cycles
CPUtime2 10𝑠
Number of Instructions = = −9 = 2.5 x 1010
CPI2 x CycleTime2 0.4 𝑥 10
 P3:
ClockCycles3 = CPUTime x ClockRate3
= 10s x 4 x 109 Hz
= 4 x 1010 cycles
CPUtime1 10𝑠
Number of Instructions = = −9 = 1.82 x 1010
CPI1 x CycleTime1 0.55 𝑥 10

c) Execution time is reduced by 30% => t = 7 s

CPI is increased by 20%

P1: CPI = 1.5 x 1.2 = 1.8


NumberofInstruction x CPI 2 𝑥 1010 𝑥 1.8
ClockRate1 = = = 5.14 GHz
CPUtime 7𝑠
P2: CPI = 1 x 1.2 = 1.2
NumberofInstruction x CPI 2.5 𝑥 1010 𝑥 1.2
ClockRate2 = = = 4.29 GHz
CPUtime 7𝑠
P1: CPI = 2.2 x 1.2 = 2.64
NumberofInstruction x CPI 1.82 𝑥 1010 𝑥 2.64
ClockRate3 = = = 6.86
CPUtime 7𝑠
GHz
5)
A B C D
10% 20% 50% 20%
IC 1 2 5 2
P1 1 2 3 3
P2 2 2 2 2

a)
Class A = 10% x 10^6 = 10^5 instructions
Class B = 20% x 10^6 = 2x10^5 instructions
Class C = 50% x 10^6 = 5x10^5 instructions
Class D = 30% x 10^6 = 2x10^5 instructions

CPUTime = (Instruction Count x CPI) / Clock Rate


P1 total time= ((1x10^5x1) + (2x10^5x2) + (5x10^5x3) + (2x10^5x3))/
(2.5 x10^9) = 10.41x 10-4s
P2 total time= ((1x10^5x2) + (2x10^5x2) + (5x10^5x2) + (2x10^5x2))/
(3.0 x10^9) = 6.66 x10-4s
Global CPI = ∑ ((CPI x Instruction Count)/ Instruction Count)
Global CPI for P1 =10.41 x 10^-4 x 2.5 x 10^9 /10^6 = 2.6
Global CPI for P2 =6.66 x 10^-4 x 3 x 10^9 /10^6 = 2
b)
ClockCycle1 = CPUTime x ClockRate1
= 10.41 x 10^-4 x 2.5 x 10^9
= 2602500 cycles
ClockCycle2 = CPUTime x ClockRate2
= 6.66 x 10^-4 x 3 x 10^9
= 1998000 cycles

You might also like