Computer Organization Lab 1 Soufiane berouel. Formulas to Remember CPU Time = CPU Clock Cycles x Clock Cycle Time CPU Clock Cycles = Instruction Count.

Slides:



Advertisements
Similar presentations
CMSC 611: Advanced Computer Architecture Performance Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
Advertisements

CDA 3101 Fall 2010 Discussion Section 08 CPU Performance
Performance of Cache Memory
Performance What differences do we see in performance? Almost all computers operate correctly (within reason) Most computers implement useful operations.
CS2100 Computer Organisation Performance (AY2014/2015) Semester 2.
Understanding Performance Metrics of Processors Bina Ramamurthy Chapter 1.
Performance Evaluation of Architectures Vittorio Zaccaria.
1  1998 Morgan Kaufmann Publishers Chapter 2 Performance Text in blue is by N. Guydosh Updated 1/25/04*
Evaluating Performance
100 Performance ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006.
Computer Organization and Architecture 18 th March, 2008.
Example (1) Two computer systems have been tested using three benchmarks. Using the normalized ratio formula and the following tables below, find which.
CSCE 212 Chapter 4: Assessing and Understanding Performance Instructor: Jason D. Bakos.
CSCE 212 Quiz 4 – 2/16/11 *Assume computes take 1 clock cycle, loads and stores take 10 cycles and branches take 4 cycles and that they are running on.
Performance D. A. Patterson and J. L. Hennessey, Computer Organization & Design: The Hardware Software Interface, Morgan Kauffman, second edition 1998.
9/16/2004Comp 120 Fall September 16 Assignment 4 due date pushed back to 23 rd, better start anywayAssignment 4 due date pushed back to 23 rd, better.
Assessing and Understanding Performance B. Ramamurthy Chapter 4.
1 Lecture 11: Digital Design Today’s topics:  Evaluating a system  Intro to boolean functions.
Computer Architecture Lecture 2 Instruction Set Principles.
Lecture 3: Computer Performance
1 Measuring Performance Chris Clack B261 Systems Architecture.
CMSC 611: Advanced Computer Architecture Performance Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted.
CPU Performance Assessment As-Bahiya Abu-Samra *Moore’s Law *Clock Speed *Instruction Execution Rate - MIPS - MFLOPS *SPEC Speed Metric *Amdahl’s.
Chapter 1 Section 1.4 Dr. Iyad F. Jafar Evaluating Performance.
Copyright 1995 by Coherence LTD., all rights reserved (Revised: Oct 97 by Rafi Lohev, Oct 99 by Yair Wiseman, Sep 04 Oren Kapah) IBM י ב מ 7-1 Measuring.
CWRU EECS 3221 Benchmarks EECS 322 Computer Architecture Instructor: Francis G. Wolff Case Western Reserve University This presentation.
Operation Frequency No. of Clock cycles ALU ops % 1 Loads 25% 2
CDA 3101 Fall 2013 Introduction to Computer Organization Computer Performance 28 August 2013.
Compiled by Maria Ramila Jimenez
CDA 3101 Discussion Section 09 CPU Performance. Question 1 Suppose you wish to run a program P with 7.5 * 10 9 instructions on a 5GHz machine with a CPI.
Computer Organization and Architecture Tutorial 1 Kenneth Lee.
Lecture 8: 9/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
CEN 316 Computer Organization and Design Assessing and Understanding Performance Mansour AL Zuair.
Computer Architecture CPSC 350
Morgan Kaufmann Publishers
CPU Performance using Different Parameters CS 250: Andrei D. Coronel, MS,CEH,PhD Cand.
Performance Enhancement. Performance Enhancement Calculations: Amdahl's Law The performance enhancement possible due to a given design improvement is.
Performance Performance
TEST 1 – Tuesday March 3 Lectures 1 - 8, Ch 1,2 HW Due Feb 24 –1.4.1 p.60 –1.4.4 p.60 –1.4.6 p.60 –1.5.2 p –1.5.4 p.61 –1.5.5 p.61.
Performance – Last Lecture Bottom line performance measure is time Performance A = 1/Execution Time A Comparing Performance N = Performance A / Performance.
EGRE 426 Computer Organization and Design Chapter 4.
Computer Engineering Rabie A. Ramadan Lecture 2. Table of Contents 2 Architecture Development and Styles Performance Measures Amdahl’s Law.
CMSC 611: Advanced Computer Architecture Performance & Benchmarks Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some.
Performance Computer Organization II 1 Computer Science Dept Va Tech January 2009 © McQuain & Ribbens Defining Performance Which airplane has.
Computer Architecture CSE 3322 Web Site crystal.uta.edu/~jpatters/cse3322 Send to Pramod Kumar, with the names and s.
Intro to Computer Org. Assessing Performance. What Is Performance? What do we mean when we talk about the “performance” of a CPU?
CSE 340 Computer Architecture Summer 2016 Understanding Performance.
Lecture 3. Performance Prof. Taeweon Suh Computer Science & Engineering Korea University COSE222, COMP212, CYDF210 Computer Architecture.
Performance 9 ways to fool the public #1 – Reporting Results.
Additional Examples CSE420/598, Fall 2008.
Performance. Moore's Law Moore's Law Related Curves.
Measuring Performance II and Logic Design
Compilers can have a profound impact on the performance of an application on given a processor. This problem will explore the impact compilers have on.
CSCI206 - Computer Organization & Programming
How do we evaluate computer architectures?
Defining Performance Which airplane has the best performance?
CSCE 212 Chapter 4: Assessing and Understanding Performance
Computer Architecture CSCE 350
Chapter 1 Fundamentals of Computer Design
CS2100 Computer Organisation
CSCI206 - Computer Organization & Programming
CMSC 611: Advanced Computer Architecture
September 24 Test 1 review More programming
Solutions Chapter 1.
Lecture 3: MIPS Instruction Set
Performance Cycle time of a computer CPU speed speed = 1 / cycle time
CMSC 611: Advanced Computer Architecture
Parameters that affect it How to improve it and by how much
Computer Organization and Design Chapter 4
CS2100 Computer Organisation
Presentation transcript:

