Exam1 Study Guide for ECE212

¡Supera tus tareas y exámenes ahora con Quizwiz!

A 2MHz processor executes a program in 11s, how many clock cycles does the processor execute?

#clock cycles = CPU_time x frequency = 11s x 2x10^6 cycles/s = 22x10^6 cycles

If a processor executes a program in 4s, how many clock cycles does the processor execute for this program if it has a 2.5GHz clock?

#clock cycles = CPU_time x frequency = 4s x 2.5x10^9cycles/s = 10x10^9 cycles

A program executes in 8s on a machine that has a clock period( clock cycle time) of 12ns. How many clock cycles are required to execute the program?

#clock cycles = CPU_time x frequency = CPU_time / T #clock cycles = CPU_time / T = 8 / (12x10^-9 s/cycle) = 666.7 x 10^6 cycles

What is the best metric for performance?

The time required to execute the program!

A processor has a 20us clock cycle time. What is the clock's frequency?

f = 1/T = 1/(20x10^-6)s/cycle = 50 x 10^3 cycles /sec = 50kHz

A program requires 5.25x10^9 clock cycles to execute a program in 3s. What is the frequency of the processor?

frequency= #cycles / CPU_time = 5.25x10^9 cycles/ 3s = = 1.75 x 10^9 cycles/s = 1.75Ghz

The instruction set architecture forms the _______________________interface.

hardware software

Textual languages that at or near the hardware level are called_____________________.

low level languages

Code executable by the processor is called______________________.

machine code

Code converted to the native language of the processor but not executable is called______________________________.

object code

Control signals and the memory technology used would fall under________________.

organization

The operational units and interconnections are referred to as the ________________.

organization

Define response (execution) time

response(execution) time - is the time between the start and the finish of a task

Code written by the programmer is called____________________________.

source code

Computer A executes a program in 16ms and computer B executes the same program in 12ms. Which computer is faster and by how much?

speedup = t_cpuA/t_cpuB = 16ms/12ms = 1.33 Computer B is 1.33 times faster than computer A. Computer B is 33% faster than A.

Assume a program takes 10.7 billion instructions to execute on a processor and the processor has an average CPI of 1.5 for that program. What would the clock rate of the processor need to be to allow the program to execute in two seconds?

t CPU = IC × CPI × T 2 secs = (10.7 x10^9) * 1.5 * T T = 124.611ps f = 1 / T = 1 / 124.611ps = 8GHz

Define throughput

throughput is the total amount of work done in a given time.

