27
Nov. 15 2002 Chung-Hsien Hsu 1 Round Robin with Look Ahead: A New Scheduling Algorithm for Bluetooth Daqing Yang, Gouri Nair, Balaji Sivaramakrishnan, Harishkumar Jayakumar and Arunabha Sen ICPPW’02. 2002 IEEE Speaker: Chung-Hsien Hsu

Nov. 15 2002Chung-Hsien Hsu1 Round Robin with Look Ahead: A New Scheduling Algorithm for Bluetooth Daqing Yang, Gouri Nair, Balaji Sivaramakrishnan, Harishkumar

Embed Size (px)

Citation preview

Nov. 15 2002 Chung-Hsien Hsu 1

Round Robin with Look Ahead: A New Scheduling Algorithm for Bluetooth Daqing Yang, Gouri Nair, Balaji Sivaramakrishnan,

Harishkumar Jayakumar and Arunabha SenICPPW’02. 2002 IEEE

Speaker: Chung-Hsien Hsu

Nov. 15 2002 Chung-Hsien Hsu 2

Outline

Introduction Bin Packing Problem Scheduling Algorithm

– Look Ahead– Look Ahead Round Robin

Simulation Conclusion

Nov. 15 2002 Chung-Hsien Hsu 3

Introduction

SCO: Synchronous Connection Oriented

ACL: Asynchronous Connectionless Links

frame

Nov. 15 2002 Chung-Hsien Hsu 4

Introduction

Objective:– To achieve high channel utilization.

(throughput).

Nov. 15 2002 Chung-Hsien Hsu 5

Bin Packing Problem

Bin Packing Problem:– A set of objects L = { a1,…,an} with a size s(ai)

– A set of bins with a fixed capacity B– Objective:

• To pack the objects ai, 1<=i<=n, into as few bins as possible.

Nov. 15 2002 Chung-Hsien Hsu 6

Bin Packing Problem (cont.)

Off-line bin packing problem:– Have the complete knowledge of all elements

and their sizes.• Efficiently pack the objects in the bins.

Online bin packing problem:– Limited amount of future knowledge.– The scheduling algorithm for Bluetooth

Nov. 15 2002 Chung-Hsien Hsu 7

Bin Packing Problem (cont.)

M

S1 S2

MQ1 ( 5,5,5,5,5) MQ2 ( 1,1,1,1,1)

SQ1 ( 5,5,5,5,5) SQ2 ( 1,1,1,1,1)

CMSQ1 ( 10,10,10,10,10) CMSQ2 ( 2,2,2,2,2)

Bluetooth:

Nov. 15 2002 Chung-Hsien Hsu 8

Bin Packing Problem (cont.)

Supposition:– The number of slots between every SCO slot

pair is 10.• Frame size = 10

• As a bin with capacity 10.

The packets in the CMSQ can be viewed a objects.

Nov. 15 2002 Chung-Hsien Hsu 9

Scheduling Algorithm

Definition:– Asymptotic worst-case performance ratio

The minimum number of bins required to pack list L

The number of bins used by packing list L

Scheduling Algorithm AL = (a1,a2,…,an) : the packets being scheduled by algorithm A

Nov. 15 2002 Chung-Hsien Hsu 10

Scheduling Algorithm (cont.)

Theorem:– For the Round Robin scheduling algorithm A in

Bluetooth, RA = 5/3Proof:Bin sizes: 10Item sizes: 2, 4, 6, 8, 10.The Round Robin algorithm A guaranteed that any neighboring pair of bins packed item sizes at least 12.If OPT(L) = n the packets need to be packed have size at most 10n.A(L) <= 20n/12RA = 5/3

The Round Robin algorithm A compared with any scheduling algorithm B in Bluetooth, A is at most 5/3 worse than B.

Nov. 15 2002 Chung-Hsien Hsu 11

Scheduling Algorithm (cont.)

Look Ahead Look Ahead Round Robin

Nov. 15 2002 Chung-Hsien Hsu 12

Look AheadStep 1: Examine the (Head-Of-the-Line) packets CMSQ1,…CMSQx for all the active slaves in the piconet.

Step 2: Prioritize slaves in order of non-increasing size of their HOL packets in CMSQ (the slave with the largest HOL packet has the highest priority).

Step 3: If possible, schedule the highest priority slave in the current frame.

Step 4: If HOL packet of the highest priority does not fit, search through HOL priority list for highest priority that will fit the current frame.

Step 5: If none fits, wait for the start of a new frame and put the HOL packet in the new frame. Repeat step 1 through 5.

Nov. 15 2002 Chung-Hsien Hsu 13

Look Ahead (cont.)

Drawback – Computational overhead may be unacceptably

high.• If N slaves, it can be computed in O(log N) amount

of computation.

– Starvation.

Nov. 15 2002 Chung-Hsien Hsu 14

Look Ahead Round Robin

Round Robin + Look Ahead.– To avoid the starvation.– To reduce the computational complexity.

Different from RR:– When the current packet does not fit,

the algorithm looks ahead and attempt to schedule a packet from next slave in line.

Nov. 15 2002 Chung-Hsien Hsu 15

Look Ahead Round Robin (cont.)

Step 1: The algorithm will fill the current frame with the HOL packets in a Round Robin fashion, if the HOL packet can fit in the frame.

Step 2: If the HOL packet of the queue being serviced is too large to fit in the current frame, following Round Robin fashion, find the queue whose HOL packet will fit in the current frame. If no such queue exists, wait for the start of a new frame and schedule the HOL packet in the new frame. Repeat steps 1 and 2.

Note:

The information (size of the HOL packet in the slave) may be conveyed to the master by slaves using the unused fields in the header of the immediately preceding packet.

Nov. 15 2002 Chung-Hsien Hsu 16

Look Ahead Round Robin (cont.)

Example 1:Support the number of packets in each queue is n.Queue 1: L1 = (6, 6, 6, 6, 6, …)Queue 2: L2 = (8, 8, 8, 8, 8, …)Queue 3: L3 = (4, 4, 4, 4, 4, …)Queue 4: L4 = (2, 2, 2, 2, 2, …)

Round Robin algorithm : 3n frames.Round Robin with 1-look-ahead algorithm : 2n frames.

Performance comparison ratio: 3/2

Nov. 15 2002 Chung-Hsien Hsu 17

Look Ahead Round Robin (cont.)

Example 2:Support the number of packets in each queue is n.Queue 1: L1 = (6, 6, 6, 6, 6, …)Queue 2: L2 = (6, 6, 6, 6, 6, …)……Queue 2k-1: L2k-1 = (6, 6, 6, 6, 6, …)Queue 2k: L2k = (8, 8, 8, 8, 8, …)Queue 2k+1: L2k+1 = (4, 4, 4, 4, 4, …)Queue 2k+2: L2k+2 = (4, 4, 4, 4, 4, …)……Queue 4k-1: L4k-1 = (4, 4, 4, 4, 4, …)Queue 4k: L4k = (2, 2, 2, 2, 2, …)

Round Robin algorithm : 3kn frames.Round Robin with (2k-1)-look-ahead algorithm : 2kn frames.

Performance comparison ratio: 3/2

Nov. 15 2002 Chung-Hsien Hsu 18

Look Ahead Round Robin (cont.)

Example 3:Support the number of packets in each queue is n.Queue 1: L1 = (6, 6, 6, 6, 6, …)Queue 2: L2 = (6, 6, 6, 6, 6, …)……Queue 2k: L2k = (6, 6, 6, 6, 6, …)Queue 2k+1: L2k+1 = (8, 8, 8, 8, 8, …)Queue 2k+2: L2k+2 = (4, 4, 4, 4, 4, …)Queue 2k+3: L2k+3 = (4, 4, 4, 4, 4, …)……Queue 4k+1: L4k+1 = (4, 4, 4, 4, 4, …)Queue 4k+2: L4k+2 = (2, 2, 2, 2, 2, …)

Round Robin algorithm : (3k+1)n frames.Round Robin with 2k-look-ahead algorithm : (2k+1)n frames.

Performance comparison ratio: (3k+1)/(2k+1)

Nov. 15 2002 Chung-Hsien Hsu 19

Simulation

Special situations– Round Robin with k-look-ahead can reduce the

number of frames by 50% over just Round Robin.

General situations:– Turned to simulation.

Nov. 15 2002 Chung-Hsien Hsu 20

Simulation (cont.)

Environment:– Developed in Java

• Create pseudo-parallel packet generation and scheduling.

• Assume packet arrival at the master and the slaves followed a Poisson process.

• Packet size: 1, 3, 5

• Packet be drawn from a uniform distribution.

Nov. 15 2002 Chung-Hsien Hsu 21

Simulation (cont.) Variables:

– The number of slaves in the piconet.• 1 ~ 7

– Packet arrival rate.• 0.1 ~ 1.0

The simulation was carried out for 1000 units of times.

Each experiment was repeated 500 times to compute average frame savings.

Nov. 15 2002 Chung-Hsien Hsu 22

Simulation (cont.)

Number of Slaves

Average % Savings from RR

LARR

LA

Nov. 15 2002 Chung-Hsien Hsu 23

Simulation (cont.)

Arrival rates

Average % Savings from RR

LARR

LA

Nov. 15 2002 Chung-Hsien Hsu 24

Simulation (cont.)

Arrival rates

Average % Savings from RR

LARR

LA

Nov. 15 2002 Chung-Hsien Hsu 25

Simulation (cont.)

Arrival rates

Average % Savings from RR

LARR

LA

Nov. 15 2002 Chung-Hsien Hsu 26

Conclusion

Present two scheduling algorithms for BT.– Look Ahead algorithm– Look Ahead Round Robin algorithm.

LA and LARR perform significantly better than the RR algorithm.

Nov. 15 2002 Chung-Hsien Hsu 27

Conclusion (cont.)

LARR better than LA– Computational complexity is smaller.– To avoid starvation.

Currently Examining the efficacy of these two algorithms from the power consumption point of view.