CS 258 Parallel Computer Architecture Lecture 8 Network Interface Design February 20, 2008 Prof John D. Kubiatowicz

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Computer Architecture
System Area Network Abhiram Shandilya 12/06/01. Overview Introduction to System Area Networks SAN Design and Examples SAN Applications.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
1 (Review of Prerequisite Material). Processes are an abstraction of the operation of computers. So, to understand operating systems, one must have a.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Processor support devices Part 1:Interrupts and shared memory dr.ir. A.C. Verschueren.
Chapter 12 CPU Structure and Function. CPU Sequence Fetch instructions Interpret instructions Fetch data Process data Write data.
Graduate Computer Architecture, Fall 2005 Lecture 10 Distributed Memory Multiprocessors Shih-Hao Hung Computer Science & Information Engineering National.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
AMLAPI: Active Messages over Low-level Application Programming Interface Simon Yau, Tyson Condie,
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
CS 258 Parallel Computer Architecture Lecture 15.1 DASH: Directory Architecture for Shared memory Implementation, cost, performance Daniel Lenoski, et.
Realizing Programming Models CS 258, Spring 99 David E. Culler Computer Science Division U.C. Berkeley.
VIA and Its Extension To TCP/IP Network Yingping Lu Based on Paper “Queue Pair IP, …” by Philip Buonadonna.
ECE669 L20: Evaluation and Message Passing April 13, 2004 ECE 669 Parallel Computer Architecture Lecture 20 Evaluation and Message Passing.
EECC756 - Shaaban #1 lec # 13 Spring Scalable Distributed Memory Machines Goal: Parallel machines that can be scaled to hundreds or thousands.
Scalability CS 258, Spring 99 David E. Culler Computer Science Division U.C. Berkeley.
Scalable Distributed Memory Multiprocessors Todd C. Mowry CS 495 October 24 & 29, 2002.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
EECC756 - Shaaban #1 lec # 12 Spring Scalable Distributed Memory Machines Goal: Parallel machines that can be scaled to hundreds or thousands.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
3.5 Interprocess Communication
CS252 Graduate Computer Architecture Lecture 17 Multiprocessor Networks (con’t) March 31 th, 2010 John Kubiatowicz Electrical Engineering and Computer.
Distributed Memory Multiprocessors CS 252, Spring 2005 David E. Culler Computer Science Division U.C. Berkeley.
12/13/99 Page 1 IRAM Network Interface Ioannis Mavroidis IRAM retreat January 12-14, 2000.
General Purpose Node-to-Network Interface in Scalable Multiprocessors CS 258, Spring 99 David E. Culler Computer Science Division U.C. Berkeley.
7/2/2015 slide 1 PCOD: Scalable Parallelism (ICs) Per Stenström (c) 2008, Sally A. McKee (c) 2011 Scalable Multiprocessors What is a scalable design? (7.1)
Node-to-Network Interface in Scalable Multiprocessors CS 258, Spring 99 David E. Culler Computer Science Division U.C. Berkeley.
CS 258 Parallel Computer Architecture LimitLESS Directories: A Scalable Cache Coherence Scheme David Chaiken, John Kubiatowicz, and Anant Agarwal Presented:
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Switching, routing, and flow control in interconnection networks.
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
Synchronization and Communication in the T3E Multiprocessor.
Manolis Katevenis FORTH and University of Crete, Greece Interprocessor Communication seen as load/store instruction generalization.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
CS252 Graduate Computer Architecture Lecture 17 Multiprocessor Networks (con’t) March 18 th, 2012 John Kubiatowicz Electrical Engineering and Computer.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Graduate Computer Architecture I Lecture 11: Distribute Memory Multiprocessors.
LRPC Firefly RPC, Lightweight RPC, Winsock Direct and VIA.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Caltech CS184 Spring DeHon 1 CS184b: Computer Architecture (Abstractions and Optimizations) Day 14: May 7, 2003 Fast Messaging.
CS252 Graduate Computer Architecture Lecture 24 Network Interface Design Memory Consistency Models Prof John D. Kubiatowicz
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
John Kubiatowicz Electrical Engineering and Computer Sciences
CMSC 611: Advanced Computer Architecture
Architecture of Parallel Computers CSC / ECE 506 Summer 2006 Scalable Programming Models Lecture 11 6/19/2006 Dr Steve Hunter.
Switching, routing, and flow control in interconnection networks
CS 258 Reading Assignment 4 Discussion Exploiting Two-Case Delivery for Fast Protected Messages Bill Kramer February 13, 2002 #
Computer Science Division
Peng Liu Lecture 14 I/O Peng Liu
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
John Kubiatowicz Electrical Engineering and Computer Sciences
Chapter 13: I/O Systems.
Presentation transcript:

CS 258 Parallel Computer Architecture Lecture 8 Network Interface Design February 20, 2008 Prof John D. Kubiatowicz

Lec 8.2 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Network Transaction Primitive one-way transfer of information from a source output buffer to a dest. input buffer –causes some action at the destination –occurrence is not directly visible at source deposit data, state change, reply

