Course Exam: Review April 17 (in-Class)
-
Upload
debra-spence -
Category
Documents
-
view
38 -
download
0
description
Transcript of Course Exam: Review April 17 (in-Class)
![Page 1: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/1.jpg)
1COMP680E by M. Hamdi
Course Exam: ReviewApril 17 (in-Class)
![Page 2: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/2.jpg)
2COMP680E by M. Hamdi
Exam Format
• 5 questions – One general question (True or False) – or short
questions.– 4 Calculation-type questions
• Targeted towards topics that are extremely important in Targeted towards topics that are extremely important in the area of networkingthe area of networking
![Page 3: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/3.jpg)
3COMP680E by M. Hamdi
Question 2: Memory Bandwidth Limitations
• Understand the memory bandwidth requirement as a function of the queue placement
• Understand the relationship between queue placement and switch fabric speedup – Input-Queued Switches
– Output-Queued Switches
– Shared-Queued Switches
– Combined I/O Queued Switches
• Is a given architecture feasible for given configuration?
![Page 4: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/4.jpg)
4COMP680E by M. Hamdi
Question 3: Memory Bandwidth Limitations
• Memory-BW (IQ) = 2 R bits/sec
• Memory-BW (OQ) = (N + 1)xR bits/sec
• Memory-BW (SQ) = 2NR Bits/sec
• Memory-BW (CIOQ) = (S + 1)x R bits/sec
• Access time per packet = Packet size / Memory-BW
![Page 5: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/5.jpg)
5COMP680E by M. Hamdi
Example: A Comparison Memory speeds for 32x32 switch
Cell size = 64 bytes
Line Rate MemoryBW
Access TimePer cell
MemoryBW
Access Time
Shared-Memory Input-queued
100 Mb/s 6.4 Gb/s 80 ns 200 Mb/s 2.56 s
1 Gb/s 64 Gb/s 8 ns 2 Gb/s 256 ns
2.5 Gb/s 160 Gb/s 3.2 ns 5 Gb/s 102.4 ns
10 Gb/s 640 Gb/s 0.8 ns 20 Gb/s 25.6 ns
![Page 6: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/6.jpg)
6COMP680E by M. Hamdi
Question 3: Example
• Give you the access time using SRAM and DRAM• Give you a line rate• Give you an architecture and size of switch (e.g., OQ
or CIOQ switch of size 128x128)• Give you size of packets• Find the memory bandwidth required, and the access
time per packet• Can this be feasible using current technology
![Page 7: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/7.jpg)
7COMP680E by M. Hamdi
Question 4: VOQ Switch Scheduling/Arbitration
• The most practical scheduling algorithms are maximal matching algorithms – try to approximate maximum size matching
• These algorithms are based on Request-Grant-Accept scheme
• The Request-Grant-Accept scheme are based on pointer positions at the input and output arbiters
• Understand how iSLIP, FIRM, and RRM
![Page 8: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/8.jpg)
8COMP680E by M. Hamdi
RRM Maximum Size Matching Algorithm: Performance and Properties
• Round Robin Matching (RRM) is easier to implement that PIM (in terms of designing the I/O arbiters).
• The pointers of the arbiters move in straightforward way
• It iterates the following steps until no more requests can be accepted (or for a given number of iterations):
• Request. Each input sends a request to every output for which it has a queued cell.
• Grant. If an output receives any requests, it chooses the one that appears next in a fixed, round-robin schedule starting from the highest priority element. The output notifies each input whether or not its request was granted. The pointer gi to the highest priority element of the round-robin
schedule is incremented (modulo N) to one location beyond the granted input. If no request is received, the pointer stays unchanged.
![Page 9: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/9.jpg)
9COMP680E by M. Hamdi
RRM Maximum Size Matching Algorithm: Performance and Properties
• Accept. If an input receives a grant, it accepts the one that appears next in a fixed, round-robin schedule starting from the highest priority element. The pointer ai to the highest priority
element of the round-robin schedule is incremented (modulo N) to one location beyond the accepted output. If no grant is received, the pointer stays unchanged.
![Page 10: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/10.jpg)
10COMP680E by M. Hamdi
RRM Maximal Matching Algorithm (1)
0
1
2
3
0
1
2
3
Step 1: Request
![Page 11: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/11.jpg)
11COMP680E by M. Hamdi
RRM Maximal Matching Algorithm (2)
0
1
2
3
0
1
2
3
Step 2: Grant
3 02 1
3 02 1
![Page 12: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/12.jpg)
12COMP680E by M. Hamdi
RRM Maximal Matching Algorithm (2)
0
1
2
3
0
1
2
3
Step 2: Grant
3 02 1
3 02 1
![Page 13: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/13.jpg)
13COMP680E by M. Hamdi
RRM Maximal Matching Algorithm (2)
0
1
2
3
0
1
2
3
Step 2: Grant
3 02 1
3 02 1
![Page 14: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/14.jpg)
14COMP680E by M. Hamdi
RRM Maximal Matching Algorithm (2)
0
1
2
3
0
1
2
3
Step 2: Grant
3 02 1
3 02 1
![Page 15: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/15.jpg)
15COMP680E by M. Hamdi
RRM Maximal Matching Algorithm (3)
0 31 2
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
![Page 16: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/16.jpg)
16COMP680E by M. Hamdi
iSLIP Maximum Size Matching Algorithm: Performance and Properties
• It is a scheduler used in most VOQ switches (e.g., Cisco).
• It is exactly like RRM algorithm with the following change:
• Grant. If an output receives any requests, it chooses the one that appears next in a fixed, round-robin schedule starting from the highest priority element. The output notifies each input whether or not its request was granted. The pointer gi to the highest priority element of
the round-robin schedule is incremented (modulo N) to one location beyond the granted input if and only if the grant is accepted in (Accept phase) .
![Page 17: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/17.jpg)
17COMP680E by M. Hamdi
1
2
3
4
1
2
3
4
Step 2: Grant
1
2
3
4
1
2
3
4Step 3: Accept
iSlip: 1st Iteration
4 13 2
4 13 2
1
2
3
4
1
2
3
4
Step 1: Request
1 42 3
4 13 2
Original pointerSelected oneUpdated pointer
iSLIP Maximum Size Matching Algorithm
![Page 18: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/18.jpg)
18COMP680E by M. Hamdi
1
2
3
4
1
2
3
4
Step 2: Grant
1
2
3
4
1
2
3
4Step 3: Accept
iSlip: 2nd Iteration
4 13 2
1
2
3
4
1
2
3
4
Step 1: Request
1 42 3
4 13 2
No change
Original pointerSelected oneUpdated pointer
iSLIP Maximum Size Matching Algorithm
![Page 19: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/19.jpg)
19COMP680E by M. Hamdi
Simple Iterative Algorithms: iSlip
0
1
2
3
0
1
2
3
Step 1: Request
![Page 20: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/20.jpg)
20COMP680E by M. Hamdi
Simple Iterative Algorithms: iSlip
0
1
2
3
0
1
2
3
Step 2: Grant
3 02 1
3 02 1
![Page 21: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/21.jpg)
21COMP680E by M. Hamdi
0
1
2
3
0
1
2
3
Step 2: Grant
3 02 1
3 02 1
Simple Iterative Algorithms: iSlip
![Page 22: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/22.jpg)
22COMP680E by M. Hamdi
0 31 2
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
Simple Iterative Algorithms: iSlip
![Page 23: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/23.jpg)
23COMP680E by M. Hamdi
0 31 2
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
Simple Iterative Algorithms: iSlip
![Page 24: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/24.jpg)
24COMP680E by M. Hamdi
Simple Iterative Algorithms: iSlip
0 31 2
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
![Page 25: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/25.jpg)
25COMP680E by M. Hamdi
Simple Iterative Algorithms: iSlip
0 31 2
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
![Page 26: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/26.jpg)
26COMP680E by M. Hamdi
Simple Iterative Algorithms: iSlip
0 31 2
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
![Page 27: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/27.jpg)
27COMP680E by M. Hamdi
FIRM Maximum Size Matching Algorithm: Performance and Properties
• It is exactly like iSLIP with a very small – yet significant modification.
• Grant (outputs): If an unmatched output receives a request, it grants the one that appears next in a fixed, round-robin schedule starting from the highest priority element. The output notifies each input whether or not its request is granted. The pointer to the highest priority element of the round-robin schedule is incremented beyond the granted input. If input does not accept the pointer is set at the granted one.
![Page 28: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/28.jpg)
28COMP680E by M. Hamdi
0
1
2
3
0
1
2
3
Step 3: Accept
3 02 1
3 02 1
Simple Iterative Algorithms: FIRM
![Page 29: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/29.jpg)
29COMP680E by M. Hamdi
Differences between RRM, iSlip & FIRM
RRM iSlip FIRM
Input Aribiters
No grant unchanged
Granted one location beyond the accepted one
Output
Arbiters
No request unchanged
Grant accepted
one location beyond the granted one
Grant not accepted
one location beyond the previously granted one
unchanged the granted one
![Page 30: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/30.jpg)
30COMP680E by M. Hamdi
Question 4 Example
• You will be given the status of the VOQs, and the position of the pointers, find the scheduling using iSLIP, FIRM or RRM in 2 to 3 time slots
![Page 31: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/31.jpg)
31COMP680E by M. Hamdi
Question 5: Output Scheduling Algorithms for QoS
• We looked at output scheduling algorithms for per flow queueing
• Understand the notion of fairness as defined by max-min fairness
• Understand Weighted Fair Queueing (WFQ) which is the most famous algorithm for fair queueing
– Bit-by-bit WFQ
![Page 32: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/32.jpg)
32COMP680E by M. Hamdi
Max-Min FairnessA common way to allocate flows
N flows share a link of rate C. Flow f wishes to send at rate W(f), and is allocated rate R(f).
1. Pick the flow, f, with the smallest requested rate.
2. If W(f) < C/N, then set R(f) = W(f).
3. If W(f) > C/N, then set R(f) = C/N.
4. Set N = N – 1. C = C – R(f).
5. If N>0 goto 1.
![Page 33: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/33.jpg)
33COMP680E by M. Hamdi
1W(f1) = 0.1
W(f3) = 10R1
C
W(f4) = 5
W(f2) = 0.5
Question 5 Example: Max-Min Fairness
Round 1: Set R(f1) = 0.1
Round 2: Set R(f2) = 0.9/3 = 0.3
Round 3: Set R(f4) = 0.6/2 = 0.3
Round 4: Set R(f3) = 0.3/1 = 0.3
![Page 34: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/34.jpg)
34COMP680E by M. Hamdi
Weighted Bit-by-Bit Fair Queueing
Flows can be allocated different rates by servicing a different number of bits for each flow during each round.
1R(f1) = 0.1
R(f3) = 0.3R1
C
R(f4) = 0.3
R(f2) = 0.3
Order of service for the four queues:… f1, f2, f2, f2, f3, f3, f3, f4, f4, f4, f1,…
![Page 35: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/35.jpg)
35COMP680E by M. Hamdi
Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth, Weights 3:2:2:1
Weights : 3:2:2:1
3
2
2
1
6 5 4 3 2 1 0
B1 = 3
A1 = 4
D2 = 2 D1 = 1
C2 = 1 C1 = 1
Time
3
2
2
1
6 5 4 3 2 1 0
B1 = 3
A1 = 4
D2 = 2 D1 = 1
C2 = 1 C1 = 1
A1A1A1B1
A2 = 2
C3 = 2
Time
Weights : 3:2:2:1
Round 1
3
2
2
1
6 5 4 3 2 1 0
B1 = 3
A1 = 4
D2 = 2 D1 = 1
C2 = 1 C1 = 1
A1A1A1B1
A2 = 2
C3 = 2
D1, C2, C1 Depart at R=1Time
B1C1C2D1
Weights : 3:2:2:1
Round 1
![Page 36: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/36.jpg)
36COMP680E by M. Hamdi
Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth, Weights 3:2:2:1
Weights : 3:2:2:1
3
2
2
1
6 5 4 3 2 1 0
B1 = 3
A1 = 4
D2 = 2 D1 = 1
C2 = 1 C1 = 1
A2 = 2
C3 = 2
B1, A2 A1 Depart at R=2Time
A1A1A1B1B1C1C2D1A1A2A2B1
Round 1Round 2
Weights : 3:2:2:1
3
2
2
1
6 5 4 3 2 1 0
B1 = 3
A1 = 4
D2 = 2 D1 = 1
C2 = 1 C1 = 1
A2 = 2
C3 = 2
D2, C3 Depart at R=2Time
A1A1A1B1B1C1C2D1A1A2A2B1C3C3D2D2
Round 1Round 23
![Page 37: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/37.jpg)
37COMP680E by M. Hamdi
Question 4 Example
• You are given a number of flows. What is the rate allocated for each flow using bit-by-bit WFQ.
• You are given packets in each flow. What is the order of the departure of packets using packet-by-packet WFQ.
![Page 38: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/38.jpg)
38COMP680E by M. Hamdi
RED (Random Early Detection)
• FIFO scheduling• Buffer management:
– Probabilistically discard packets
– Probability is computed as a function of average queue length
Discard Probability
AverageQueue Length
0
1
min_th max_th queue_len
![Page 39: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/39.jpg)
39COMP680E by M. Hamdi
Question 5: Random Early Detection(RED)
![Page 40: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/40.jpg)
40COMP680E by M. Hamdi
RED operationMin threshMax thresh
Average queuelength
minthresh maxthresh
MaxP
1.0
Avg length
P(drop)
![Page 41: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/41.jpg)
41COMP680E by M. Hamdi
Define Two Threshold Values
RED (Random Early Detection)
• FIFO scheduling
Min threshMax thresh
Average queuelength
Make Use of Average Queue LengthCase 1:
Average Queue Length < Min. Thresh ValueAdmit the New Packet
![Page 42: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/42.jpg)
42COMP680E by M. Hamdi
RED (Cont’d)
Min threshMax thresh
Average queuelength
Case 2: Average Queue Length betweenMin. and Max. Threshold Value
p
1-p
Admit the New Packet With Probability p…
p
1-p
Or Drop the New Packet With Probability 1-p
![Page 43: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/43.jpg)
43COMP680E by M. Hamdi
Random Early Detection Algorithm
• ave = (1 – wq)ave + wqq• P = max_P*(avg_len – min_th)/(max_th – min_th)
for each packet arrival: calculate the average queue size ave if ave ≤ minth
do nothing else if minth ≤ ave ≤ maxth
calculate drop probability p drop arriving packet with probability p else if maxth ≤ ave drop the arriving packetdarriving packetd
![Page 44: Course Exam: Review April 17 (in-Class)](https://reader035.fdocuments.us/reader035/viewer/2022070401/56813678550346895d9e06a2/html5/thumbnails/44.jpg)
44COMP680E by M. Hamdi
Question 5 Example
• You are given the status of a queue using RED, and all needed parameter (Max. threshold, Min. threshold, average queue length, etc.)
• For an arriving packet, determine whether the packet will accepted, dropped, or accepted with a certain probability.