EE384y: Packet Switch Architectures

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

1 EE384Y: Packet Switch Architectures Part II Load-balanced Switch (Borrowed from Isaac Keslassys Defense Talk) Nick McKeown Professor of Electrical Engineering.
Angstrom Care 培苗社 Quadratic Equation II
AP STUDY SESSION 2.
1
1 Vorlesung Informatik 2 Algorithmen und Datenstrukturen (Parallel Algorithms) Robin Pomplun.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
UNITED NATIONS Shipment Details Report – January 2006.
RXQ Customer Enrollment Using a Registration Agent (RA) Process Flow Diagram (Move-In) Customer Supplier Customer authorizes Enrollment ( )
1 Hyades Command Routing Message flow and data translation.
David Burdett May 11, 2004 Package Binding for WS CDL.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Solve Multi-step Equations
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Outline Minimum Spanning Tree Maximal Flow Algorithm LP formulation 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Artificial Intelligence
Subtraction: Adding UP
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
1 Scheduling Crossbar Switches Who do we chose to traverse the switch in the next time slot? N N 11.
Analyzing Genes and Genomes
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
FIGURE 3-1 Basic parts of a computer. Dale R. Patrick Electricity and Electronics: A Survey, 5e Copyright ©2002 by Pearson Education, Inc. Upper Saddle.
1 Outline  Why Maximal and not Maximum  Definition and properties of Maximal Match  Parallel Iterative Matching (PIM)  iSLIP  Wavefront Arbiter (WFA)
Nick McKeown Spring 2012 Maximum Matching Algorithms EE384x Packet Switch Architectures.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion MSM.
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Maximal.
1 Scheduling Crossbar Switches Who do we chose to traverse the switch in the next time slot? N N 11.
CS 552 Computer Networks IP forwarding Fall 2005 Rich Martin (Slides from D. Culler and N. McKeown)
Packet Scheduling/Arbitration in Virtual Output Queues and Others
Outline Why Maximal and not Maximum
Scheduling Crossbar Switches
Presentation transcript:

EE384y: Packet Switch Architectures Matchings, implementation and heuristics Nick McKeown Professor of Electrical Engineering and Computer Science, Stanford University nickm@stanford.edu www.stanford.edu/~nickm Spring 2004

Outline Finding a maximum match. What algorithms are used in practice? Maximum network flow problems Definitions and example Augmenting paths Maximum size/weight matchings as examples of maximum network flows Maximum size matching Complexity of maximum size matchings and maximum weight matchings What algorithms are used in practice? Maximal Matches Wavefront Arbiter (WFA) Parallel Iterative Matching (PIM) iSLIP Spring 2004

Network Flows a c Source s Sink t b d 10 1 Source s Sink t b d Let G = [V,E] be a directed graph with capacity cap(v,w) on edge [v,w]. A flow is an (integer) function, f, that is chosen for each edge so that We wish to maximize the flow allocation. Spring 2004

A maximum network flow example By inspection 10 1 Source s Sink t b d Step 1: Source s Sink t a c b d 10, 10 10 1 Flow is of size 10 Spring 2004

A maximum network flow example Step 2: a c 10, 10 Source s Sink t 10, 10 1 10, 10 1 10, 1 b d 10, 1 1, 1 Source s Sink t a c b d 10, 10 10, 2 10, 9 1,1 1, 1 Maximum flow: Flow is of size 10+2 = 12 Not obvious Flow is of size 10+1 = 11 Spring 2004

Ford-Fulkerson method of augmenting paths Set f(v,w) = -f(w,v) on all edges. Define a Residual Graph, R, in which res(v,w) = cap(v,w) – f(v,w) Find paths from s to t for which there is positive residue. Increase the flow along the paths to augment them by the minimum residue along the path. Keep augmenting paths until there are no more to augment. Spring 2004

Example of Residual Graph c 10, 10 10, 10 1 s 10, 10 t 1 10 10 b d 1 Flow is of size 10 Residual Graph, R res(v,w) = cap(v,w) – f(v,w) a c 10 10 10 1 s t 1 10 10 b d 1 Augmenting path Spring 2004

