5 2007 2008 nkoziriscslab ece ntua gr http
Αρχιτεκτονική Υπολογιστών 5ο εξάμηνο ΣΗΜΜΥ ακ. έτος: 2007 -2008 Νεκτάριος Κοζύρης nkoziris@cslab. ece. ntua. gr http: //www. cslab. ece. ntua. gr/courses/comparch/ cslab@ntua 2007 -2008 1
Βιβλία μαθήματος Οργάνωση και Σχεδίαση Υπολογιστών (η διασύνδεση υλικού και λογισμικού), 3η έκδοση, David Patterson and John Hennessy, μετάφραση, εκδόσεις Κλειδάριθμος, 2006. Το βιβλίο θα διατίθεται 10: 00 -14: 00 κάθε μέρα από τη γραμματεία του Εργαστηρίου Υπολογιστικών Συστημάτων (cslab), 2ος όροφος, κτίριο Ηλεκτρολόγων, 21. 34 B, κ. Ελίζα Αγγελίδη Αρχιτεκτονική Υπολογιστών, Γ. Παπακωνσταντίνου, Π. Τσανάκα, Γ. Φραγκάκη, εκδ. Συμμετρία. Το βιβλίο θα διατίθεται από τις εκδόσεις Συμμετρία Computer Architecture: A Quantitative Approach, 4 th Edition, John L. Hennessy & David A. Patterson, Morgan Kaufmann, 2006. Modern Processor Design: Fundamentals of Superscalar Processors, John Shen & Miko Lipasti, Mc. Graw-Hill, 2004. Inside the Machine: An Illustrated Introduction to Microprocessors and Computer Architecture, Jon Stokes, No Starch Press, 2006. Readings in Computer Architecture, edited by Mark Hill, Norman Jouppi & Gurindar Dohi, Morgan Kaufmann 2000. cslab@ntua 2007 -2008 3
1944 ENIAC (1943 -1946) by Mauchly and Eckert Dimension: 3 ft 8 ft 100 ft 15, 000 vacuum tubes + lots of switches Memory : Twenty 10 -digit decimal numbers Speed: 800 operations/sec 10 years of service – more calculations than done by the entire human race up to 1946. cslab@ntua 2007 -2008 6
Προβλέψεις (tunnel vision) “I think there is a world market for maybe five computers. ” Thomas Watson, Chairman of IBM, 1943 cslab@ntua 2007 -2008 7
…more tunnel vision from “Experts” “There is no reason for any individual to have a computer in their home” v Ken Olson, president and founder of Digital Equipment Corporation, 1977. “ 640 K [of memory] ought to be enough for anybody. ” v Bill Gates, chairman of Microsoft, 1981. Slide source: Warfield et al. cslab@ntua 2007 -2008 8
Οι Γενιές των επεξεργαστών • Πρώτη Γενιά, 1946 -59: Vacuum Tubes, Relays, Mercury Delay Lines: ØENIAC (Electronic Numerical Integrator and Computer): Πρώτος Η/Υ, 18000 vacuum tubes, 1500 relays, 5000 additions/sec. ØΠρώτο πρόγραμμα αποθηκευμένο σε υπολογιστή: EDSAC (Electronic Delay Storage Automatic Calculator). • Δεύτερη Γενιά, 1959 -64: Διακριτά Transistors. • Τρίτη Γενιά, 1964 -71: Μικρού και Μεσαίου μεγέθους Ολοκληρωμένα Κυκλώματα. • Τέταρτη Γενιά, 1971 -Present: Ο Μικροϋπολογιστής. Μικροεπεξεργαστές βασισμένοι σε τεχνολογία ολοκληρωμένων 1971: Intel 4004, 2, 3 K transistors 12 mm 2 (clock: 740 KHz, 92 K ops, 10μm) 1978: Intel 8086, 30 K transistors, 33 mm 2 1984: Stanford MIPS, 24 K transistors, 34 mm 2 (Berkeley RISC II: 41 K, 60 mm 2) 1996: Pentium Pro, 5, 5 M transistors, 306 mm 2 Σήμερα (11/2007): Penryn quad core: ~820 M transistors/die (214 mm², 45 nm). cslab@ntua 2007 -2008 9
Moore’s Law: Microprocessor Capacity Gordon Moore (συνιδρυτής της Intel) 1965: η πυκνότητα των transistors σε chips ημιαγωγών θα διπλασιάζεται κάθε 24 μήνες. cslab@ntua 2007 -2008 10
CPU Clock cslab@ntua 2007 -2008 12
Αύξηση της χωρητικότητας των VLSI Dynamic RAM Chips έτος μέγεθος(Mbit) 1980 0. 0625 1983 0. 25 1986 1 1989 4 1992 16 1996 64 1999 256 2000 1024 1. 55 X/έτος, δηλαδή διπλασιάζεται κάθε 1. 6 χρόνια cslab@ntua 2007 -2008 13
Clock Speeds cslab@ntua 2007 -2008 14
cslab@ntua 2007 -2008 16
Microprocessor Clock Rate cslab@ntua 2007 -2008 17
Electronics Magazine, 19 April 1965 Πηγή: ftp: //download. intel. com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article. pdf cslab@ntua 2007 -2008 18
Processor-Memory Gap 1000 CPU processor 60%/yr “Moore’s Law” Speed processor-memory performance gap: (grows 50% / yr) 100 (MHz) 10 DRAM memory 7%/yr 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 1 Time cslab@ntua 2007 -2008 19
Η επανάσταση που συμβαίνει σήμερα O «γνήσιος» νόμος του Moore συνεχίζει να ισχύει! Chip density is continuing increase ~2 x every 2 years ØClock speed is not ØNumber of processor cores doubles instead There is little or no hidden parallelism (ILP) to be found Parallelism must be exposed to and managed by software Source: Intel, Microsoft (Sutter) and Stanford (Olukotun, Hammond) cslab@ntua 2007 -2008 22
Supercomputing TOP 500 / Nov 2007 cslab@ntua 2007 -2008 24
Supercomputing TOP 500 / Nov 2007 cslab@ntua 2007 -2008 25
29 th List: The TOP 10 Manufacturer 1 IBM 2 Cray 10 3 Sandia/Cray 2 4 IBM 3 5 IBM 6 4 IBM 7 IBM 8 Dell 9 5 IBM 10 SGI Computer Blue. Gene/L e. Server Blue Gene Jaguar Cray XT 3/XT 4 Red Storm Cray XT 3 BGW e. Server Blue Gene New York BLue e. Server Blue Gene ASC Purple e. Server p. Series p 575 Blue. Gene/L e. Server Blue Gene Abe Power. Edge 1955, Infiniband Rmax [TF/s] Installation Site Country Year #Proc 280. 6 DOE/NNSA/LLNL USA 2005 131, 072 101. 7 DOE/ORNL USA 2007 23, 016 101. 4 DOE/NNSA/Sandia USA 2006 26, 544 91. 29 IBM Thomas Watson USA 2005 40, 960 82. 16 Stony Brook/BNL USA 2007 36, 864 75. 76 DOE/NNSA/LLNL USA 2005 12, 208 73. 03 RPI/CCNI USA 2007 32, 768 62. 68 NCSA USA 2007 9, 600 Mare. Nostrum Barcelona 62. 63 Supercomputing Center Spain 2006 12, 240 JS 21 Cluster, Myrinet HLRB-II 56. 52 LRZ Germany 2007 9, 728 SGI Altix 4700 cslab@ntua 2007 -2008 www. top 500. org 29 th List / June 2007 26
Low Power Cluster Architectures sensitivity to power consumption cslab@ntua 2007 -2008 27
Power Density Limits Serial Performance cslab@ntua 2007 -2008 28
cslab@ntua 2007 -2008 31
IBM Automatic Sequence Controlled Calculator (ASCC) • 765, 000 components • hundreds of miles of wire • size 16 m in length, 2. 4 m in height, 61 cm deep. • 4500 kg Harvard Mark I – IBM ASCC 1944 ( instructions on punched tape (24 bits wide) and data in electro-mechanical counters (23 digits wide) cslab@ntua 2007 -2008 32
cslab@ntua 2007 -2008 33
Συστατικά τυπικού Υπολογιστή } Πέντε είναι τα κλασσικά συστατικά στοιχεία των υπολογιστών: 1. Control Unit; 2. Datapath; 3. Memory; 4. Input; 5. Output Processor Computer Processor (CPU) (active) Control Unit Datapath Memory (passive) (προγράμματα και δεδομένα είναι ενεργά κατά την εκτέλεση) Devices Keyboard, Mouse, etc. Input Disk Output Display, Printer, etc. 34 cslab@ntua 2007 -2008
Computer System Components Proc Caches System Bus Memory adapters Controllers I/O Devices: Disks Displays Keyboards I/O Buses NICs Networks 35 cslab@ntua 2007 -2008
36 cslab@ntua 2007 -2008
Διάταξη ενός Τυπικού Μικροεπεξεργαστή: The Intel Pentium Classic 39 cslab@ntua 2007 -2008
Διάταξη ενός Τυπικού Μικροεπεξεργαστή : The Intel Pentium Classic 40 cslab@ntua 2007 -2008
Ιεραρχία της Αρχιτεκτονικής Υπολογιστών High-Level Language Programs Software Application Operating System Machine Language Program Software/Hardware Boundary Assembly Language Programs Compiler Firmware Instr. Set Proc. I/O system Instruction Set Architecture Datapath & Control Hardware Digital Design Circuit Design Microprogram Layout Logic Diagrams Register Transfer Notation (RTN) 43 Circuit Diagrams cslab@ntua 2007 -2008
Μορφή προγράμματος σε κάθε επίπεδο temp = v[k]; High Level Language Program v[k] = v[k+1]; v[k+1] = temp; Compiler lw $15, lw $16, sw $15, Assembly Language Program Assembler Machine Language Program 0000 1010 1100 0101 1001 1111 0110 1000 1100 0101 1010 0000 0110 1000 1111 1001 0($2) 4($2) 1010 0000 0101 1100 1111 1000 0110 0101 1100 0000 1010 1000 0110 1001 1111 Machine Interpretation Control Signal Specification cslab@ntua 2007 -2008 ° ° ALUOP[0: 3] <= Inst. Reg[9: 11] & MASK Register Transfer Notation (RTN) 44
• Ιεραρχία του Σχεδιασμού Υπολογιστών Level Name Modules Primitives Descriptive Media • 1 • 2 Logic • • 3 Organization Electronics Gates, FF’s Transistors, Resistors, etc. Registers, ALU’s. . . Processors, Memories Gates, FF’s …. Registers, ALU’s … Circuit Diagrams Logic Diagrams Register Transfer Notation (RTN) Low Level - Hardware • 4 Microprogramming Assembly Language Microinstructions Microprogram Firmware • • 5 Assembly language Language programming OS Routines Instructions • • 6 Procedural Programming Applications Drivers. . • 7 Application Systems High Level - Software cslab@ntua 2007 -2008 Assembly language OS Routines High-level Languages Procedural Construct Assembly Programs High-level Language Programs Problem-Oriented Programs 45
Τύποι Εντολών στο Instruction Set • Operator Type Παραδείγματα • • Arithmetic and logical • • System • Floating point • • Decimal add, decimal multiply, decimal to character conversion • String move, string compare, string search • • Graphics Pixel operations, compression/ decompression operations Integer arithmetic & logical operations: add, or Data transfer Loads-stores (move on machines with memory addressing) Control Branch, jump, procedure call, & return, traps. Operating system call, virtual memory management instructions Floating point operations: add, multiply. 51 cslab@ntua 2007 -2008
Παραδείγματα Εντολών μετακίνησης δεδομένων Instruction MOV A, B lwz R 3, A li $3, 455 MOV AX, BX LEA. L (A 0), A 2 Meaning Move 16 -bit data from memory loc. A to loc. B Move 32 -bit data from memory loc. A to register R 3 Load the 32 -bit integer 455 into register $3 Machine VAX 11 PPC 601 MIPS R 3000 Move 16 -bit data from register BX into register AX Intel X 86 Load the address pointed to by A 0 into A 2 MC 68000 52 cslab@ntua 2007 -2008
Παραδείγματα Εντολών της ALU Instruction MULF A, B, C Meaning Multiply the 32 -bit floating point values at mem. locations A and B, and store result in loc. C Machine VAX 11 nabs r 3, r 1 Store the negative absolute value of register r 1 in r 2 PPC 601 ori $2, $1, 255 Store the logical OR of register $1 with 255 into $2 MIPS R 3000 SHL AX, 4 Shift the 16 -bit value in register AX left by 4 bits Intel X 86 ADD. L D 0, D 1 Add the 32 -bit values in registers D 0, D 1 and store the result in register D 0 MC 68000 53 cslab@ntua 2007 -2008
Παραδείγματα Εντολών Διακλάδωσης Instruction BLBS A, Tgt bun r 2 Beq $2, $1, 32 JCXZ Addr BVS next Meaning Branch to address Tgt if the least significant bit at location A is set. Branch to location in r 2 if the previous comparison signaled that one or more values was not a number. Branch to location PC+4+32 if contents of $1 and $2 are equal. Machine VAX 11 PPC 601 MIPS R 3000 Jump to Addr if contents of register CX = 0. Intel X 86 Branch to next if overflow flag in CC is set. MC 68000 54 cslab@ntua 2007 -2008
- Slides: 55