Cpr E 458558 RealTime Systems RealTime Networks WAN

  • Slides: 11
Download presentation
Cpr. E 458/558: Real-Time Systems Real-Time Networks – WAN Packet scheduling (contd. ) Cpr.

Cpr. E 458/558: Real-Time Systems Real-Time Networks – WAN Packet scheduling (contd. ) Cpr. E 458/558: Real-Time Systems (G. Manimaran) 1

Work-conserving vs. Non work-conserving • Work conserving scheduler – Never leaves the link idle

Work-conserving vs. Non work-conserving • Work conserving scheduler – Never leaves the link idle if there is a packet to be transmitted – Offers better link utilization – E. g. , RR, WFQ • Non work-conserving scheduler – Associate eligibility time with each packet and transmits packets only when they are eligible – Can provide delay-jitter control, easier implementation – E. g. , HRR Cpr. E 458/558: Real-Time Systems (G. Manimaran) 2

Fair Queuing (FQ) : Byte-by-Byte RR emulation A B C D E 2 7

Fair Queuing (FQ) : Byte-by-Byte RR emulation A B C D E 2 7 12 16 C Finish Time 8 3 8 B 16 D 17 E 18 A 20 1 6 11 15 19 20 4 9 13 17 5 10 14 18 Packet Earliest Finish Time FQ Schedule Cpr. E 458/558: Real-Time Systems (G. Manimaran) Problem: Gives all the flows the same priority 3

Weighted Fair Queuing (WFQ) A (3) B (2) C (1) D (2) E (3)

Weighted Fair Queuing (WFQ) A (3) B (2) C (1) D (2) E (3) 4 5 15 16 A Finish Time 14 6 17 B 16 C 17 D 19 E 20 1 2 3 12 13 14 7 8 18 19 9 10 11 20 Packet Earliest Finish Time WFQ Schedule Cpr. E 458/558: Real-Time Systems (G. Manimaran) 4

Finish time/number expressions (1) • Round Number [ R(t) ]: number of rounds of

Finish time/number expressions (1) • Round Number [ R(t) ]: number of rounds of service a bit-by-bit round-robin scheduler has completed at a given time. – Eg: round number 3. 5 means, three full rounds and fourth round is half-way through • A connection is said to be active if the largest finish number of a packet either in its queue or last served from its queue is larger than the current round number • Thus, the length of a round, that is, the time taken to serve one bit from each active connection, is proportional to the number of active connections Cpr. E 458/558: Real-Time Systems (G. Manimaran) 5

Finish time/number expressions (2) • Finish time for an inactive connection is: – F(i,

Finish time/number expressions (2) • Finish time for an inactive connection is: – F(i, k, t) = R(t) + P(i, k, t) * øi – Where F(i, k, t) is the finish number for the kth packet on connection “i’ – Where, R(t) is the round number – P(i, k, t) is the size of the kth packet that arrives on connection “i” at time “t” – Where øi is the normalized weight ratio of the connection “i”. • Finish time for an active connection is: – F(i, k, t) = F(i, k-1, t) + P(i, k, t) * øi • The general expression for finish time is: – F(i, k, t) = Max ( F(i, k-1, t) , R(t) ) + P(i, k, t) * øi Cpr. E 458/558: Real-Time Systems (G. Manimaran) 6

Hierarchical Round Robin (HRR) • In HRR, there are number of levels, each with

Hierarchical Round Robin (HRR) • In HRR, there are number of levels, each with a fixed number of slots serviced in a round-robin fashion • A channel is allocated a given number of service slots at a selected level • The scheduler cycles through the slots at each level • The time taken to service all the slots at a given level is called the “frame time” at that level • The total link bandwidth is partitioned in among these levels • The key to HRR lies in its ability to give each level a constant share of the link’s bandwidth Cpr. E 458/558: Real-Time Systems (G. Manimaran) 7

Hierarchical Round Robin – contd. • The frame time for level 1, which is

Hierarchical Round Robin – contd. • The frame time for level 1, which is the smallest of all the levels, is the basic cycle time. • If there are n 1 slots in a level 1 frame, then b 1 slots are allocated to higher levels, and the remaining (n 1 – b 1) slots are used for the level 1 connections • The frame time for level-1 = FT 1 = n 1 • The frame time for level-2 = FT 2 = (n 1 / b 1) * n 2 • The frame time for level-I = FTi = (n 1 / b 1) * (n 2 / b 2) * … (ni-1 / bi-1) * ni • Bandwidth allocated to each slot in level i = Link_BW / FTi where Link_BW is the total link bandwidth Cpr. E 458/558: Real-Time Systems (G. Manimaran) 8

HRR design for a 4 Mbps link Level i ni bi FTi n 1

HRR design for a 4 Mbps link Level i ni bi FTi n 1 Slot b/w 1 4 1 Mbps 2 4 1 16 250 Kbps L 2 slot Level 2 3 2 0 32 b 1 Level 1 125 Kbps b 2 L 3 slot Level 3 Cpr. E 458/558: Real-Time Systems (G. Manimaran) 9

HRR – connection allocation example Channel Bandwidth need Level Assigned # of slots C

HRR – connection allocation example Channel Bandwidth need Level Assigned # of slots C 1 2 Mbps 1 2 C 2 1 Mbps 1 1 C 3 250 Kbps 2 1 C 4 500 Kbps 2 2 C 5 125 Kbps 3 1 C 6 100 Kbps 3 1 c 1 c 2 c 3 c 1 c 2 c 4 c 1 n 1 b 1 Level 1 c 1 c 2 Level 2 c 3 b 2 c 4 L 3 Level 3 c 5 c 2 c 4 c 1 c 6 c 2 c 5 HRR Schedule up to 16 slots Cpr. E 458/558: Real-Time Systems (G. Manimaran) 10

Real-Time WAN -- Summary • Qo. S parameters – bandwidth, delay jitter, packet loss

Real-Time WAN -- Summary • Qo. S parameters – bandwidth, delay jitter, packet loss • Traffic types – CBR and VBR • Traffic models – Peak rate model, LBAP • Real-time channel setup – Qo. S routing and Resource reservation • Data transmission phase – Traffic shaping: Leaky bucket, Token bucket – Packet scheduling: RR, WFQ, HRR Cpr. E 458/558: Real-Time Systems (G. Manimaran) 11