Example of Residual Graph Step 2: a c 10, 10 s t 10, 10 1 10, 10 1 10, 1 b d 10, 1 1, 1 Flow is of size 10+1 = 11 Residual Graph a c 10 s t 10 10 1 1 1 1 b d 1 9 9 Spring 2004

Example of Residual Graph Step 3: a c 10, 9 s t 10, 10 1, 1 10, 10 1, 1 10, 2 b d 10, 2 1, 1 Flow is of size 10+2 = 12 1 Residual Graph a c 9 s t 10 10 1 1 2 2 b d 1 8 8 Spring 2004

Complexity of network flow problems In general, it is possible to find a solution by considering at most |V|.|E| paths, by picking shortest augmenting path first. There are many variations, such as picking most augmenting path first. Spring 2004

Outline Finding a maximum match. What algorithms are used in practice? Maximum network flow problems Definitions and example Augmenting paths Maximum size/weight matchings as examples of maximum network flows Maximum size matching Complexity of maximum size matchings and maximum weight matchings What algorithms are used in practice? Maximal Matches Wavefront Arbiter (WFA) Parallel Iterative Matching (PIM) iSLIP Spring 2004

Finding a maximum size match B C D E F 1 2 3 4 5 6 How do we find the maximum size (weight) match? Spring 2004

Network flows and bipartite matching 1 B 2 Sink t Source s C 3 D 4 E 5 F 6 Finding a maximum size bipartite matching is equivalent to solving a network flow problem with capacities and flows of size 1. Spring 2004

Network flows and bipartite matching Ford-Fulkerson method Residual Graph for first three paths: A 1 B 2 t s C 3 D 4 E 5 F 6 Spring 2004

Network flows and bipartite matching Residual Graph for next two paths: A 1 B 2 t s C 3 D 4 E 5 F 6 Spring 2004

Network flows and bipartite matching Residual Graph for augmenting path: A 1 B 2 t s C 3 D 4 E 5 F 6 Spring 2004

Network flows and bipartite matching Residual Graph for last augmenting path: A 1 B 2 t s C 3 D 4 E 5 F 6 Note that the path augments the match: no input and output is removed from the match during the augmenting step. Spring 2004

Network flows and bipartite matching Maximum flow graph: A 1 B 2 t s C 3 D 4 E 5 F 6 Spring 2004

Network flows and bipartite matching Maximum Size Matching: A 1 B 2 C 3 D 4 E 5 F 6 Spring 2004

Complexity of Maximum Matchings Maximum Size Matchings: Algorithm by Dinic O(N5/2) Maximum Weight Matchings Algorithm by Kuhn O(N3) In general: Hard to implement in hardware Slooooow. Spring 2004

Outline Finding a maximum match. What algorithms are used in practice? Maximum network flow problems Definitions and example Augmenting paths Maximum size/weight matchings as examples of maximum network flows Maximum size matching Complexity of maximum size matchings and maximum weight matchings What algorithms are used in practice? Maximal Matches Wavefront Arbiter (WFA) Parallel Iterative Matching (PIM) iSLIP Spring 2004

Maximal Matching A maximal matching is one in which each edge is added one at a time, and is not later removed from the matching. i.e. no augmenting paths allowed (they remove edges added earlier). No input and output are left unnecessarily idle. Spring 2004

Example of Maximal Size Matching B C D E F 1 2 3 4 5 6 A 1 B C D E F 2 3 4 5 6 A 1 B C D E F 2 3 4 5 6 Maximal Size Matching Maximum Size Matching Spring 2004

Maximal Matchings In general, maximal matching is simpler to implement, and has a faster running time. A maximal size matching is at least half the size of a maximum size matching. A maximal weight matching is defined in the obvious way. A maximal weight matching is at least half the weight of a maximum weight matching. Spring 2004

