ΜΥΕ- 05 Αρχιτεκτονική Υπολογιστών 2 1ο μάθημα: εισαγωγή Διδάσκοντας: Αρης Ευθυμίου Πηγές διαφανειών: συνοδευτικές διαφάνειες αγγλικης εκδοσης του βιβλιου
Γενικές πληροφορίες! Διδάσκοντας: Αρης Ευθυμίου! Κωδικός Μαθήματος: ΠΛΕ 074, MYE 005! Εβδομαδιαίες Ωρες Διδασκαλίας: 3! Εξάμηνο: Χειμερινό! Διδακτικές Μονάδες : 4! Ιστοσελίδα Μαθήματος:hRp://www.cs.uoi.gr/~ple074/ διαφάνειες, ασκήσεις, ανακοινώσεις! «Προαπαιτούμενα»: Γνώση προγραμματισμού C, λίγο C++ Αρχιτεκτονική Η/Υ, (Ψηφιακή σχεδίαση) 2
Επικοινωνία! Ωρες διδασκαλίας: Τετάρτη 17:00 20:00 (Αίθουσα: Ι2)! Γραφείο: Β.29! Email: evhym at cs.uoi.gr 3
Περιγραφή μαθήματος 2 ο μάθημα σε αρχιτεκτονική Η/Υ Κύριες ενότητες:! Οργάνωση διοχετευμένων πυρήνων! Παραλληλισμός επιπέδου εντολών (Instruc on- level parallelism)! (υπο)σύστημα μνήμης - κρυφές μνήμες! Παραλληλισμός επιπέδου νήματος (Thread- level parallelism) 4
Μαθησιακοί στόχοι! Κατανόηση αρχιτεκτονικών τεχνικών αύξησης απόδοσης! Κατανόηση σε βάθος της λειτουργίας διοχετευμένου πυρήνα επεξεργαστή και παραλληλία επιπέδου εντολής! Κατανόηση του υποσυστήματος μνήμης! Εξοικείωση σε χρήση προσομοιωτών, σύγκριση σχεδιαστικών επιλογών, συγγραφή αναφοράς αποτελεσμάτων 5
Γιατί να ασχοληθεί κανείς! Ικανοποίηση περιέργειας: πώς δουλεύει το PC/laptop/ smartphone μου;! Μεταπτυχιακές σπουδές πολλές ερωτήσεις στο τέστ GRE από αρχιτεκτονική (για αίτηση σε Αμερικάνικα Παν/μια) Βασικές γνώσεις για άλλα προχωρημένα μαθήματα (VLSI, παράλληλα συστήματα)! Από δουλειές; Περίπου το 1/3 από το «ΑΕΠ» πληροφορικής είναι hardware ο τομέας hardware στην Ελλάδα είναι μικρός. Παγκόσμια όμως είναι ισχυρός και σε καλή κατάσταση Ξέροντας λεπτομέρειες της μηχανής μπορεί κάποιος να γράψει καλύτερο κώδικα 6
Υποθέσεις! Αναπαράσταση αριθμών: Συμπλήρωμα ως προς 2, υπερχείλιση,...! Συμβολική γλώσσα (assembly) βασική εξοικείωση! Απλά συνδιαστικά και ακολουθιακά κυκλώματα: λογικές πράξεις, πολυπλέκτης, αθροιστής, καταχωρητής, μηχανή πεπερασμένης κατάστασης (FSM),...! Λειτουργικά συστήματα διακοπές, διεργασίες,...! Βασικές δομές δεδομένων: στοίβα, ουρά,... 7
Συγγράμματα! Αρχιτεκτονική Υπολογιστών, Hennessy John L., PaRerson David! Αρχιτεκτονική Υπολογιστών, Δημήτριος Β. Νικολός! Modern Processor Design, J.P. Shen, M. H. Lipas 8
Βαθμολόγηση! Τελική γραπτή εξέταση: 80%! Ασκήσεις, εργασίες: 30%! Αν γραπτή εξέταση >= 4, Τελικός βαθμός = min(10, 0.8 * exam + 0.3 * exercises) Αλλιώς τελικός βαθμός = exam Προϋπόθεση για τη βάση στο μάθημα είναι το 40% στην τελική εξέταση 9
Υπολογιστική μηχανή Application (ex: browser) Software Hardware Operating Compiler System Assembler Processor Memory I/O system Datapath & Control Digital Design Circuit Design transistors Instruction Set Architecture Αρχιτεκτονική υπολογιστών: στο μεταίχμιο Υλικού - Λογισμικού 10
Κατηγορίες υπολογιστών! Personal Mobile Device (PMD) e.g. smart phones, tablet computers Emphasis on energy efficiency and real- me! Desktop Compu ng Emphasis on price- performance! Servers Emphasis on availability, scalability, throughput! Clusters / Warehouse Scale Computers Emphasis on availability and price- performance Sub- class: Supercomputers, emphasis: floa ng- point performance and fast internal networks! Embedded Computers Emphasis: price 11
Defining Computer Architecture! Old view of computer architecture: Instruc on Set Architecture (ISA) design i.e. decisions regarding:! registers, memory addressing, addressing modes, instruc on operands, available opera ons, control flow instruc ons, instruc on encoding! Real computer architecture: Specific requirements of the target machine Design to maximize performance within constraints: cost, power, and availability Includes ISA, microarchitecture, hardware 12
Instruc on- Set Architecture! Class of ISA register- memory, load- store! Memory addressinγ - addressing modes how to reach the data : immediate, register, displacement, absolute,! Types, sizes of operands integer, floa ng point, byte/char, word, single precision! Opera ons data- transfer, arithme c logical, floa ng point, vector! Control- flow instruc ons jumps, condi onal branches, subrou ne call / return! Instruc on encoding fixed or variable length 13
Single Processor Performance Move to multi-processor RISC 14
Current Trends in Architecture! Cannot con nue to leverage Instruc on- Level parallelism (ILP) Single processor performance improvement ended in 2003! New models for performance: Data- level parallelism (DLP) Thread- level parallelism (TLP)! These require explicit restructuring of the applica on 15
Trends in Technology! Integrated circuit logic technology Transistor density: 35%/year Die size: 10-20%/year Integra on overall: 40-55%/year! DRAM capacity: 25-40%/year (slowing)! Flash capacity: 50-60%/year 15-20X cheaper/bit than DRAM! Magne c disk capacity: 40%/year 15-25X cheaper/bit then Flash 300-500X cheaper/bit than DRAM! Product cycle: 2 year of design, 2-3 years of produc on Designers design for the next technology node! 16
Bandwidth and Latency! Bandwidth or throughput Total work done in a given me 10,000-25,000X improvement for processors 300-1200X improvement for memory and disks! Latency or response me Time between start and comple on of an event 30-80X improvement for processors 6-8X improvement for memory and disks 17
Bandwidth and Latency! Bandwidth grows >= square of improvement in latency 18
Transistors and Wires! Feature size Minimum size of transistor or wire in x or y dimension 10 microns in 1971 to.014 microns (14nm) in 2015 Transistor performance scales linearly! Wire delay does not improve with feature size! Integra on density scales quadra cally! Wire delay RC most wires get shorter, but R, C per unit length get worse Global wire propaga on in P4 (2001) required 2 (out of 20+) pipeline stages 19
Dynamic Energy and Power! Dynamic energy Transistor switch from 0 - > 1 or 1 - > 0 ½ x Capaci ve load x Voltage 2! Dynamic power ½ x Capaci ve load x Voltage 2 x Frequency switched! Reducing clock rate reduces power, not energy 20
Power! Intel 80386 consumed ~ 2 W! 3.3 GHz Intel Core i7 consumes 130 W! Heat must be dissipated from 1.5 x 1.5 cm chip! This is the limit of what can be cooled by air 21
Techniques for reducing power! Do nothing well! Dynamic Voltage- Frequency Scaling! Low power state for DRAM, disks! Overclocking, turning off cores 22
Sta c Power consump on! Current sta c x Voltage! Scales with number of transistors! To reduce: power ga ng 23
Trends in Cost! Cost driven down by learning curve and volume Higher volume: faster learning curve, higher purchasing, manufacturing efficiency, spread of development cost to more units! Yield propor on of good devices! DRAM: price closely tracks cost! Microprocessors: price depends on volume 10% less for each doubling of volume 24
Integrated Circuit Cost Ra o of wafer to die area square peg in round hole number of dies near the wafer periphery 25
Integrated Circuit Cost! Bose- Einstein formula:! Defects per unit area = 0.016-0.057 defects per square cm (2010)! N = process- complexity factor = 11.5-15.5 (40 nm, 2010) 26
Example! For 300mm (12- inch) wafer 120 good 2.25cm 2 dies 435 1.00cm 2 dies! Processing cost (2006): 5-6K$ per 300mm wafer $13 for 1.00cm 2 die, $46 for 2.25cm 2! Yield improvement by redundancy: for DRAM, SRAM 27
Επόμενο μάθημα! Αξιοπιστία! Μέτρηση επίδοσης (ταχύτητα εκτέλεσης)! Εντολές μηχανής του MIPS 28