Explain why MIPS (million instructions per second) is not a good performance measure. Give as many reasons as you can! (don't stop at one)

1. Does not take into account how much work an instruction performs. 2. MIPS rate can vary between 2 programs on the same computer. 3. MIPS rate can vary inversely with performance!

What's the best way to measure performance of a machine ? Clock rate, CPI, MIPS, FLOPS(floating point operations per second), memory latency, or average execution time? Why ?

Average Execution Time , since that's all we care about in the end ( performance is based solely on execution time).

Describe why using the clock rate of a processor is a bad way to measure performance. Provide concrete example using the performance equation to back up your assertion.

CPI must also be provided when clock rate is used as a performance metric. CPI "links" clock rate to instruction executed. Machine A is 200MHz, CPI of 1 Machine B is 400MHz, CPI of 4 For a given program, MachineA runtime = 1*instruction count / 200 x 10^6 = IC x 5ns/instr MachineB runtime = 4*instruction count / 400 x 10^6 = IC x 10ns/instr Machine B will clearly be slower for any program, in spite of its higher clock rate.

Give the CPU time equation and define the terms you use.

CPU Time = IC * CPI * CCT IC = instruction count CPI = clock cycles per instruction CCT = clock cycle time (1/CR where CR= clock rate) The period of the clock.

Give the CPU time equation and define the terms you use.

CPU_time = IC x CPI x CCT IC = instruction count CPI = clock cycles per Instruction CCT = clock cycle time. The period of the clock . T = 1/f

Of these two pieces (assemble & compiler) of software, which is more computationally complex and why?

Compiler, because translation from high-level language to machine language is not one-to-one.

Be able to list 4 of the eight great ideas of computer science

Design for Moore's Law Use Abstraction to simplify design Make the common case fast Performance via parallelism Performance via pipelining Performance via prediction Hierarchy of memories Dependability via redundancy

Explain why MIPS (million instructions per second) is not a good performance measure. Give as many reasons as you can!

Does not take into account how much work an instruction does. Can vary between 2 programs on the same computer. Can vary inversely with performance!

**************************************Second Part************************* When we run Machines A and B on the programs blah and foo we get the following execution times (in seconds): blah | foo Machine A 50 5 Machine B 25 10 The same compiler is used in all cases. Explain how it is possible that A can be faster on one program and B can be faster on the other program. Be as precise as possible!

Execution Time = IC(instruction count) * CPI * Clock cycle The only thing that can vary is CPI. Since, CPI is an average over the instructions in a program, it can be different for different programs. Specifically, the structure mix can different, so that program "blah" might include lots of instructions that are slower on A than on B, and foo might include lots of instructions that are slower B than on A.

***************************first part****************************************** We have two implementations of the same instruction set. Machine A has a clock cycle time of 2ns and Machine B has a 200MHz clock. We have a program named prog1 that has an instruction count of 22,313 on Machine A. On machine A the program prog1 averages 4.5 cycles per instruction and on machine B averages 3 cycles per instruction. Which machine is faster and by how much?

Execution Time on A is: IC * 4.5 cycles/instruction * 2ns/cycle = IC * 9 ns/instruction Execution Time on B is: IC * 3 cycles/instruction * 5ns/cycle = IC * 15 ns/instruction Perf A/Perf B = (1/CPU Time A) / (1/CPU Time B) = (CPU Time B / CPU Time A) = 15/9 = 5/3 = 1.67 Machine A is 1.67 times faster than Machine B or A is 67% faster than B

Languages that are near the domain of the problem being solved are called_______________.

High Level languages

All computers have 5 parts. List them

Input Output Memory Control Datapath

Consider a processor with a CPI value of 10 cycles/instruction and. a clock frequency of 200MHz. What is the MIPS rating for this processor?

MIPS = 200x10^6(cycles/sec) / (10(cycles/instr))(10^6) = 20 MIPS

Consider a program that executes 100 million instructions in 5 seconds. What is the MIPS rating for this program? If 15% of these instructions are floating-point operations, what is the MFLOPS rating for this program?

MIPS = instruction count / (execution time * (10^6)) (100x10^6) / ((5)*(10^6)) = 20 MIPS MIPS = (0.15flops/instr) x (100x10^6) / (5s)(10^6) = 3 MFLOPS

Why is MIPS by itself not a good basis for determining the performance of a given machine?

MIPS is millions of instructions per second executed by the processor. 3 MIPS is 3 million instructions per second. MIPS depends on the instruction mix used in testing -- a program with many CPI=1 instructions will have a higher MIPS - so it may be compiler dependent. MIPS also depends on the architecture. An architecture with simpler instructions which are fast but do not do as much as instructions on a machine with more complex instructions may have a higher MIPS for a program that runs in the same or slower speed.

Which language is the binary code for the processor and runs directly on its hardware?

Machine

What is Design Principle 3?

Make the common case fast.

What is Moore's Law, and why is it important? What is the likelihood that it will hold in the future? Explain

Moore's Law says that the number of transistors per chip has approximately doubled every 1.5 years since the early 1970s. It seems unlikely that it will hold forever, but its "death" has been incorrectly predicted many times because scientists and Engineers keep developing new technology innovations that keep it alive.

You wish to redesign a 700MHz processor that executes a program in 19s. You wish to get the same program's execution time down to 12s on the new processor. Software profilers indicate the average number of clock cycles will increase by 15% if the clock frequency is increased. What is the target frequency for the new processor design?

Old processor requires: #clock cycles = CPU_time x frequency = 19s x 700x10^6 = 13.3x10^9 cycles New design will require: 1.15 x 13.3x10^9 = 15.20x10^9 cycles (15% increase) the new processors' target frequency is: frequency = #cycles/ CPU_time = (15.20x10^9) / 12s = 1.27x10^9cycle/s = 1.27GHz How much faster is the new design vs old design: speedup = CPU_time old/ CPU_time new = 19s/12s = 1.58 58% faster than the old processor. Compare the speedup to the increase in frequency. Explain. 1.27GHz/700MHz = 1.82 New processor frequency is 82% higher than old design frequency. The processor frequency is improved by 82% but the overall speedup is only 58%. This is because the increase in clock cycles offsets some of the improvement gained by increasing clock frequency.

performance as it is defined in the book

Performance = 1 / t_execute (execution time)

Calculate the performance of a computer that executes a program in 100ms

Performance = 1/execution time = 1/100ms = 10

Calculate the performance of a computer that executes a program in 22ms.

Performance = 1/execution time = 1/22ms = 45.46

A processor executes a program with 20x10^6 instructions. Calculate the average CPI for this program given the number of each instruction type in the table and the number of clock cycles for each instruction type. Type | freq | cycles ---------------------- alu. | 12x10^6 | 1 ld/st | 2x10^6 | 2 brch | 4x10^6 | 3 mul | 2x10^6 | 4

Rel_Freq_alu = (12x10^6) / (20x10^6) = 0.6 Rel_Freq_ld/st = (2x10^6) / (20x10^6) = 0.1 Rel_Freq_brch = (4x10^6) / (20x10^6) = 0.2 Rel_Freq_mul = (2x10^6) / (20x10^6) = 0.1 CPI_avg = (0.6 *1) + (0.1 * 2) + (0.2 * 3) + (0.1 * 4) =1.8

What are SPEC CPU benchmarks about?

SPEC(Standard Performance Evaluation Corporation) is a non-profit organization that aims to "produce, establish, maintain and endorse a standardized set" of performance benchmarks for computers. The benchmarks aim to test "real-life" situations.

What is Design Principle 1?

Simplicity favors regularity.

What Design Principle 2?

Smaller is faster

Computer A executes a program in 40ms and computer B executes the same program in 64ms. How much faster is computer A than computer B?

Speedup = performanceA / performanceB = CPUtimeB / CPUtimeA = 64/40 = 1.6 Computer A is 1.6 times faster than computer B. Computer A is 60% faster than B.

For a processor with 100MHz clock frequency(a.k.a clock rate), what is the period (clock cycle time)?

T = 1/f = 1/(100x10^6)cycles/sec = (1 / 10^8) cycles/sec = 10nsec "per cycle"

Be able to use Amdahl's Law - Improving part of a systems only gives a partial improvement in overall performance

T_improved = T_affected / improvement factor + T_unaffected

What is the ISA (Instruction Set Architecture) as defined in class?

The ISA includes the instruction set and all parts of the processor that are visible to the programmer at the assembler level. The hardware software interface.

For CMOS parts as frequency increases the dynamic power also increases. What has kept the power from going very high as frequencies have soared in recent years?

Two things: ( 1 ) voltages for the parts have decreased -- which kept power in check (however we have reached the limit on reducing the voltage) (2) Manufacturers have gone to placing multiple cores on the chip -- to increases performance and also to hopefully achieve a smaller cumulative power dissipation than would occur with a single more complex processor.

Instruction set, number of bits used and techniques for addressing memory fall under___________________.

architecture

The parts of a computer visible to the programmer is called the________.

architecture

A/an_________________________converts low level languages to machine code.

assembler

For the following instruction set workload and cycle values, find the average CPI. Type | freq | cycles ---------------------- alu. | 0.5 | 2 brch | 0.2 | 6 ld/st | 0.3 | 6

average CPI = SUM(CPI * Real Freq) =(0.5*2)+(0.2*6)+(0.3*6) = 4.0

A/an___________________________converts high level languages to machine code.

compiler


Conjuntos de estudio relacionados

AP European History Unit 3 Study Guide

View Set

FINaL TUEsday Community BAsed Corrections

View Set

Chapter 10 Multiple Choice review A&P

View Set

Computer Fundamentals Module 8 - Networking - Quiz

View Set

Chapter 26: The Child with a Cardiovascular Disorder

View Set