Lec 8.3 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Programming Models Realized by Protocols CAD MultiprogrammingShared address Message passing Data parallel DatabaseScientific modeling Parallel applications Programming models Communication abstraction User/system boundary Compilation or library Operating systems support Communication hardware Physical communication medium Hardware/software boundary Network Transactions

Lec 8.4 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Shared Address Space Abstraction Fundamentally a two-way request/response protocol –writes have an acknowledgement Issues –fixed or variable length (bulk) transfers –remote virtual or physical address, where is action performed? –deadlock avoidance and input buffer full coherent? consistent?

Lec 8.5 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Consistency write-atomicity violated without caching –No way to enforce serialization Solution? Acknowledge write of A before writing Flag… P3P3 P2P2 P1P1

Lec 8.6 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Properties of Shared Address Abstraction Source and destination data addresses are specified by the source of the request –a degree of logical coupling and trust no storage logically “outside the address space” »may employ temporary buffers for transport Operations are fundamentally request response Remote operation can be performed on remote memory –logically does not require intervention of the remote processor

Lec 8.7 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Message passing Bulk transfers Complex synchronization semantics –more complex protocols –More complex action Synchronous –Send completes after matching recv and source data sent –Receive completes after data transfer complete from matching send Asynchronous –Send completes after send buffer may be reused

Lec 8.8 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Synchronous Message Passing Constrained programming model. Deterministic! What happens when threads added? Destination contention very limited. User/System boundary? Processor Action?

