CS252 Graduate Computer Architecture Lecture 24 Network Interface Design Memory Consistency Models Prof John D. Kubiatowicz

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Threads, SMP, and Microkernels
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/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.
Graduate Computer Architecture, Fall 2005 Lecture 10 Distributed Memory Multiprocessors Shih-Hao Hung Computer Science & Information Engineering National.
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
Multiple Processor Systems
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
CSCI 8150 Advanced Computer Architecture Hwang, Chapter 1 Parallel Computer Models 1.2 Multiprocessors and Multicomputers.
Computer Systems/Operating Systems - Class 8
Realizing Programming Models CS 258, Spring 99 David E. Culler Computer Science Division U.C. Berkeley.
ECE669 L20: Evaluation and Message Passing April 13, 2004 ECE 669 Parallel Computer Architecture Lecture 20 Evaluation and Message Passing.
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)
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
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.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
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)
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
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 Lecture 8 Network Interface Design February 20, 2008 Prof John D. Kubiatowicz
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Switching, routing, and flow control in interconnection networks.
Synchronization and Communication in the T3E Multiprocessor.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
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.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster computers –shared memory model ( access nsec) –message passing multiprocessor.
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.
Anshul Kumar, CSE IITD ECE729 : Advanced Computer Architecture Lecture 27, 28: Interconnection Mechanisms In Multiprocessors 29 th, 31 st March, 2010.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
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.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Graduate Computer Architecture I Lecture 11: Distribute Memory Multiprocessors.
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.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
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.
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.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CS 704 Advanced Computer Architecture
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
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
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Ch 17 - Binding Protocol Addresses
John Kubiatowicz Electrical Engineering and Computer Sciences
Chapter 13: I/O Systems.
Presentation transcript:

CS252 Graduate Computer Architecture Lecture 24 Network Interface Design Memory Consistency Models Prof John D. Kubiatowicz

4/27/2009cs252-S09, Lecture 24 2 Message passing Sending of messages under control of programmer –User-level/system level? –Bulk transfers? How efficient is it to send and receive messages? –Speed of memory bus? First-level cache? Communication Model: –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

4/27/2009cs252-S09, Lecture 24 3 Synchronous Message Passing Constrained programming model. Deterministic! What happens when threads added? Destination contention very limited. User/System boundary? Processor Action?

4/27/2009cs252-S09, Lecture 24 4 Asynch. Message Passing: Optimistic More powerful programming model Wildcard receive => non-deterministic Storage required within msg layer?

4/27/2009cs252-S09, Lecture 24 5 Asynch. Msg Passing: Conservative Where is the buffering? Contention control? Receiver initiated protocol? Short message optimizations

4/27/2009cs252-S09, Lecture 24 6 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!

4/27/2009cs252-S09, Lecture 24 7 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

4/27/2009cs252-S09, Lecture 24 8 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

4/27/2009cs252-S09, Lecture 24 9 Spectrum of Designs None: Physical bit stream –blind, physical DMAnCUBE, iPSC,... User/System –User-level portCM-5, *T, Alewife, RAW –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 (???)

4/27/2009cs252-S09, Lecture 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 –receive into system buffer, since no interpretation in user space senderauth dest addr

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture RAW processor: Systolic Computation Very fast support for systolic processing –Streaming from one processor to another »Simple moves into network ports and out of network ports –Static router programmed at same time as processors Also included dynamic network for unpredictable computations (and things like cache misses)

4/27/2009cs252-S09, Lecture 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 

4/27/2009cs252-S09, Lecture J-Machine Each node a small mdg driven processor HW support to queue msgs and dispatch to msg handler task

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture 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

4/27/2009cs252-S09, Lecture Example Queue Topology: Alewife Message-Passing and Shared-Memory both need messages –Thus, can provide both! When deadlock detected, start storing messages to memory (out of hardware) –Remove deadlock by increasing available queue space When network starts flowing again, relaunch queued messages –They take loopback path to be handled by local hardware

4/27/2009cs252-S09, Lecture Natural Extensions of Memory System P 1 Switch Main memory P n (Interleaved) First-level $ P 1 $ Interconnection network $ P n Mem P 1 $ Interconnection network $ P n Mem Shared Cache Centralized Memory Dance Hall, UMA Distributed Memory (NUMA) Scale

4/27/2009cs252-S09, Lecture Sequential Consistency Memory operations from a proc become visible (to itself and others) in program order There exists a total order, consistent with this partial order - i.e., an interleaving –the position at which a write occurs in the hypothetical total order should be the same with respect to all processors Said another way: –For any possible individual run of a program on multiple processors –Should be able to come up with a serial interleaving of all operations that respects »Program Order »Read-after-write orderings (locally and through network) »Also Write-after-read, write-after-write

4/27/2009cs252-S09, Lecture Sequential Consistency Total order achieved by interleaving accesses from different processes –Maintains program order, and memory operations, from all processes, appear to [issue, execute, complete] atomically w.r.t. others –as if there were no caches, and a single memory “A multiprocessor is sequentially consistent if the result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program.” [Lamport, 1979]

4/27/2009cs252-S09, Lecture LD 1 A  5 LD 2 B  7 LD 5 B  2 ST 1 A,6 LD 6 A  6 ST 4 B,21 LD 3 A  6 LD 4 B  21 LD 7 A  6 ST 2 B,13 ST 3 B,4 LD 8 B  4 Sequential Consistency Example LD 1 A  5 LD 2 B  7 ST 1 A,6 … LD 3 A  6 LD 4 B  21 ST 2 B,13 ST 3 B,4 LD 5 B  2 … LD 6 A  6 ST 4 B,21 … LD 7 A  6 … LD 8 B  4 Processor 1Processor 2One Consistent Serial Order

4/27/2009cs252-S09, Lecture Summary 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