ΗΜΥ 312 -- ΑΡΧΙΤΕΚΤΟΝΙΚΗ ΗΛΕΚΤΡΟΝΙΚΩΝ ΥΠΟΛΟΓΙΣΤΩΝ ΔΙΑΛΕΞΗ 11: ΣΥΣΤΗΜΑΤΑ ΕΠΙΚΟΙΝΩΝΙΑΣ / ΔΙΑΣΥΝΔΕΣΗΣ Διδάσκουσα: ΜΑΡΙΑ Κ. ΜΙΧΑΗΛ Επίκουρη Καθηγήτρια, ΗΜΜΥ (mmichael@ucy.ac.cy) [Προσαρµογή από Computer Architecture, Hennessy & Patterson, 2005, UCB] (Επ) Συστήµατα Εισόδου/Εξόδου Δεδοµένων Processor interrupts Cache Memory - I/O Bus Main Memory I/O Controller I/O Controller I/O Controller Disk Disk Graphics Network ideal: high bandwidth, low latency ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.2 1
Δίκτυα Επικοινωνίας l Στόχος: Επικοινωνία Μεταξύ Υπολογιστών l Στρατηγικός Σκοπός: Μεταχείριση Δικτύου Υπολογιστών σαν ένα μεγάλο ατομικό υπολογιστή, με διασκορπισμένες και μοιραζόμενες πηγές υπολογισμού (distributed resource sharing) l Το Θέμα: Οι υπολογιστές του δικτύου πρέπει να συμφωνούν σε πολλά θέματα Σημασία σε standards και πρωτοκόλλα επικοινωνίας Ανοχή σε λάθη είναι περισσότερο από αναγκαία l ΠΡΟΣΟΧΗ: Πάρα πολλή ορολογία ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.3 Παραδείγµατα Δικτύων FDDI 100Mbps CS Net Phonenet IP - internet Protocol TCP - Transmission Control Protocol NSF Net 1.6Mbps CS Net Relay ARPA net T3, 230Kbps Bitnet T1, 56Kbps 10 Mbps Token Ring ATM Ethernet 4Mbps X.25 (Telenet, Uninet_ ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.4 2
Networks in Our Life! ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.5 Networks of Workstations (NOWs) Clusters l Clusters (από «έτοιμα» συστήματα), πλήρης υπολογιστές με πολλαπλά private address spaces l Τα Clusters συνδέονται με τα I/O bus των computers lower bandwidth than multiprocessors that use the memory bus lower speed network links more conflicts with I/O traffic l Τα Clusters από N processors έχουν N copies του O/S περιορίζοντας την διαθέσιμη για εφαρμογές μνήμη l Βελτιωμένη διαθεσιμότητα και επεκτασιμότητα του συστήματος (system availability and expandability) easier to replace a machine without bringing down the whole system allows rapid, incremental expandability l Economy-of-scale: Πλεονεκτήματα σε σχέση με το κόστος ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.6 3
Commercial (NOW) Clusters Dell PowerEdge eserver IBM SP Proc Proc Speed # Proc Network P4 Xeon 3.06GHz 2,500 Myrinet Power4 1.7GHz 2,944 VPI BigMac Apple G5 2.3GHz 2,200 Mellanox Infiniband HP ASCI Q Alpha 21264 1.25GHz 8,192 Quadrics LLNL Thunder Intel Itanium2 1.4GHz 1,024*4 Quadrics Barcelona PowerPC 970 2.2GHz 4,536 Myrinet ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.7 Networks in Our Daily Activities and in our not-so-daily activities ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.8 4
Δίκτυα l Τι απασχολεί τους ερευνητές: Απευθείας (direct, point-to-point) vs. μέσω τρίτων (indirect, multi-hop) Τοπολογία (e.g., bus, ring, DAG) Αλγόριθμοι Δρομολόγησης (routing algorithms) Μεταγωγή (switching (aka multiplexing)) Καλωδίωση (wiring (e.g., choice of media, copper, coax, fiber)) l Τι όμως μας αφορά: Καθυστέρηση (latency) Εύρος (bandwidth) Κόστος Αξιοπιστία (reliability) ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.9 Περισσότερη Ορολογία l Σύνδεση 2 ή περισσότερων δικτύων: Διαδικτύωση (Internetworking) l 3 Οικογένειες Δικτύων MPP Massively Parallel Processing performance, latency and bandwidth LAN Local Area Network workstations, cost WAN Wide Area Network telecommunications, phone call revenue l Προσπάθεια συρρίκνωσης l Προσπάθεια ιεραρχίας από μικρό σε μεγάλο για απλότητα ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.10 5
Τα ΑΒΓ του Δικτύου l Αρχικό Σημείο: Μεταβίβαση ενός ψηφίου από ένα σύστημα (ή υπολογιστή) σε δεύτερο σύστημα (ή υπολογιστή). l Σειρά επικοινωνίας [Queue (FIFO)] σε κάθε μεριά l Οι μεταβιβασμένες πληροφορίες ονομάζονται μήνυμα - message l Αμφίδρομη Ταυτόχρονη Επικοινωνία ( Full Duplex ) l Κανόνες Επικοινωνίας; Πρωτόκολλο! protocol Μέσα στον υπολογιστή: Loads/Stores: Request (Address) & Response (Data) Need Request & Response signaling ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.11 Απλό Παράδειγµα l Πώς είναι η διατύπωση του μηνύματος? Fixed? Number bytes? Request/ Response Address/Data 1 bit 32 bits 0: Please send data from Address 1: Packet contains data corresponding to request Header/Trailer: Πληροφορεί πως παραδίδεται το µήνυµα Payload: Τα δεδοµένα στο µήνυµα (1 λέξη στο παράδειγµα) ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.12 6
Ερωτήσεις J l Πώς επιτυγχάνουμε επικοινωνία 3 ων και πλέον Η/Υ? Θέλουμε το address field (destination) στο πακέτο l Τί γίνεται αν στο πακέτο εισέλθουν λάθη? Θέλουμε τρόπο εύρεσης λαθών error detection field στο πακέτο (e.g., CRC) l Τί γίνεται αν χαθεί το πακέτο? Πιο εξελιγμένο πρωτόκολλο elaborate protocols για εντοπισμό απώλειας (e.g., NAK, ARQ, time outs) l Πώς διαχωρίζουμε πια εργασία είναι ο παραλήπτης? Κάθε εργασία έχει την δική της γραμμή εξυπηρέτησης για προστασία (Queue per process to provide protection) l Ερωτήσεις απλές σαν και αυτές οδηγούν στην δημιουργία πιο εξειδικευμένων πρωτοκόλλων και διατυπώσεις πακέτων => πολύπλοκες αρχιτεκτονικές ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.13 Πίσω στο απλό παράδειγµα l Πώς είναι η διατύπωση του μηνύματος? Fixed? Number bytes? Request/ Response Address/Data CRC 2 bits 32 bits 4 bits 00: Request Please send data from Address 01: Reply Packet contains data corresponding to request 10: Acknowledge request 11: Acknowledge reply ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.14 7
Στατικά Δίκτυα l Σταθερά καλώδια (channels) μεταξύ κόμβων δικτύου l Πολλές τοπολογίες Πλήρως Συνδεδεμένα (n(n-1))/2 channels Static counterpart of crossbar Αστέρι One central for message passing Static counterpart of bus Πολλαπλό επίπεδο δικτύων με συσκευή σε κάθε διακόπτη ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.15 Δυναµικά Δίκτυα l Επιτυγχάνεται με χρήση Crossbar - πολλαπλός διακόπτης με διασταυρωμένες ράβδους!!! Συνδέει π.χ. α επεξεργαστές με β μνήμες α * β matrix α οριζόντιες γραμμές, β κάθετες γραμμές Σημεία διασταύρωσης: on/off switches Ένας μόνο διακόπτης για κάθε σημείο (row,column) pair Δεν σταματά: Πόρτα Χ i με Πόρτα Υ j δεν διακόπτει την Πόρτα Ζ l to W k Αρκετά ακριβό, δεν μεγεθύνεται γραμμικά α * β διακόπτες Πολύπλοκη χρονική συναλλαγή και έλεγχος l Θα το δούμε αναλυτικά πιο μετά ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.16 8
Μέτρηση Απόδοσης (Performance Metrics) l Κόστος Δικτύου (Network cost) number of switches number of (bidirectional) links on a switch to connect to the network (plus one link to connect to the processor) width in bits per link, length of link l Εύρος (Network bandwidth (NB)) represents the best case bandwidth of each link * number of links l Πλάτος (Bisection bandwidth (BB)) represents the worst case divide the machine in two parts, each with half the nodes and sum the bandwidth of the links that cross the dividing line l Άλλες Πτυχές latency on an unloaded network to send and receive messages throughput maximum # of messages transmitted per unit time # routing hops worst case, congestion control and delay ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.17 Interconnection Networks Nodes Routers Nodes (a) Direct network (b) Indirect network Examples of direct and indirect interconnection networks. ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.18 9
Direct Interconnection Networks (a) 2D torus (b) 4D hyperc ube A sampling of common direct interconnection networks. Only routers are shown; a computing node is implicit for each router. ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.19 (c) Chordal ring (d) Ring of rings Indirect Interconnection Networks Level-3 bus Level-2 bus Level-1 bus (a) Hierarchical buses (b) Omega network Two commonly used indirect interconnection networks. ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.20 10
Bus Interconnection Network (IN) Bidirectional network switch Processor node l N processors, 1 switch ( ), 1 link (the bus) l Only 1 simultaneous transfer at a time NB = link (bus) bandwidth * 1 BB = link (bus) bandwidth * 1 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.21 Ring IN l N processors, N switches, 2 links/switch, N links l N simultaneous transfers NB = link bandwidth * N BB = link bandwidth * 2 l If a link is as fast as a bus, the ring is only twice as fast as a bus in the worst case, but is N times faster in the best case ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.22 11
Fully Connected IN l N processors, N switches, N-1 links/switch,(n*(n-1))/2 links l N simultaneous transfers NB = link bandwidth * (N*(N-1))/2 BB = link bandwidth * (N/2) 2 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.23 Crossbar (Xbar) Connected IN l N processors, N 2 switches (unidirectional),2 links/switch, N 2 links / processor l N simultaneous transfers NB = link bandwidth * N BB = link bandwidth * N/2 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.24 12
Hypercube (Binary N-cube) Connected IN 2-cube 3-cube l N processors, N switches, logn links/switch, (NlogN)/2 links l N simultaneous transfers NB = link bandwidth * (NlogN)/2 BB = link bandwidth * N/2 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.25 2D and 3D Mesh/Torus Connected IN q N processors, N switches, 2, 3, 4 (2D torus) or 6 (3D torus) links/switch, 4N/2 links or 6N/2 links q N simultaneous transfers NB = link bandwidth * 4N or link bandwidth * 6N BB = link bandwidth * 2 N 1/2 or link bandwidth * 2 N 2/3 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.26 13
Fat Tree l Τα «δέντρα» είναι πολύ χρήσιμες δομές, και στα δίκτυα είναι πολύ δημοφιλή. Trees are good structures. People in CS use them all the time. Suppose we wanted to make a tree network. A B C D l Any time A wants to send to C, it ties up the upper links, so that B can't send to D. The bisection bandwidth on a tree is horrible - 1 link, at all times l The solution is to 'thicken' the upper links. More links as the tree gets thicker increases the bisection l Rather than design a bunch of N-port switches, use pairs ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.27 Fat Tree l N processors, log(n-1)*logn switches, 2 up + 4 down = 6 links/switch, N*logN links l N simultaneous transfers NB = link bandwidth * NlogN BB = link bandwidth * 4 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.28 14
SGI NUMAlink Fat Tree ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.29 www.embedded-computing.com/articles/woodacre IN Comparison l For a 64 processor system Bus Ring 2D Torus 6-cube Fully connected Network bandwidth 1 64 256 192 2016 Bisection bandwidth 1 2 16 32 1024 Total # of switches 1 64 64 64 64 Links per switch 2+1 4+1 6+7 63+1 Total # of links (bidi) 1 64+64 128+64 192+64 2016+64 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.30 15
23/10/15 How About On-Chip Networks? ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.31 A Critical Bottleneck - Interconnect 300 Delay (psec) 250 Interconnect delay 200 150 100 Transistor/Gate delay 50 0 0.8 0.5 0.35 0.25 0. 18 Technology generation (µm) Source: Gordon Moore, Chairman Emeritus, Intel Corp. ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.32 16
Relative Delays 250 nm 32 nm Gate Delay Global Wiring Global Interconnect Delays are NOT Scaling like Gate Delays! Photo by IBM ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.33 System-on-Chip (SoC) Design Revolution ASIC design Until now Physical Components System-on-Board Integration l Increasing Circuit Complexity l IP Re-Use l Platform-Based Design l On-chip Interconnect Scalability Now/Future Design IP Blocks Logical Components System-on-Chip Integration ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.34 17
Buses are becoming spaghetti Accelerator Bus TDM Internal Data memory DMA IF DMA Data AHB Master Bridge DMA - DATA bus 2 CORE - DATA bus CORE - program bus DMA - DATA bus 1 IF CEVA-X1620 O I/O Data Controller Core DMA Prog. AHB Slave Bridge ARM DATA - bus IF Program Controller Internal Program memory L2 SRAM I/O APB bridge TAG L2 SRAM Peripheral APB CRU TIMERS ICU PMU GPIO APB system control User peripherals User peripherals User peripherals ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.35 Enter the Network-on-Chip (NoC)! ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.36 18
What are Networks-on-Chip (NoC)? Processing Elements (s) interconnected via a packet-based network Audio NIC DSP NIC R R Video NIC CPU NIC R R 802.11 NIC UART NIC R R Processing Element () NIC b R b b-bit Links MG NIC RAM NIC RAM NIC Router R R R ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.37 Networks On Chip Messages packetized at -Network Interface, routed to destinations where they are de-packetized into data. 1 MSG Packetized Message 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 MSG Decoded Message ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.38 19
Παραδείγµατα Δικτυωµένων Επεξεργαστών Proc Proc Speed # Proc IN Topology SGI Origin R16000 128 fat tree 800 Cray 3TE Alpha 21164 300MHz 2,048 3D torus 600 Intel ASCI Red Intel 333MHz 9,632 mesh 800 IBM ASCI White Power3 375MHz 8,192 multistage Omega BW/link (MB/sec) 500 NEC ES SX-5 500MHz 640*8 640-xbar 16000 NASA Columbia IBM BG/L Intel Itanium2 Power PC 440 1.5GHz 512*20 fat tree, Infiniband 0.7GHz 65,536*2 3D torus, fat tree, barrier ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.39 IBM BlueGene 512-node proto BlueGene/L Peak Perf 1.0 / 2.0 TFlops/s 180 / 360 TFlops/s Memory Size 128 GByte 16 / 32 TByte Foot Print 9 sq feet 2500 sq feet Total Power 9 KW 1.5 MW # Processors 512 dual proc 65,536 dual proc Networks 3D Torus, Tree, Barrier 3D Torus, Tree, Barrier Torus BW 3 B/cycle 3 B/cycle ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.40 20
A BlueGene/L Chip 32K/32K L1 440 CPU Double FPU 700 MHz 32K/32K L1 440 CPU Double FPU 128 5.5 GB/ s 128 5.5 GB/ s 2KB L2 2KB L2 256 256 11GB/s 256 16KB Multiport SRAM buffer 256 11GB/s 4MB L3 ECC edram 128B line 8-way assoc Gbit ethernet 3D torus Fat tree Barrier 1 8 ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.41 6 in, 6 out 1.6GHz 1.4Gb/s link 3 in, 3 out 350MHz 2.8Gb/s link 4 global barriers DDR control 144b DDR 256MB 5.5GB/s Δικτύωση On-Chip l Ενώνουν Επεξεργαστές, µνήµη, I/O συσκευές l Δυναµικά δίκτυα Συνδέονται σε οποιοδήποτε κοµµάτι µε διακόπτες/ διακλαδωτές (switches) ή διαύλους (busses) Δύο είδη διακλαδωτών (switches) On / off: 1 input, 1 output Pass through / cross over: 2 inputs, 2 outputs l Στατικά δίκτυα Συνδέονται µε καλώδια ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.42 21
Δίαυλος Επ. l Connects processors, memories, I/O devices l Device needs to request the bus e.g. Set up Pi ß à Mj communication l Sequential Only one communication at the time Bottleneck l Cache coherence problems ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.43 Crossbar vs bus l Crossbar Η απόδοση εξαρτάται από τον αριθμό Ι/Ο Εύκολο στον σχεδιασμό l Δίαυλος (Bus) Δεν επηρεάζεται από τον αριθμό Ι/Ο Πιο πολύπλοκο όσο αυξάνεται ο αριθμός Ι/Ο l Συμβιβασμός: Δίκτυο Πολλαπλών Σταδίων ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.44 22
ΕΠΟΜΕΝΗ ΔΙΑΛΕΞΗ ΚΑΙ ΚΑΤ ΟΙΚΟΝ ΜΕΛΕΤΗ q ΕΠΟΜΕΝΗ ΕΝΟΤΗΤΑ Ο Επεξεργαστής (Datapath and ALU) l ΚΑΤ ΟΙΚΟΝ ΜΕΛΕΤΗ Παράρτημα Ε του βιβλίου σας ΗΜΥ312 Δ11 Δίκτυα Επικοινωνίας.45 23