Lec 8.9 2/20/08Kubiatowicz CS258 ©UCB Spring 2008 Asynch. Message Passing: Optimistic More powerful programming model Wildcard receive => non-deterministic Storage required within msg layer?

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Asynch. Msg Passing: Conservative Where is the buffering? Contention control? Receiver initiated protocol? Short message optimizations

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Features of Msg Passing Abstraction Source knows send data address, dest. knows receive data address –after handshake they both know both Arbitrary storage “outside the local address spaces” –may post many sends before any receives –non-blocking asynchronous sends reduces the requirement to an arbitrary number of descriptors »fine print says these are limited too Optimistically, can be 1-phase transaction –Compare to 2-phase for shared address space –Need some sort of flow control »Credit scheme? More conservative: 3-phase transaction –includes a request / response Essential point: combined synchronization and communication in a single package!

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Active Messages User-level analog of network transaction –transfer data packet and invoke handler to extract it from the network and integrate with on-going computation Request/Reply Event notification: interrupts, polling, events? May also perform memory-to-memory transfer Request handler Reply

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Common Challenges Input buffer overflow –N-1 queue over-commitment => must slow sources Options: –reserve space per source(credit) »when available for reuse? Ack or Higher level –Refuse input when full »backpressure in reliable network »tree saturation »deadlock free »what happens to traffic not bound for congested dest? –Reserve ack back channel –drop packets –Utilize higher-level semantics of programming model

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 The Fetch Deadlock Problem Even if a node cannot issue a request, it must sink network transactions! –Incoming transaction may be request  generate a response. –Closed system (finite buffering) Deadlock occurs even if network deadlock free! NETWORK

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Solutions to Fetch Deadlock? logically independent request/reply networks –physical networks –virtual channels with separate input/output queues bound requests and reserve input buffer space –K(P-1) requests + K responses per node –service discipline to avoid fetch deadlock? NACK on input buffer full –NACK delivery? Alewife Solution: –Dynamically increase buffer space to memory when necessary –Argument: this is an uncommon case, so use software to fix

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Network Transaction Processing Key Design Issue: How much interpretation of the message? How much dedicated processing in the Comm. Assist? PM CA PM ° ° ° Scalable Network Node Architecture Communication Assist Message Output Processing – checks – translation – formating – scheduling Input Processing – checks – translation – buffering – action

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Spectrum of Designs None: Physical bit stream –blind, physical DMAnCUBE, iPSC,... User/System –User-level portCM-5, *T, Alewife –User-level handlerJ-Machine, Monsoon,... Remote virtual address –Processing, translationParagon, Meiko CS-2 Global physical address –Proc + Memory controllerRP3, BBN, T3D Cache-to-cache –Cache controllerDash, Alewife, KSR, Flash Increasing HW Support, Specialization, Intrusiveness, Performance (???)

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Net Transactions: Physical DMA DMA controlled by regs, generates interrupts Physical => OS initiates transfers Send-side –construct system “envelope” around user data in kernel area Receive –must receive into system buffer, since no interpretation in CA senderauth dest addr

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 nCUBE Network Interface independent DMA channel per link direction –leave input buffers always open –segmented messages routing interprets envelope –dimension-order routing on hypercube –bit-serial with 36 bit cut-through Os16 ins 260 cy13 us Or18200 cy15 us - includes interrupt

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Conventional LAN NI NIC Controller DMA addr len trncv TX RX Addr Len Status Next Addr Len Status Next Addr Len Status Next Addr Len Status Next Addr Len Status Next Addr Len Status Next Data Host Memory NIC IO Bus mem bus Proc Costs: Marshalling, OS calls, interrupts

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 User Level Ports initiate transaction at user level deliver to user without OS intervention network port in user space –May use virtual memory to map physical I/O to user mode User/system flag in envelope –protection check, translation, routing, media access in src CA –user/sys check in dest CA, interrupt on system

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Example: CM-5 Input and output FIFO for each network 2 data networks tag per message –index NI mapping table context switching? Alewife integrated NI on chip *T and iWARP also Os50 cy1.5 us Or53 cy1.6 us interrupt10us

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 User Level Handlers Hardware support to vector to address specified in message –On arrival, hardware fetches handler address and starts execution Active Messages: two options –Computation in background threaads »Handler never blocks: it integrates message into computation –Computation in handlers (Message Driven Processing) »Handler does work, may need to send messages or block User/system P Mem DestDataAddress P Mem 

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 J-Machine Each node a small mdg driven processor HW support to queue msgs and dispatch to msg handler task

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Alewife Messaging Send message –write words to special network interface registers –Execute atomic launch instruction Receive –Generate interrupt/launch user-level thread context –Examine message by reading from special network interface registers –Execute dispose message –Exit atomic section

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 iWARP Nodes integrate communication with computation on systolic basis Msg data direct to register of neighbor Stream into memory Interface unit Host

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Sharing of Network Interface What if user in middle of constructing message and must context switch??? –Need Atomic Send operation! »Message either completely in network or not at all »Can save/restore user’s work if necessary (think about single set of network interface registers –J-Machine mistake: after start sending message must let sender finish »Flits start entering network with first SEND instruction »Only a SENDE instruction constructs tail of message Receive Atomicity –If want to allow user-level interrupts or polling, must give user control over network reception »Closer user is to network, easier it is for him/her to screw it up: Refuse to empty network, etc »However, must allow atomicity: way for good user to select when their message handlers get interrupted –Polling: ultimate receive atomicity – never interrupted »Fine as long as user keeps absorbing messages

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Dedicated processing without dedicated hardware design

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Dedicated Message Processor General Purpose processor performs arbitrary output processing (at system level) General Purpose processor interprets incoming network transactions (at system level) User Processor Msg Processor share memory Msg Processor Msg Processor via system network transaction Network ° ° ° dest Mem P M P NI UserSystem Mem P M P NI UserSystem

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Levels of Network Transaction User Processor stores cmd / msg / data into shared output queue –must still check for output queue full (or make elastic) Communication assists make transaction happen –checking, translation, scheduling, transport, interpretation Effect observed on destination address space and/or events Protocol divided between two layers Network ° ° ° dest Mem P M P NI UserSystem Mem P M P NI

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Example: Intel Paragon

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 User Level Abstraction (Lok Liu) Any user process can post a transaction for any other in protection domain –communication layer moves OQ src –> IQ dest –may involve indirection: VAS src –> VAS dest See, for instance: –“Remote Queues: Exposing Message Queues for Optimization and Atomicity,” Eric A. Brewer, Fredrik T. Chong, Lok T. Liu, Shamik D. Sharma, John D. Kubiatowicz, SPAA 1995 Proc OQ IQ VAS Proc OQ IQ VAS Proc OQ IQ VAS Proc OQ IQ VAS

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Msg Processor Events Dispatcher User Output Queues Send FIFO ~Empty Rcv FIFO ~Full Send DMA Rcv DMA DMA done Compute Processor Kernel System Event

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Basic Implementation Costs: Scalar Cache-to-cache transfer (two 32B lines, quad word ops) –producer: read(miss,S), chk, write(S,WT), write(I,WT),write(S,WT) –consumer: read(miss,S), chk, read(H), read(miss,S), read(H),write(S,WT) to NI FIFO: read status, chk, write,... from NI FIFO: read status, chk, dispatch, read, read,... CP User OQ MP Registers Cache Net FIFO User IQ MPCP Net µs5.4 µs 10.5 µs 7 wds ns + H*40ns

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Virtual DMA -> Virtual DMA Send MP segments into 8K pages and does VA –> PA Recv MP reassembles, does dispatch and VA –> PA per page CP User OQ MP Registers Cache Net FIFO User IQ MP CP Net wds 222 Memory sDMA hdr rDMA MP MB/s 175 MB/s 400 MB/s

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Single Page Transfer Rate Actual Buffer Size: 2048 Effective Buffer Size: 3232

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Msg Processor Assessment Concurrency Intensive –Need to keep inbound flows moving while outbound flows stalled –Large transfers segmented Reduces overhead but adds latency User Output Queues Send FIFO ~Empty Rcv FIFO ~Full Send DMA Rcv DMA DMA done Compute Processor Kernel System Event User Input Queues VAS Dispatcher

Lec /20/08Kubiatowicz CS258 ©UCB Spring 2008 Conclusion Shared Address Space –Request/Response Protocol –Global names for memory locations specify nodes Many different Message-Passing styles –Global Address space: 2-way –Optimistic message passing: 1-way –Conservative transfer: 3-way “Fetch Deadlock” –Request  Response introduces cycle through network –Fix with: »2 networks »dynamic increase in buffer space Network Interfaces –User-level access –DMA –Atomicity