Outline Finding a maximum match. What algorithms are used in practice? Maximum network flow problems Definitions and example Augmenting paths Maximum size/weight matchings as examples of maximum network flows Maximum size matching Complexity of maximum size matchings and maximum weight matchings What algorithms are used in practice? Maximal Matches Wavefront Arbiter (WFA) Parallel Iterative Matching (PIM) iSLIP Spring 2004

Wave Front Arbiter (Tamir) Requests Match 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 Spring 2004

Wave Front Arbiter Requests Match Spring 2004

Wave Front Arbiter Implementation Simple combinational logic blocks 1,1 1,2 1,3 1,4 2,1 2,2 2,3 2,4 3,1 3,2 3,3 3,4 4,1 4,2 4,3 4,4 Spring 2004

Wave Front Arbiter Wrapped WFA (WWFA) N steps instead of 2N-1 Requests Match Spring 2004

Wavefront Arbiters Properties Feed-forward (i.e. non-iterative) design lends itself to pipelining. Always finds maximal match. Usually requires mechanism to prevent Q11 from getting preferential service. In principle, can be distributed over multiple chips. Spring 2004

Outline Finding a maximum match. What algorithms are used in practice? Maximum network flow problems Definitions and example Augmenting paths Maximum size/weight matchings as examples of maximum network flows Maximum size matching Complexity of maximum size matchings and maximum weight matchings What algorithms are used in practice? Maximal Matches Wavefront Arbiter (WFA) Parallel Iterative Matching (PIM) iSLIP Spring 2004

Parallel Iterative Matching 1 2 3 4 #1 #2 Iteration: uar selection uar selection 1 2 3 4 1 2 3 4 f2: Grant 1 2 3 4 f3: Accept/Match f1: Requests 1 2 3 4 1 2 3 4 Spring 2004

PIM Properties Guaranteed to find a maximal match in at most N iterations. In each phase, each input and output arbiter can make decisions independently. In general, will converge to a maximal match in < N iterations. How many iterations should we run? Spring 2004

Parallel Iterative Matching Convergence Time Number of iterations to converge: Spring 2004

Parallel Iterative Matching Spring 2004

Parallel Iterative Matching PIM with a single iteration Spring 2004

Parallel Iterative Matching PIM with 4 iterations Spring 2004

Outline Finding a maximum match. What algorithms are used in practice? Maximum network flow problems Definitions and example Augmenting paths Maximum size/weight matchings as examples of maximum network flows Maximum size matching Complexity of maximum size matchings and maximum weight matchings What algorithms are used in practice? Maximal Matches Wavefront Arbiter (WFA) Parallel Iterative Matching (PIM) iSLIP Spring 2004

iSLIP 1 2 3 4 F2: Grant 1 2 3 4 1 2 3 4 F3: Accept/Match 1 2 3 4 #1 #2 F1: Requests 1 2 3 4 1 2 3 4 Spring 2004

iSLIP Operation Grant phase: Each output selects the requesting input at the pointer, or the next input in round-robin order. It only updates its pointer if the grant is accepted. Accept phase: Each input selects the granting output at the pointer, or the next output in round-robin order. Consequence: Under high load, grant pointers tend to move to unique values. Spring 2004

iSLIP Properties Random under low load TDM under high load Lowest priority to MRU 1 iteration: fair to outputs Converges in at most N iterations. (On average, simulations suggest < log2N) Implementation: N priority encoders 100% throughput for uniform i.i.d. traffic. But…some pathological patterns can lead to low throughput. Spring 2004

iSLIP Spring 2004

iSLIP Spring 2004

iSLIP Implementation Programmable Priority Encoder State Decision 1 1 log2N Decision Grant Accept 2 2 N Grant Accept log2N N N N Grant Accept log2N Spring 2004

Maximal Matches Maximal matching algorithms are widely used in industry (PIM, iSLIP, WFA and others). PIM and iSLIP are rarely run to completion (i.e. they are sub-maximal). We will see shortly that a maximal match with a speedup of 2 is stable for non-uniform traffic. Spring 2004