Introduction Computer Organization Spring 1436/37H (2015/16G) Dr. Mohammed Sinky Computer Architecture
General Information Instructor: Mohammed Sinky Office: 1102 in Building H ( مبنى ح ) Lab TA: Mohsin Khan Office Hours: Monday 10am-11:50am TEXTBOOK: Computer Organization and Design the Hardware/Software Interface, 5 th edition, David Patterson and John Hennessy, ISBN Web Page: Computer Architecture
Class Meeting Times TimeSundayMondayTuesdayWednesdayThursday 8am (1) 7H (7 ح ) 9am (2) 10am (3) Office Hours 11am (4) 12pm 1pm (5) 2pm (6)6H (6 ح ) 3pm 4pm (7) Lab: Electronics Lab 5pm (8) 6pm (9) Computer Architecture
Web Page and Required Software Class depends heavily on the internet, be sure to check regularly Web Page Contents Announcements Homework Notes Class grades Adobe Reader is needed for homework Class notes will be provided in Microsoft PowerPoint See UQU home page for free download for students Computer Architecture
Homework Homework will be posted on the web page Submission should be on time or you receive no credit Solutions will be posted on due date after class Computer Architecture
Classroom Policy Class will start ON TIME! Attendance No points for attendance, it is for your own good to attend 45 lecture hours throughout semester UQU policy states that 25% = 12 absences results in a grade of “banned” or محروم Cell phone – considered absent You are encouraged to ask questions Best way to pass class Attend and put forth effort Computer Architecture
Test Policy NO MAKEUP EXAMS. If you miss a test or quiz you will not be allowed to take it No cell phones, no calculators. Solve using PEN You must show your work for credit! No work = 0 points Cheating results in an automatic score of 0. Computer Architecture
Grade Distribution (tentative for now) Homework: 15 % Midterm: 20 % Lab: 25% Final: 40 % I will try to post updated class grades if possible Computer Architecture
Computer Organization and Design Covers the organization and interconnections between components of a computer Basic understanding of what constitutes performance Major focus in this class Instruction set architecture (ISA) The language of a computer Understand the interface between ISA and hardware Computer Architecture
Five Classic Components Five classic components of a computer: Input Output Memory Datapath Control Computer Architecture
What is Under Your Program? Computer Architecture C, C++, Java Windows, iOS, Linux Compilers
Hardware Inputting data Keyboard, mouse, touchscreen Outputting data Speakers, LCD display Processing data Central Processing Unit (CPU) – old terminology Processor Microprocessor Storing data Cache SRAM, DRAM Flash Magnetic Disk Computer Architecture Hardware inputting dataoutputting data processing data storing data
The Hardware/Software interface Interface between hardware and lowest level software: Instruction Set Architecture (ISA) or Architecture Operating system hides ISA from application programmers ISA implementation may have many designs ISA can be discussed independent of hardware Computer Architecture Hardware ISA add $s1, $s2, $s3 beq $s1, $s2, CHECK.
Short review Computer Arithmetic – two’s complement Flip Flops Registers State Machine – relationship to Computer Operation Short discussion about MIPS assembly language Computer Architecture
What Affects Performance? Algorithm Determines number of operations executed Programming language, compiler, architecture Determine number of machine instructions executed per operation Processor and memory system Determine how fast instructions are executed I/O system (including OS) Determines how fast I/O operations are executed Computer Architecture
Defining Performance Which airplane has the best performance? Computer Architecture
Response Time and Throughput Response time How long it takes to do a task Throughput Total work done per unit time E.g., tasks/transactions/… per hour How are response time and throughput affected by Replacing the processor with a faster version? Adding more processors? Focus: response time Computer Architecture
Relative Performance Define Performance = 1/Execution Time “X is n times faster than Y” Example: time taken to run a program 10s on A, 15s on B Execution Time B / Execution Time A = 15s / 10s = 1.5 So A is 1.5 times faster than B Computer Architecture
Computer Architecture Measuring Execution Time Elapsed time Total response time, including all aspects Processing, I/O, OS overhead, idle time Determines system performance CPU time Time spent processing a given job Discounts I/O time, other jobs’ shares Comprises user CPU time and system CPU time Different programs are affected differently by CPU and system performance 19
Computer Architecture CPU Clocking Operation of digital hardware governed by a constant- rate clock Clock (cycles) Data transfer and computation Update state Clock period Clock period: duration of a clock cycle e.g., 250ps = 0.25ns = 250×10 –12 s Clock frequency (rate): cycles per second e.g., 4.0GHz = 4000MHz = 4.0×10 9 Hz 20
Computer Architecture CPU Time Performance improved by Reducing number of clock cycles Increasing clock rate Hardware designer must often trade off clock rate against cycle count 21
Computer Architecture CPU Time Example Computer A: 2GHz clock, 10s CPU time Designing Computer B Aim for 6s CPU time Can do faster clock, but causes 1.2 × clock cycles How fast must Computer B clock be? 22
Computer Architecture Instruction Count and CPI Instruction Count for a program Determined by program, ISA and compiler Average cycles per instruction Determined by CPU hardware If different instructions have different CPI Average CPI affected by instruction mix 23
Computer Architecture CPI Example Computer A: Cycle Time = 250ps, CPI = 2.0 Computer B: Cycle Time = 500ps, CPI = 1.2 Same ISA Which is faster, and by how much? A is faster… …by this much 24