network layer
play

Network layer The Dijkstra Algorithm or Dijkstras Shortest Path - PowerPoint PPT Presentation

IN2140: Introduction to Operating Systems and Data Communication Network layer The Dijkstra Algorithm or Dijkstras Shortest Path First Algorithm Non-Adaptive Routing Shortest Path Routing Non-Adaptive Shortest Path Routing Static


  1. IN2140: Introduction to Operating Systems and Data Communication Network layer The Dijkstra Algorithm or Dijkstra’s Shortest Path First Algorithm

  2. Non-Adaptive Routing Shortest Path Routing

  3. Non-Adaptive Shortest Path Routing § Static Procedure − Network operator generates tables − Tables • Are loaded when IS operation is initiated and • Will not be changed any more § Characteristics • Simple • Good results with relatively consistent topology and traffic − But • Poor performance if traffic volume or topologies change over time University of Oslo IN2140 – Introduction to operating systems and data communication

  4. Non-Adaptive Shortest Path Routing § Spanning Tree and Optimized Route − Information about the entire network has to be available • i. e. application actually as a benchmark comparison § Example − Link is labeled with distance / weight − Node is labeled with distance from source node along best known path (in parentheses) − Find the shortest path from A to D B ( ● ,-) B C C ( ● ,-) 7 2 3 E E ( ● ,-) 2 3 A A D ( ● ,-) D 2 F ( ● ,-) F 1 2 6 2 4 G ( ● ,-) G H ( ● ,-) H University of Oslo IN2140 – Introduction to operating systems and data communication

  5. Non-Adaptive Shortest Path Routing § Procedure: e. g. according to Dijkstra § Find the shortest path from A to D − Labels may be permanent or tentative − Initially, no paths are known • All nodes are labeled with infinity (tentative) − Discover the labels that represent shortest possible path from source to any node − Make those labels permanent 1. Node A labeled as permanent (filled-in circle) 2. Relabel all directly adjacent nodes with the distance to A (path length, nodes adjacent to source) 3. Examine all tentatively labeled nodes, make the node with the smallest label permanent 4. This node will be the new working node for the iterative procedure (i.e., continue with step 2.) University of Oslo IN2140 – Introduction to operating systems and data communication

  6. Non-Adaptive Shortest Path Routing B (2,A) B ( ● ,-) C ( ● ,-) 7 2 3 E ( ● ,-) 2 3 A D ( ● ,-) 2 F ( ● ,-) 1 2 6 2 4 G ( ● ,-) G (6,A) H ( ● ,-) § Procedure: e. g. according to Dijkstra § Find the shortest path from A to D: 1. A flagged as permanent (filled-in circle) 2. Relabel all directly adjacent nodes with the distance to A • (path length, IS adjacent to the source): University of Oslo IN2140 – Introduction to operating systems and data communication

  7. Non-Adaptive Shortest Path Routing B (2,A) C ( ● ,-) 7 2 3 E ( ● ,-) 2 3 A D ( ● ,-) 2 F ( ● ,-) 1 2 6 2 4 G (6,A) H ( ● ,-) § Procedure: e. g. according Dijkstra § Find the shortest path from A to D: − ... 3. Compare all recent, not firmly flagged IS; • flag the one with the lowest number as fixed 4. This IS is the origin of the iterative procedure • (i. e. continue with item 2.) University of Oslo IN2140 – Introduction to operating systems and data communication

  8. Non-Adaptive Shortest Path Routing B (2,A) C (9,B) C ( ● ,-) 7 2 3 E ( ● ,-) E (4,B) 2 3 A D ( ● ,-) 2 F ( ● ,-) 1 2 6 2 4 G (6,A) H ( ● ,-) § Procedure: e.g., according to Dijkstra § Find the shortest path from A to D: 1. Node B has been labeled as permanent (filled-in circle) 2. relabel all directly adjacent nodes with the distance to B (path length, nodes adjacent to source): • A (does not apply, because it is the origin), University of Oslo IN2140 – Introduction to operating systems and data communication

  9. Non-Adaptive Shortest Path Routing B (2,A) C (9,B) 7 2 3 E (4,B) 2 3 A D ( ● ,-) D (10,H) 2 F ( ● ,-) F (6,E) 1 2 6 2 4 G (6,A) G (5,E) H ( ● ,-) H (9,G) H (8,F) § Procedure: e.g., according to Dijkstra § find the shortest path from A to D: 1. … 2. … 3. examine all tentatively labeled nodes; • make the node with the smallest label permanent 4. this node will be the new working node for the iterative procedure ... University of Oslo IN2140 – Introduction to operating systems and data communication

  10. Non-Adaptive Shortest Path Routing § An alternative approach to Dijkstra’s algorithm A B C D E F G H A 0 A 2 A 6 A B B C C 7 B 9 B 4 B 2 3 E E 2 3 E 6 E 5 E A A D D 2 F F 1 2 G 6 2 6 E 9 G 4 G G H H F 9 B 8 F H 9 B 10 H C 10 H University of Oslo IN2140 – Introduction to operating systems and data communication

  11. Non-Adaptive Shortest Path Routing § An alternative approach to Dijkstra’s algorithm A B C D E F G H A 0 A 2 A 6 A B 9 B 4 B E 6 E 5 E G 6 E 9 G F 9 B 8 F H 9 B 10 H C 10 H University of Oslo IN2140 – Introduction to operating systems and data communication

  12. Non-Adaptive Shortest Path Routing § An alternative approach to Dijkstra’s algorithm A B C D E F G H A 0 A 2 A 6 A B B C C B 9 B 4 B E E E 6 E 5 E A A D G 6 E 9 G F F F 9 B 8 F H G H 9 B 10 H C 10 H University of Oslo IN2140 – Introduction to operating systems and data communication

  13. Non-Adaptive Shortest Path Routing § Build individual routing tables from tree Y reaches X through <cell> X A B C D E F G H Y B B C C A B B B B B B B A {C} - B C E E E E E B {D,E,F,G,H} E E {D,F,H} - - C - - - - - C {B,C,D,E,F,G,H} A A D {D,H} - - - D - - - - D F F {G} - - - F E F G F E {D} - - - H - F - H F G H - - - - - - G - G Perform a Depth First Search - - - D - - - H H • leading to this visit sequence C D H F G E B A University of Oslo IN2140 – Introduction to operating systems and data communication

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend