1 ee 122: final review ion stoica tas: junda liu, dk moon, david zats ee122/fa09 (materials with...

57
1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats http://inst.eecs.berkeley.edu/~ee12 2/fa09 (Materials with thanks to Vern Paxson, Jennifer

Post on 20-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

1

EE 122: Final Review

Ion Stoica

TAs: Junda Liu, DK Moon, David Zatshttp://inst.eecs.berkeley.edu/~ee122/fa09

(Materials with thanks to Vern Paxson, Jennifer Rexford,and colleagues at UC Berkeley)

Page 2: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Announcements

Project 2 due Friday, Dec 11, 11:59pm

Final exam: Dec 17, 8-11am, 10 Evans Hall

My office hours next week My office hours: MW 10-11:30am The office hours of everyone else unchanged

Page 3: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Final Exam

Open book, open notes! Crib sheets ok if you like

Comprehensive, but greater focus on material since midterm

Questions similar in format to the first midterm Problem set-up descriptions + multipart fill-ins

All answers on the exam sheets we hand out Bring PENCIL, ERASER, no calculators needed

Page 4: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Outline

Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in Chord

Page 5: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing: Persistent Oscillations

Assume link cost = amount of carried traffic

A

D

C

B

0 0

000 0

No traffic

A

D

C

B1 1

000 0

B to A: 1 unit of trafficD to A: 1 unit of traffic

1 1

A

D

C

B1 1+e

e10 0

CA: e units of traffic

1 1

e

Page 6: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing: Persistent Oscillations

Assume link cost = amount of carried traffic

A

D

C

B

1 1+e

e0

e

1 1

0 0

A

D

C

B2+e 0

001+e 1

B to A:cost(BCDA) = 1 lowerthan cost(BA) = 1+e

C to A:cost(CDA) = 1 lowerthan cost(CBA) = 1+2*e

1 1

e

B to A: switches to BCDA

C to A: switches to CDA

Page 7: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing: Persistent Oscillations

Assume link cost = amount of carried traffic

A

D

C

B

2+e 0

00

e

1 1

1+e 1

B to A:cost(BA) = 0 lower thancost(BCDA) = 4+2*eC to A:cost(CBA) = 0 lowerthan cost(CDA) = 3+2*eD to A:cost(DCBA) = 0 lowerthan cost(DA) = 2+e

B to A: switches to BA

C to A: switches to CBA

D to A: switches to DCBA

A

D

C

B0 2+e

1+e10 0

1 1

e

Page 8: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing: Persistent Oscillations

Assume link cost = amount of carried traffic

B to A:cost(BCDA) = 0 lower thancost(BCDA) = 4+2*eC to A:cost(CBA) = 0 lowerthan cost(CDA) = 3+2*eD to A:cost(DCBA) = 0 lowerthan cost(DA) = 2+e

B to A: switches to BCDA

C to A: switches to CDA

D to A: switches to DA

A

D

C

B0 2+e

1+e10 0

1 1

e

A

D

C

B2+e 0

e01+e 1

1 1

e

Page 9: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Outline

Persistent Oscillations TCP Wireless MAC Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in CAN & Chord

Page 10: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

TCP Congestion Control

Flow control keeps one fast sender from overwhelming a slow receiver

Congestion control keeps a set of senders from overloading the network

Three congestion control problems: Adjusting to bottleneck bandwidth

Without any a priori knowledge Could be a Gbps link; could be a modem

Adjusting to variations in bandwidth Sharing bandwidth between flows

Page 11: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

11

The big picture (with timeouts)

Time

cwnd

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

Page 12: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

12

The big picture (with timeouts)

Time

cwnd

SlowStart

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

Page 13: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

13

The big picture (with timeouts)

Time

cwnd

Timeout

SlowStart

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

1/2 cwnd

ssthresh

Page 14: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

14

The big picture (with timeouts)

Time

cwnd

Timeout

SlowStart

1/2 cwnd

ssthresh

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

SlowStart

Page 15: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

15

The big picture (with timeouts)

Time

cwnd

Timeout

SlowStart

AIMD

ssthresh

SlowStart

1/2 cwnd

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

Page 16: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

16

The big picture (with timeouts)

Time

cwnd

Timeout

SlowStart

AIMDTimeout

ssthresh

SlowStart

1/2 cwnd

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

Page 17: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

17

The big picture (with timeouts)

Time

cwnd

Timeout

SlowStart

AIMDTimeout

ssthresh

SlowStart

SlowStart

AIMD

1/2 cwnd

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

Page 18: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

18

The big picture (with timeouts)

Time

cwnd

AIMD

Timeout

SlowStart

AIMD

Initially:cwnd = 1;ssthresh = infinite;

New ack received:if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1;else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd;

Timeout:/* Multiplicative decrease */ssthresh = cwnd/2;cwnd = 1;

AIMD

SlowStart

sstresh

Page 19: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

19

Congestion Detection Revisited

Wait for Retransmission Time Out (RTO) RTO kills throughput

In BSD TCP implementations, RTO is usually more than 500ms The granularity of RTT estimate is 500 ms Retransmission timeout is RTT + 4 * mean_deviation

Solution: Don’t wait for RTO to expire

Page 20: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

20

Fast Retransmits

Resend a segment after 3 duplicate ACKs Duplicate ACK means

that an out-of sequence segment was received

Notes: ACKs are for next

expected packet Packet reordering can

cause duplicate ACKs Window may be too

small to get enough duplicate ACKs

ACK 2

segment 1cwnd = 1

cwnd = 2 segment 2segment 3

ACK 4cwnd = 4 segment 4

segment 5segment 6segment 7

ACK 3

3 duplicateACKs

ACK 4

ACK 4

ACK 4

Page 21: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

21

Fast Retransmit and Fast Recovery

Retransmit after 3 duplicated acks Prevent expensive timeouts

Reduce slow starts At steady state, cwnd oscillates around

the optimal window size

Time

cwnd

Slow Start

AIMD

Fast retransmit

Page 22: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

22

Fast Recovery: After a Fast Retransmit

ssthresh = cwnd / 2 cwnd = ssthresh

Instead of setting cwnd to 1, cut cwnd in half (multiplicative decrease)

For each dup ack arrival dupack++ Indicates packet left network, so we may be able to send more MaxWindow = min(cwnd + dupack, AdvWin)

Receive ack for new data (beyond initial dup ack) dupack = 0 Exit fast recovery

But when RTO expires still do cwnd = 1

Page 23: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Outline

Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in CAN & Chord

Page 24: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Distance Vector Multicast Routing Protocol (DVRMP)

An elegant extension to DV routing Use shortest path DV routes to determine if link

is on the source-rooted spanning tree Three steps in developing DVRMP

Reverse Path Flooding Reverse Path Broadcasting Truncated Reverse Path Broadcasting

Page 25: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Reverse Path Flooding

What: node Y forwards packet from node X to all its neighbors

(except X), iff X is the next hop

of Y to source (A) How: just use unicast

routing tables Why: eliminate the

loops of simple flooding protocol

4

2

10

3

6

89

1

57

A

D

B

C

E

F

G

H

Unicast shortest path

Multicast data packets

Packets not forwarded

Page 26: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Reverse Path Flooding

What: node Y forwards packet from node X to all its neighbors

(except X), iff X is the next hop

of Y to source (A) How: just use unicast

routing tables Why: eliminate the

loops of simple flooding protocol

4

2

10

3

6

89

1

57

A

D

B

C

E

F

G

H

Unicast shortest path

Multicast data packets

Packets not forwarded

Duplicatepacket

Page 27: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Reverse Path Broadcasting

What: node X forwards packet to node Y iff X is next hop of Y to source (A)

How: X infers this info from routing messages (see multicast lecture)

Why: Avoid a router receiving duplicate packets

4

2

10

3

6

89

1

57

A

D

B

C

E

F

G

H

Unicast shortest path

Multicast data packets

Page 28: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Truncated Reverse Broadcasting

What: don’t forward packets to non-members

How: use prune messages

Why: eliminate un-needed forwarding

4

2

10

3

6

89

1

57

A

D

B

C

E

F

G

H

Unicast shortest path

Multicast data packets

Non-membership report

Subscription message

Page 29: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Truncated Reverse Broadcasting

What: don’t forward packets to non-members

How: use prune messages

Why: eliminate un-needed forwarding

4

2

10

3

6

89

1

57

A

D

B

C

E

F

G

H

Unicast shortest path

Multicast data packets

Non-membership report

Subscription message

Page 30: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Pruning Details

Prune (Source,Group) at leaf if no members Send Non-Membership Report (NMR) up tree

If all children of router R send NRM, prune (S,G) Propagate prune for (S,G) to parent R

On timeout: Prune dropped Flow is reinstated Down stream routers re-prune

Note: a soft-state approach

Page 31: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Outline

Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in Chord

Page 32: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Token Bucket and Arrival Curve

Parameters r – average rate, i.e., rate at which tokens fill the bucket b – bucket depth R – maximum link capacity or peak rate (optional parameter)

A bit is transmitted only when there is an available token Arrival curve – maximum number of bits transmitted within an

interval of time of size t

r bps

b bits

<= R bps

regulatortime

bits

b*R/(R-r)

slope R

slope r

Arrival curve

Page 33: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Traffic Enforcement: Example r = 100 Kbps; b = 3 Kb; R = 500 Kbps

3Kb

T = 0 : 1Kb packet arrives

(a)

2.2Kb

T = 2ms : packet transmitted b = 3Kb – 1Kb + 2ms*100Kbps = 2.2Kb

(b)

2.4Kb

T = 4ms : 3Kb packet arrives

(c)

3Kb

T = 10ms : packet needs to wait until enough tokens are in the bucket!

(d)

0.6Kb

T = 16ms : packet transmitted

(e)

Page 34: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Source Traffic Characterization: Arrival Curve

Arrival curve – maximum amount of bits transmitted during any interval of time Δt

Use token bucket to bound arrival curve

Δt

bits

Arrival curve

time

bps

Page 35: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Arrival Curve: Example Arrival curve – maximum amount of bits

transmitted during any interval of time Δt Use token bucket to bound arrival curve

bitsArrival curve

time

bps

0 1 2 3 4 5

1

2

1 2 3 4 5

1

2

3

4

(R=2,b=1,r=1)

Δt

Page 36: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Per-hop Reservation End-host: specify

the arrival rate characterized by token-bucket with parameters (b,r,R) the maximum maximum admissible delay D

Router: allocate bandwidth ra and buffer space Ba such that no packet is dropped no packet experiences a delay larger than D

bits

b*R/(R-r)

slope rArrival curve

DBa

slope ra

Page 37: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Outline

Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated and Differentiated Services Routing in CAN & Chord

Page 38: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Integrated Services

Provide service guarantees at a per-flow granularity

Reservation Protocol How service request gets from host to network

Admission control algorithm How network decides if it can accept flow

Packet scheduling algorithms How routers deliver service

Page 39: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Control Plane: Resource Reservation

SenderReceiver

Page 40: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Control Plane: Resource Reservation

SenderReceiver

Sender sends specificationof traffic profile

Page 41: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Control Plane: Resource Reservation

SenderReceiverPath established (or perhaps admission control denies path)

Page 42: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Control Plane: Resource Reservation

SenderReceiver

The receiver acceptsreservation request

Page 43: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Control Plane: Admission Control

SenderReceiver

Per-flow state(soft state)

Page 44: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

SenderReceiver

Control Plane: Admission Control

Per-flow state on all routers in path

Page 45: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Data Plane

SenderReceiver

Per-flow classification on each router

Page 46: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Data Plane

SenderReceiver

Per-flow classification on each router

Page 47: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Data Plane

SenderReceiver

Per-flow scheduling on each router

Page 48: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Differentiated Services (DiffServ) Give some traffic better treatment than other

App. requirements: interactive vs. bulk transfer Economic arrangements: first-class versus coach

What kind of better service could you give? Fewer drops Lower delay Lower delay variation (jitter)

How to know which packets get better service? Bits in packet header

Deals with traffic in aggregate Provides weaker services But much more scalable

Page 49: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Diffserv Architecture

Ingress routers - entrance to a DiffServ domain Police or shape traffic Set Differentiated Service Code Point (DSCP) in IP header

Core routers Implement Per Hop Behavior (PHB) for each DSCP Process packets based on DSCP

IngressEgress

IngressEgress

DS-1 DS-2

Edge router Core router

Page 50: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Differentiated Services

Expedite Forwarding (EF) Give packet minimal delay and loss service P-bit denotes premium traffic

Assured Forwarding (AS) Packets are all serviced in order

Makes TCP implementations perform well But some packets can be marked as low-drop

Think of it as priority levels for dropping A-bit denotes assured traffic

Page 51: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Comparison to Best-Effort & Intserv

Best-Effort Diffserv Intserv

Service ConnectivityNo isolationNo guarantees

Per aggregate isolationPer aggregate guarantee

Per flow isolationPer flow guarantee

Service scope

End-to-end Domain End-to-end

Complexity No setup Long term setup Per flow steup

Scalability Highly scalable (nodes maintain only routing state)

Scalable(edge routers maintain per aggregate state; core routers per class state)

Not scalable (each router maintains per flow state)

Page 52: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Outline

Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in CAN & Chord

Page 53: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing in CAN

O(d*N1/d) d: dimensions N: number of nodes

Example: route from S to D on a 2-dimensional grid d = 2 N = m x m Path length: 2*m =

2*N1/2

S

D

m

m

Page 54: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing in Chord using Fingers

Finger i at node n:

80 + 2080 + 21

80 + 22

80 + 23

80 + 24

80 + 25

(80 + 26) mod 27 = 160

32

4580

20112

96

i ft[i]0 961 962 963 964 96

5 1126 20

)2(mod2 min

5570

Page 55: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Routing in Chord using Fingers

Route length: O(log N) N: number of nodes

Justification: every hop reduces the distance to destination by at least half

0

32

4580

20112

96

5570

S

D

Page 56: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Recursive vs. Iterative Routing

0

32

4580

20112

96

5570

S

D

0

32

4580

20112

96

5570

S

D

12

3

1

2

3

Recursive Iterative

Page 57: 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats ee122/fa09 (Materials with thanks to Vern Paxson,

Final Exam

Open book, open notes! Crib sheets ok if you like

Comprehensive, but greater focus on material since midterm

Questions similar in format to the first midterm Problem set-up descriptions + multipart fill-ins

All answers on the exam sheets we hand out Bring PENCIL, ERASER, no calculators needed