Computer Organization Lab 1 Soufiane berouel

Formulas to Remember CPU Time = CPU Clock Cycles x Clock Cycle Time CPU Clock Cycles = Instruction Count x Cycles per Instruction Clock Cycle Time = 1 / Clock Cycle Rate Amdahl’s Law – Overall Speedup = 1 / [(1 – ∑ FE i ) + ∑ (FE i / SE i )] – FE is the proportion affected, SE is the speed up for the specific proportion

Exercise 1 For a color display using 8 bits for each primary color (R, G, B) per pixel and with a resolution of 1280 x 800 pixels, what should be the size (in bytes) of the frame buffer to store a frame?

Exercise 1 (sol) Each frame requires 1280 x 800 x 3 = ~ 3 Mbytes

Exercise 2 Consider 3 processors P1, P2 and P3 with clock rates and CPI given below, are running the same program: clock rate CPI P1 2 GHz 1.5 P2 1.5 GHz 1.0 P3 3 GHz 2.5 Which processor will have the best performance?

Exercise 2 (sol) Suppose the program has N instructions. Time taken to execute on P1 is = 1.5 N / (2 x 10 9 ) = 0.75 N x Time taken to execute on P2 is = N/ (1.5 x 10 9 ) = 0.66 N x Time taken to execute on P3 is = 2.5 N/ (3 x 10 9 ) = 0.83 N x P2 has the best performance (since it takes the least time to execute).

Exercise 3 Consider 3 processors P1, P2 and P3 with same instruction set with clock rates and CPI given below: clock rate CPI P1 2 GHz 1.5 P2 1.5 GHz 1.0 P3 3 GHz 2.5 If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions.

Exercise 3 (sol) For P1 – 10 (execution time) = 1.5 (CPI) x N 1 / (2 x 10 9 ) – So N 1 (number of instructions) = 1.33 x – Number of Cycles = 1.5 x N 1 = 2 x …Do the same for P2 and P3

Exercise 4 Given below are the number of instructions of a program: arithmetic store load branch Assuming the instructions take 1, 5, 5 and 2 cycles, what is the execution time in a 2 GHz processor?

Exercise 4 (sol) Execution time = cycle time x CPI x no. of inst – Cycle time = 1/(2 x 10 9 ) – CPI = (500 x x x x 2) / ( ) – Thus, Execution Time = 1350 / 700 x 700 / (2 x ) So the Execution time = 675 x sec

Exercise 5 Compilers have a profound impact on the performance of an application on a given processor. This problem will explore the impact compilers have on execution time: compiler A compiler B no instructions exec. Time no. instructions exec. Time a) 1.0 x s 1.2 x s b) 1.4 x s 1.2 x s Find the average CPI for programs a and b, on different compilers, given that the processor has a cycle time of 1 ns.

Exercise 5 (sol) Execution Time = CPI x cycle time x no. of inst -cycle time = 1ns = s For program a on Compiler A -CPI = 1 / (10 -9 x 10 9 ) = 1 For program a on Compiler B – CPI = 1.4 / (10 -9 x 1.2 x 10 9 ) = Do the same for program b…

Exercise 6 - a Three enhancements with the following speedups are proposed for a new architecture: Speedup 1 = 30 Speedup 2 = 20 Speedup 3 = 10 Only one enhancement is usable at a time. a. If enhancements 1 and 2 are each usable for 30% of the time, what fraction of the time must enhancement 3 be used to achieve an overall speedup of 10?

Exercise 6 - a (sol) By applying Amdahl’s Law to three enhancements we find Overall Speedup = 1 / [(1 – ∑ FE i ) + ∑ (FE i / SE i )] = 1 / [1 – (FE 1 + FE 2 + FE 3 ) + ((FE 1 /SE 1 ) + (FE 2 /SE 2 ) + (FE 3 /SE 3 ))] By replacing every known variable by its value in the equation, we get: 10 = 1 / [1 – ( FE 3 ) + ((0.3/30) + (0.3/20) + (FE 3 /10))] Solving for FE3 we get 1 = 10 x ( / /20 - FE 3 + FE 3 /10) = 4.25 – 9FE 3 Which means FE 3 = 3.25 / 9 = … Thus, Enhancement 3 must be used around 36% of the time.

Exercise 6 - b b. Assume for some benchmark, the fraction of use is 15% for each of enhancements 1 and 2 and 70% for enhancement 3. We want to maximize performance. If only one enhancement can be implemented, which should it be? If two enhancements can be implemented, which should be chosen?

Exercise 6 – b (sol) When we can choose between enhancements, we pick the one or combination that offers the highest speedup. Following that logic, and if we can pick only one enhancement, Speedup E1 = 1 / [(1 – FE 1 ) + (FE 1 /SE 1 )] = 1 / [(1 – 0.15) + (0.15/30))] = Speedup E2 = 1 / [(1 – FE 2 ) + (FE 2 /SE 2 )] = 1 / [(1 – 0.15) + (0.15/20))] = Speedup E3 = 1 / [(1 – FE 3 ) + (FE 3 /SE 3 )] = 1 / [(1 – 0.70) + (0.70/10))] = Since the Speedup provided by enhancement 3 is the highest, we choose it.

Exercise 6 – b (sol) But if two enhancements can be implemented, we will need to find the best combination which means finding the speedup for all combinations and comparing them Speedup E1 and E2 = 1 / [(1 – FE 1 – FE 2 ) + (FE 1 /SE 1 + FE 2 /SE 2 )] = 1 / [(1 – 0.15 – 0.15) + (0.15/ /20))] = Speedup E1 and E3 = 1 / [(1 – FE 1 – FE 3 ) + (FE 1 /SE 1 + FE 3 /SE 3 )] = 1 / [(1 – 0.15 – 0.70) + (0.15/ /10))] = Speedup E2 and E3 = 1 / [(1 – FE 2 – FE 3 ) + (FE 2 /SE 2 + FE 3 /SE 3 )] = 1 / [(1 – 0.15 – 0.70) + (0.15/ /10))] = Since the Speedup provided by the combination of enhancements 1 and 3 is the highest, we choose them.