Department of Electrical Engineering and Computer Sciences. University of ... An online scheduling algorithm knows about requests that have arrived up to time ...
Base station scheduling of requests with fixed deadlines Mohit Agarwal and Anuj Puri Department of Electrical Engineering and Computer Sciences University of California, Berkeley, CA 94720 Abstract— We consider a packet switched wireless network in which a base station serves the mobiles. The packets for the mobiles arrive at the base station and have to be scheduled for transmission to the mobiles. The capacity of the channel from the base station to the mobiles is varying with time due to fading. We assume the mobiles can obtain different types of service based on the prices they are willing to pay. The objective of the base station is to schedule packets for transmission to mobiles to maximize the revenue earned. Our main result is that a simple greedy algorithm does at least 12 as good as the optimal offline algorithm that knows the complete future request pattern and channel conditions. We also show that no other online algorithm can do better.
I. I NTRODUCTION In this paper we consider a packet switched wireless network in which the base station (BS) serves the mobiles. In current circuit switched wireless networks designed for transmission of speech, a mobile is always served at a constant rate to avoid disruption in the transmission of speech. But in packet switched networks, depending on the application, a packet may be able to tolerate some delay. In wireless networks, the channel from the BS to the mobile is time varying due to fading etc. Hence it may be better for the BS to serve the mobile that has a good channel and delay transmission to the mobile that does not [7], [8], [9], [15], [19]. We assume the channel from the BS to the mobile is slotted in time. The capacity of the channel varies with time due to fading. We assume the BS knows the state of the channel in the current slot. The mobiles can obtain different types of service based on the prices they are willing to pay. The objective of the base station is to schedule packets for transmission to mobiles to maximize the revenue earned. Our main result is that a simple greedy algorithm does at least 12 as good as the optimal offline algorithm that knows the complete future request pattern and channel conditions. We assume that requests for transmission of files to mobiles arrive at the base station. Each request is rk tk ; uk ; dk ; pk ; ek . The request rk arrives at time tk and has a deadline of ek . As part of the request dk amount of data needs to be transmitted to the mobile uk . The mobile is willing to pay price pk per unit of this data transmitted. The capacity of the channel from the BS to the j th mobile during the ith slot is given by ij . The objective of the BS is to schedule transmissions to the mobiles to maximize revenue earned. An online scheduling algorithm knows about requests that have arrived up to time slot t and the channel capacity from the BS to the different mobiles during time slot t. Based on this
(
)
=
Research supported by the Office of Naval Research and National Semiconductor
information, it makes a decision about which request to schedule during the time slot t. An offline algorithm knows about all requests and all channel capacities for all times. Based on all of this information, it decides which request to schedule during time slot t. An online algorithm is realizable; an offline algorithm is not. The performance of an online algorithm is measured with respect to the optimal offline algorithm. We say an online algorithm is -competitive provided it does at most a factor of worse than the optimal offline algorithm. In this paper we study different online algorithms and their performance for the base station scheduling problem. We first show that computing the offline optimal for the base station scheduling problem is NP-hard. We then prove our main result: a simple greedy online algorithm achieves a competitive ratio of 12 . We extend this result in four ways: first we show that in a more general setting when within a time slot there are different sub-carriers available for transmission (as in an OFDM system [20]) and the fading is frequency dependent, the simple greedy algorithm still achieves a competitive ratio of 12 . Next we show that the greedy algorithm achieves a competitive ratio of 1 even when more than one request can be serviced in a single 2 time slot by time multiplexing. This result is further extended to formulations where the total power available for transmission is limited. This result is also found to hold when the price per unit of data decreases with the amount of data served to the request. Such a pricing model is likely to arise in video transmission for example, where base layer and enhancement layer data may be priced differently. We next consider a simpler problem in which the capacity for all time slots and users. We show that in this simpler problem, it is possible to compute the offline optimal in polynomial time. From this offline optimal, we create an online version — the online maximal delay algorithm (OMD) that achieves a competitive ratio of 12 . OMD is then shown to be optimal when all requests are of the same price.
ij
=1
The organization of the paper is as follows. In Section II we discuss related work. In Section III we discuss the problem formulation. In Section IV we discuss the complexity of computing the offline optimal for the base station scheduling problem. In Section V we present the greedy algorithm and its competitive ratio. In Section VI we extend our model to the case in which there are several sub-carriers within a slot and multiple requests may be served within a single slot. Power constrained scheduling and a variant of the pricing model are also considered in this section. In Section VII we discuss the simplified case in which all capacities are equal to one. Section VIII is the conclusion.
II. R ELATED W ORK Resource allocation and its application to online scheduling have been studied extensively in the past. See [11] for a good review of the work that has been done. Here we briefly discuss the work that is most closely related to our present work and point out some of the important differences. A. Some Definitions Scheduling problems generally involve a resource that has to be allocated to requests that arrive over time. The scheduler has to take these time evolving requests as input to compute the schedule. Let R fr0 ; r1 : : : rk g be the request set where request ri arrives at time ti . An online algorithm making a decision at time t only knows about the requests that arrive prior to time t. An offline algorithm is given the whole request set R apriori. An offline algorithm that computes the optimal allocation is called offline optimal. In general the allocation made by an online algorithm are sub optimal compared to the allocation made by offline optimal.
=
B. Bipartite Matching A matching in a graph is defined as a set of edges, no two of which share a node. A bipartite graph is represented as G U; V; E where U and V are two sets of vertices and E is a set of edges between U and V . Scheduling can be seen as an instance of matching in a bipartite graph where one set of nodes represents the set of requests and the other set of nodes represents the resource. We refer to this resource as server slots. An edge is said to exist between a request node rk and a slot node si if rk can be considered for being scheduled in the slot si . Online bipartite matching was first studied by [1]. The objective is to maximize the size of the matching found. It is assumed that all the server slots are known in the beginning while the request nodes and its incident edges are revealed one after another. In [1] a request node is matched to a server node as soon as it is revealed. A weight may be associated with each edge as proposed in [14]. [16] studies a more relevant variant of the problem. In addition to the above constraints they associate an order with the server slots. This order can be seen as imposed by the ordering of discrete time. In each time slot, the scheduler is required to make a decision about matching the current server node to a request node. Once a time slot passes by, the corresponding server slot cannot be allotted to any request. They also require that a request node be revealed before the first time slot that it demands has passed. A request node is not required to be matched as soon as it is revealed and may be matched later as long as above constraints are satisfied. There are some additional constraints particular to base station scheduling problem. Since we allow the server capacity in each slot to be variable, therefore the server slots are not completely known in advance. In case of fixed capacity, however, we can assume that the server slots are known apriori. Further, our request model as described in section III-B is interval based. This means that each request provides a start time and a deadline and it can be scheduled in any slot within this interval. This is an important constraint in the context of the problem. Hence
(
)
the results of [16] do not apply directly to our problem. Due to these additional constraints, we do not use the bipartite matching model in our scheduling problem. C. Online Interval Scheduling As mentioned above, we have assumed an interval based request model. Such a request model has been proposed previously in context of scheduling of continuous media (like audio or video) in [17]. Interval scheduling assumes that each task has to be executed within a precisely given time interval. While [4], [5] study a non preemptive model, [12] studies a model with preemption. The objective function in both the preemptive and non preemptive models is to maximize the total weight of the fully completed tasks. This implies that incomplete tasks don’t earn any revenue. In base station scheduling, preemption is required to honor prior QoS agreements made to users. For, example to fulfill a contract of a minimum bandwidth to one user, preempting another request may be necessary. Moreover, it does not seem to reasonable to have the constraint that only fully completed tasks earn revenue. In our model, the user pays a price per unit of data that it receives rather than based on the requests that were completed. Our work can therefore be seen as an extension of the work done on interval scheduling. D. Base Station Scheduling With the proliferation of wireless data services, base station scheduling has also received attention in the recent past. [7] proposes a channel state dependent scheduling where link quality for different users is tracked to avoid transmission during fades. Fair scheduling has been studied for delay and rate sensitive flows in [8]. They consider bursty channel errors and location dependent channel capacity and propose a modified fair fluid queuing model. [13] presents an architecture for fair queuing based scheduling where the medium access layer, link layer and the network layer are optimized to achieve the desirable QoS using a multirate multipath transparent CDMA based physical layer. Channel tracking and power control have been studied as tools for optimizing throughput and delay performance in CDMA networks [15]. In [10] power requirement is computed for each user based on its QoS requirement using a dynamic programming approach. [9] shows that with a fixed power budget, down link throughput can be maximized by scheduling only one user at a time. We first present a formal model for the base station scheduling problem. In our model each request rk is willing to pay price pk to the base station for servicing the request. The objective of the scheduling algorithm is to maximize the revenue earned. Within this context we focus on comparing the achievable performance of an online algorithm to the offline optimal. We do this for the case when the channel capacity to different users is variable due to fading etc. and the case when the channel capacity remains fixed. These results can be used as theoretical benchmarks against which the performance of other algorithms may be studied.
P
III. P ROBLEM F ORMULATION We consider a system with slotted time as the resource that is to be allocated. Each user is allocated slots to partially or fully serve its request. We have assumed that the base station carries out resource allocation for the downstream channel since it explicitly controls this resource. Further, it is the central location from where all downstream communication takes place. These results can also be applied to the upstream traffic when the mobiles can make their requests known to the base station through a separate channel and the base station then makes an allocation based on these requests. We allow preemption of requests in our model. Further, the pending requests get carried over to the next slot until their deadline expires. So the online scheduler has to decide the allocation among the new requests and the old ones that are pending. Throughout this paper the objective function shall be the revenue earned by an algorithm given a set of requests. A. Slot Model In our model, time is discretized into slots. Each time slot is to be allocated to serve some part of the requests. Since signal quality may vary for different users, the amount of data that can be transferred to each user in a slot is variable. We therefore represent the data capacity of a slot i, for user j as ij . In section V we assume that only one request can be scheduled in a slot. A more generalized variant is then considered in section VI where multiple requests may be scheduled in the slot. We consider both time as well as frequency multiplexing models. A simplified model of the problem is then considered in section VII where the data capacity of each slot ij is fixed. We also assume that the online scheduling algorithm knows the channel condition for each user at that time. This allows us to circumvent the issue of accuracy of channel prediction and focus on the performance that can be achieved when the channel is known perfectly. B. Request Model
denoted as sO . sA denotes the same for algorithm A. i sO is i i i the maximum revenue that can be earned from the request set R given the constraints of the system. We write MkO for the revenue earned by the offline optimal algorithm O from request rk . MkA denotes the revenue earned by algorithm A for request rk . Let M A R denote the total revenue earned by an algorithm A for a request set R. M O R denotes the same for the offline optimal algorithm. Let Ok and Ak denote the set of slots in which O and A schedule the request rk respectively.
( )
D. Performance Criterion We measure the performance of an online algorithm by comparing the total revenue it earns to the revenue earned by the offline optimal [2], [3]. We will say that a (deterministic) online algorithm A is c-competitive against the offline optimal algorithm O if M A R :M O R 1 for all R. Since we compare the revenue of A to the revenue of offline optimal, the competitive ratio c, shall always be less than one. A larger value of c is clearly better.
( )
=
[
IV. T HE O FFLINE O PTIMAL The offline optimal schedule earns the maximum revenue possible when the complete set of requests R as well as the system capacities are known apriori. In this section, we show that if arbitrary fractions of a slot can be allotted to a user, then computing the offline optimal schedule is a linear programming problem. If however, only one user can be scheduled in a slot, the problem is NP complete. A. Computing the Offline Optimal Schedule Let bik be the fraction of a slot i that is alloted to a request . Computing the schedule means finding the optimal values k for bik with the objective function
r
max
X p (i) k
k bik
(1)
iu
subject to constraints
0b
℄
X bb
() [
X
[
℄
)
℄
C. Notation The offline optimal algorithm shall be denoted by O. Consider an algorithm A. The revenue earned by O in the ith slot is
ik
k
k bik
iu
()
℄
ik
ik
()
[
( )
i;k
fr0 ; r1 : : : rn g. A particular reThe set of requests is R quest rk 2 R represents a request made at time tk by a user uk for dk amount of data with a deadline ek . Therefore tk ; ek is the time interval when the request rk may be scheduled. The price that the user is willing to offer per unit data may vary with time. It is denoted by pk i , which is the money that a user is willing to pay per unit data when the base station schedules it in the ith slot. If the base station allocates xik amount of data in the ith slot to rk , then it earns xik pk i from this request in this slot. We assume pk i is a non increasing function of time and is not defined for i 2 = tk ; ek . Alternately, it can be considered zero outside the interval tk ; ek . Thus rk can be denoted as a 5-tuple namely tk ; uk ; dk ; pk ; ek . In this model, the deadline may represent the time by which the user needs to get the data to avoid disruption. A request can be scheduled over several slots within tk ; ek , where each slot serves some part of the data requirement of the request.
(
( )
1 8 i; k = 0 8 i 2= [t ; e ℄ 18i k
d
k
k
(2) (3) (4) (5)
i
Equation (3) is needed since each request can only be scheduled within its time interval. (4) is needed because the fractional allotments of a slot can only add up to 1. (5) is needed since the requests are of finite sizes. This is a linear program which can be solved to obtain bik . Theorem IV.1: If bik are constrained to be integers, then computing the optimal offline schedule is NP-complete. Proof: The reduction is from the partition problem [18]. Recall that in the partition problem we’re given sets S
=
1 Classically, the notion of competitiveness allows for an additive error, namely that M A (R) :M O (R) + b, for some constant b. However, for our scheduling problem, it can be shown that the constant b is zero.
fa ; a ; : : : ; a g and M = (P P a ) The objective is to find this request can generate for the greedy algorithm in this slot is a set K 0 f1; : : : ; ng such that 2 a = M . Determining p (i)minf k ; d U (i)g. Therefore from (6), we have whether such a K 0 exists is NP-complete. s p (i)minf k ; d U (i)g (7) Given the set S , we consider the following base station 1
2
1 2
n
n
i=1
i
i
i
K0
k
scheduling problem. There are two requests r1 and r2 which t2 . Each request has a demand both arrive at times t1 M d1 d2 and the price for each unit of data served in 2 p2 . The deadline for each request is each request is p1 e1 e2 n. The channel capacity in slot i is ij ai for both users j . It is easy to see that a set K 0 exists for the partition problem iff the maximum revenue earned by the offline optimal algorithm is M . Therefore determining the offline optimal schedule is NPhard. In the rest of the paper (except section VI), we only consider the case when a slot can only be alloted to a single user. As shown in section VI-B, this analysis can be carried over to the case of multiple users in the same slot by just sub-slotting the existing slots further.
= =1 = =1
= = = =
V. A NALYSIS
OF THE
=
G REEDY A LGORITHM
The greedy algorithm allocates the current slot greedily to the request that gives the maximum revenue in the present slot. Let sGi denote its revenue in the ith slot. Let us denote the amount of data that has been served by the greedy algorithm to request rk before the slot i as UkG i . Then we have
() s = max [p (i)minf k ; d U (i)g℄ (6) k2 where p (i) = 0 for i 62 [t ; e ℄. k represents the capacity for G i
k
r
R
k
iu
k
k
k
G k
iu
user uk in the ith slot. Let MkG denote the revenue of the greedy algorithm from the request rk . Theorem V.1: For any set of requests R, if the price offered by any user per unit data is non increasing with time i.e. pk i is non increasing for i 2 tk ; ek for all k , then the total revenue generated by the greedy algorithm is atleast half the revenue generated by the offline optimal algorithm. Proof: Consider a partition of the set R into three sets namely R1 ; R2 and R3 . R1 is the set of requests that are not served by optimal at all, i.e, all rk such that Ok is empty. Requests rk where sO sGi 8i 2 Ok belong to the set R2 . Requests rk i where 9i 2 Ok such that sO > sGi belong to the set R3 . i In other words the requests where the revenue earned by the optimal in all the slots where these requests are served is at most equal to the revenue earned by the greedy algorithm in the corresponding slots, belong to R2 . If on the other hand, atleast one slot exists in the allocation made by the optimal algorithm where the revenue in the slot is greater than the revenue earned in the corresponding slot in greedy allocation, then that request belongs to R3 . Consider a request rk 2 R3 . Let i be the first slot in Ok where sOi > sGi. In this slot, the greedy algorithm doesn’t earn a revenue equal to the revenue of the optimal because it has already scheduled some part of the request rk in previous slots. The amount of data that has been served by the greedy algorithm to request rk before the slot i is denoted as UkG i . Now for request rk , dk UkG i data remains to be served at time slot i in the greedy algorithm. Therefore the revenue that
[
()
℄
()
()
iu
G k
k
G i
k
iu
G k
k
The maximum revenue that this request rk can generate in this pk i iuk . slot for any algorithm is pk i iuk . Therefore sO i > sGi we have Since sO i
()
minf k ; d iu
()
U (i)g = d G k
k
U (i) G k
k
(8)
Therefore (7) becomes
U (i)) i:e: s + p (i)U (i) p (i)d s
p (i)(d
G i
k
G i
G k
k
G k
k
k
(9) (10)
k
() () ()
Now since pk i is non increasing in i, therefore the revenue that the greedy has earned from the request rk before slot i is atleast pk i UkG i . Further, MkG , the total revenue that greedy algorithm earns from this request rk is atleast as much as what has already been earned before slot i. Therefore
p (i)U (i)
M
G k
G k
k
(11)
From (10) and (11) we have
s
() ()
+ M p (i)d
G i
G k
k
(12)
k
Let F i denote the revenue that the offline optimal can earn from request rk from slots i; ek (i.e. from slot i onwards). Since pk i is non increasing in i and dk is the maximum data that can be served for this request, O k
[
℄
p (i)d F (i) (13) So for a request r 2 R3 (12) and (13) can be combined to k
O k
k
k
give
s
G i
+ M F (i) G k
O k
(14)
Now for the slots l 2 Ok before i (i.e. l < i), sO sGl since l G > s . Therefore by assumption i is the first slot where sO l l
X
s
G l
2 k
l
X
2 k
O ;li l2O k
X slot(i) l2O k
s : G l
>s
G i
s
+M M G k
O k
(40)
O l
2 k 2 k For requests in H2 , we have l
O
l
M
O k
G l
2 k
G
l
X s 2 k
i
G i
G l
:
s :
(41)
(43)
O i
O ;l>i
G i
l
(45)
O ;l>i
k
have
U (i) < U (i) G k
(46)
minfU (i) + k ; d g minfU (i) + k ; d g (47) Let us denote minfU (i) + k ; d g as d and minfU (i) + O k
k; d iu
k
iu
g as d
G
Z
O
d
O ;l
Z
O ;l
i
kG (i)
U
G
d
O
p (x)dx
G k
R
p (x)dx +
Z
G
d
G k
d
k (i)
U
2 k
l
O k
R GG
X
M +
O
M
O ;l
Xs
M + G k
2 k
l
O k
2 k O
(49)
p (x)dx. k
G l
(51)
i
G l
(52)
O
Xs
i
k
s
These equations can be added for all requests in quests in H2 , we have
M
p (x)
(50)
()
O l
kG (i)
U
G i
G U (i) because MkG 0 k pk x dx and sG i Adding (45) and (50) we get
Xs
(48)
k
0
This trivially implies (44)
G k
k
0
M +s
O l
Z
k
O l
i
2 k
l
k
O
k
p (x)dx
This can be reduced to
l
iu
iu
to make the notation compact. Then we have
0
X s 2 k X s
G k
k
O k
l
Adding these for all the requests, we get the result that the revenue earned in the offline optimal case is less than twice the revenue earned by greedy algorithm. Since we did not use the size of P in the analysis, we can make it arbitrarily small without affecting the competitiveness of greedy algorithm.
G l
2 k 2 k Since s > s and p is non increasing, the greedy algorithm should have already scheduled more of r prior to slot i. So we
2 k
O
:
s
This implies G l
(42)
Xs +Xs
O l
O k
or (41) holds in all the slots where rk is scheduled in the optimal algorithm. In that case we have
Xs
X
s
k
If the first reason holds, we do not need to analyze rk further. If on the other hand, the second reason holds, we consider the previous time slot and find the last subslot in that time slot for > sGi . If we dont find such a subslot, we consider which sO i its previous time slot. On the other hand, if we do find such a subslot, we have to find out which of the two reasons that are stated above causes this. The arguement for each request either ends in case 1 above or when there are no more slots left to be analyzed for this request. Therefore, for every request in H1 , we have either G i
X
l
X
+
G l
In the previous subsections, we have generalized our model to cover situations where multiple requests can be served in the same time slot. Here we go back to the formulation of III-B and consider a variant of the pricing model. The price per unit of data pk is now allowed to be a non increasing function of the total data that has been served to the request. This model for example, can be applicable to layered multimedia data where the user is willing to pay more for the base layer of a particular video file and incrementally lesser for the enhanced layers. Note that now we are considering the original model where only one request can be scheduled in a slot. Theorem VI.2: The revenue of the greedy algorithm is atleast half the optimal when price per unit of data is a non increasing function of the total data served to the request. Proof: We use the same notation as in section V. The partition of (34) and (35) is used. Consider rk 2 H1 . Let i be the last slot in Ok where sO > sGi . Therefore we have i
(39)
This along with the fact that i is the last subslot where sO i gives
X
D. A Variant of the Price Model
G i
:
H1 .
For re(53)
Adding these equations with the ones for H1 , we get
XM
O k
k2
r
R
X
k2
r
M
G k
+
H1
X
k2 2 k
r
R;i
s : G i
(54)
O
This implies that the revenue earned by the optimal algorithm is less than twice the revenue earned by the greedy algorithm. VII. S IMPLIFIED M ODEL In this section we consider the scenario where the capacities for all users in all slots are equal to 1. Recall that the request is a 5-tuple rk tk ; uk ; dk ; pk ; ek . The request arrives at tk , has a deadline of ek , dk being the size of the request. The price the user is willing to pay per unit data is pk . In this section, we assume pk is not a function of time and is a constant. We also assume request sizes to be integral multiples of the capacity. Therefore the case of allotting a slot to multiple requests using time multiplexing does not arise here.
=(
ij
)
A. Offline Optimal Algorithm Let requests be sorted on the basis of their price so that request r0 has the highest price. Consider an offline scheduling algorithm that allots these requests in decreasing order of prices, starting from r0 . Once scheduled, a request may be rescheduled to another slot but may not be preempted. If in the k th iteration, an algorithm ensures that rk is allotted as many slots as possible without preempting any of the previously allocated requests, then it shall generate an optimal schedule. Now we present an algorithm that uses this idea to generate an optimal offline schedule. Let the highest priced request be called r0 . The offline algorithm schedules r0 in the last possible slots while serving it as much as possible. Therefore, r0 is scheduled in slots e0 ; e0 ; : : : maxfe0 d0 ; t0g. Now r1 is similarly scheduled in the last possible slots. However, if there is a collision in slot i, i.e. i has been already allocated to r0 , then this slot is allocated to r1 only if r0 can be rescheduled (adjusted) in some other slot. Otherwise, i remains allocated to r0 while the algofor r1 . This process is then carried out rithm tries out slot i for all the requests. When rk is scheduled, some slots would already be occupied by higher priced requests. So now, the algorithm tries to schedule it in slots starting from ek backwards and each time a collision occurs, it tries to see if the previously scheduled request can be rescheduled. This algorithm can be optimized in several ways. For example if Adjust() routine (shown in figure 2) for slot i returns 0, then it shall return 0 whenever it is run later. So it need not be run for this slot again and again. The pseudo code for this algorithm is shown in Figure 2. We have not introduced any optimization here to keep the flow of the code simple. The pseudo code for Allot() is slightly different from what has been described above. In the pseudo code, if a collision occurs in a slot, then the next slot is tried (in the first while loop). This essentially implies that collision is avoided. However, if despite avoiding all collisions the whole request has not been served, then the algorithm attempts to resolve some of them if possible (in the second while loop). Theorem VII.1: The Algorithm Schedule generates an optimal offline schedule.
1
+1
1
Schedule (Request Set R) // list is the data structure where the schedule is kept Initialize(list); Sort(R,price); //sort the requests based on price for k = 0 to N Allot(rk ); Allot (Request rk ) // Make allotment to a request rk t ek ; size = dk while (size > t tk ) if (list[t] = vacant) then list[t] = rk ; size- -; t- -; else t- -; //collision occurs t ek ; t tk ) while (size > if (list[t] 6 rk Adjust(t) = 1) then list[t] = rk ; size- -; t- -; else t- -;
=
0&
=
0& = &
Adjust(Time t) // Reschedule if possible a request // that has been scheduled at time t rk = list[t]; if (tk < t) then if (list[t-1] = vacant or adjust[t-1] = 1) then list[t-1] = rk ; return 1; else return 0; else return 0; Fig. 2. An Algorithm to Compute the Offline Optimal Schedule.
Theorem VII.2: When capacities are fixed, no deterministic online algorithm p5+1 can have a competitive ratio greater than = where . 2 Proof: This proof can be found in [22]. The main idea is A M (R) to construct an input where the ratio M O (R) = : . The adversary generates an input based on what the algorithm chooses in each step. This is not a tight upper bound on the competitive ratio since no known algorithm achieves this ratio.
1
=
1
0 618
B. Online Maximal Delay Algorithm In this section we present the online version of the algorithm that we had presented in previous section. We call it OMD. We then analyze its competitive ratio and the conditions for its optimality. Let RiOM D be the total set of active requests at time i. Some of these requests may have arrived earlier and have not been fully served yet, while others may be new. All the requests in RiOM D are updated so that their starting time is i and the data requirement dk are modified based on what has already been served to each of the pending requests. The OMD can be made computationally efficient by reusing the schedule that was computed in the previous time slot and making modifications to it so that the new requests can be accommodated. It is also easy to see that the performance of the
OMD (Active Requests RiOM D ) // Compute the schedule for the set // of active requests RiOM D Schedule(RiOM D ); Compactify(RiOM D ); RequestSetUpdate(RiOM D );
r0
0
Compactify (RiOM D ) // If list[t] is vacant, schedule the request // with earliest deadline if (list[i] = vacant) Sort(RiOM D ,deadline); // Let r be the request with earliest deadline list[t] = r;
Xs 2
i
O
( )
OM D O
=P
2 1s
i
S
O i
(57)
OM D i
(58)
OM D i
maxf
(55)
O i
+P2 OM D i i
S2
s
O i
(56)
Since S2 are the slots where the revenue of the offline optimal is atmost equal to the revenue of the OMD,
Xs ;Xs O i
2
i
(59)
i
S1
Combining (58) and (59), we get
Ps i
OM D i
S2
O i
2
Partition the set of slots into two types. Let S1 be the set of slots where the offline optimal earned more than OMD in the corresponding slot. Let S2 be all the remaining slots. Now, the required ratio can be written as
M (R) M (R)
i
X s Xs
i
OM D i
i
S2
Xs 2 X s
D Further, the observation that sO > sOM implies there exists a i i OM D O si gives us unique j > i such that sj
OMD can be improved if after computing the schedule at time slot i, the requests are reordered (instead of compactifying) so that the revenue earned in the next slot is maximized without violating any deadlines. These modifications however do not alter the competitive ratio of the algorithm. Theorem VII.3: The competitive ratio of OMD is 1/2. Proof: In certain slots, the OMD doesn’t schedule a request even though it earns more revenue. This is because OMD is able to schedule it at a later time and tries to incorporate another request in the present slot. Further, a task that has been scheduled for a later time in OMD can only be preempted by a task that earns more revenue in that slot. This is the basis of the key observation that in a slot when the revenue of the offline optimal is more than the revenue of OMD, there exists a slot in future where the revenue of the OMD is more than what the offline D and sOM denote optimal earns in this slot. Therefore, if sO i i the revenue earned by offline optimal and OMD in slot i, then D D sOi > sOM implies there exists j > i such that sOM sOi . i j Moreover, this j is unique for each i. Now, i
O i
i
Fig. 3. Online Maximal Delay Algorithm.
OM D
2
Fig. 4. Input structure for theorem VII.3.
= +1 = = 1
(R) = PPs (R) s
1
r1
RequestSetUpdate (RiOM D ) // Update RiOM D so that start times and // data requirements are modified for all rk 2 RiOM D tk i ; if (list[i] 6 vacant) rj = list[i]; dj dj ; RemoveExpiredRequests();
M M
r2
2
i
S1
S2
O i
g
Xs
OM D i
(60)
i
Therefore, from (56) the competitive ratio of OMD is atleast 1/2. Let us now construct an input for which OMD achieves a ratio of 1/2. That will complete the proof. Consider slots and . Let there be three requests, all of which are for one unit of data. Let . r0 and r1 arrive in slot with prices p0 capacities ij and p1 . Let ! . r0 has a deadline e0 while deadline for r1 is e1 . Request r2 arrives in slot , has a deadline e2 and price p2 . This input structure is shown in figure in comparison to the 4. Here, OMD shall earn a revenue of offline optimal which shall earn 2. Therefore, for this input, the ratio is 1/2. Hence proved that the competitive ratio of OMD is 1/2. Theorem VII.4: OMD is optimal when prices of all requests are equal. Proof: The proof shall be by induction. We show that if the schedule computed by OMD and the offline optimal are same , they will be same at the end of ith slot. up to time slot i Let the offline optimal schedule for R be called O R , which is a mapping from R to the slots. Let OM D R be the schedule for OMD. Let RiOM D denote the set of active requests at beginning of slot i which will be the input to OMD at time i. This was defined in VII-B. Let RiO denote the set of requests that remain at the beginning of time slot i in the offline optimal schedule. If O R is used to allot slots up to time i , then the requests that remain at the beginning of slot i out of R are called RiO . We make two observations about the offline optimal schedule. If the schedule is re computed for these requests RiO , for the slots i; 1 the revenue earned shall be equal to the revenue earned in R for the slots i; 1 . Therefore, if we know the offline , we can compute the whole schedule schedule up to time i
0
=1
=1
=1 0 =1 =1
0
1+
( )
( )
[
℄ ( )
1
[
=
=0 1
1
1
℄
1
( )
by just computing the optimal schedule for request set RiO for time slot i onwards. The second observation is that when the prices of all requests are equal, the order in which the requests are chosen for computing the offline schedule is random. . Since Let O R be equal to OM D R up to time i the prices of all requests are the same, OMD choses the requests randomly out of RiOM D to compute the schedule for ith slot. Since in this case offline optimal also chooses the requests from RiO for scheduling in a random order, let that order be the same as that chosen by OMD. RiO contains several other requests that RiOM D doesn’t contain. But these requests are those that arrive in the future. Therefore, they cannot be scheduled in the ith slot. Since OMD and offline essentially run the same algorithm, the occupancy of the ith slot shall be the same in both the algorithms. However, there could be a possibility that offline doesn’t schedule any request in i whereas OMD schedules one, after the compaction stage. This however shall not make any difference and in fact the offline algorithm could be modified to carry out this compaction. Since this compaction is merely reordering the requests that have been scheduled it will not make any difference to the revenue earned by the offline optimal. Therefore if , they shall remain the schedule are the same up to time i same up to i. Hence proved. Corollary VII.1: OMD is optimal when all tasks are schedulable. Proof: From the above theorem, we can infer that in general the schedule that OMD computes occupies equal number of slots as the schedule computed by offline optimal. This implies that if the set of requests is such that all requests can be scheduled by the offline optimal, then OMD should also be able to occupy the same number of slots. This is possible only if OMD also schedules all the requests. The greedy algorithm that was proposed in the previous section also has a competitive ratio of 1/2 in this simplified model. Even though the OMD has the same competitive ratio, it is preferable over greedy in this simplified model because OMD performs optimally when prices are same as well as when all requests are schedulable.
( )
( )
1
1
R EFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
[11] [12]
[13] [14]
[15]
[16] [17]
VIII. C ONCLUSION
AND
F UTURE W ORK
In this paper we have looked at the base station scheduling problem. Among our main results has been that a simple greedy algorithm can do at least 12 as well as the offline optimal algorithm that needs to know all future channel conditions and requests. We also show that no online algorithm can do better. This is a generalization of the previously obtained results that pertains to non varying channel and fixed size requests [22]. The upper bound on the competitive ratio in the case when channel has a fixed capacity for all users, needs to be made tight. The greedy algorithm does not exploit any statistical correlation that might exist between the channel conditions at different times. Intuitively speaking one should be able to do better by exploiting such correlation. The results in this paper therefore provide useful theoretical benchmarks against which the efficacy of other innovative algorithms may be studied. In future we plan to build simulation models for wireless channels and for applications that use the wireless channels and then compare the performance of our algorithms with other methods.
[18] [19] [20] [21] [22]
R.M. Karp, U.V. Vazirani, V.V. Vazirani, An optimal algorithm for online bipartite matching, In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, pages 352-358, New York, 1990, ACM Press. D. Sleator and R. Tarjan, Amortized efficiency of list update and paging rules, Communications of the ACM, 28:202-208, 1985. A. Karlin, M. Manasse, L. Rudolph and D. Sleator, Competitive snoopy paging, Algorithmica, 3(1):70-119, 1988. R. Lipton and A. Tomkins, Online interval scheduling, Proc. of the 5th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA ’94), pages 302-305, 1994. M. Goldwasser, Patience is a virtue: The effect of slack on competitiveness for admission control, Proc. of the 10th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA ’99), pages 396-405, January 1999. S. Ben-David, A. Borodin, R.M. Karp, G. Tardos and A. Wigderson, On the power of randomization in online algorithms, Algorithmica, 11:2-14, 1994. P. Bhagwat, P. Bhattacharya, A. Krishna and S. Tripathi, Enhancing Throughput over Wireless LANs Using Channel State Dependent Packet Scheduling, INFOCOM, April, 1996. S. Lu, V. Bharghavan and R. Srikant, Fair scheduling in wireless packet networks, IEEE/ACM Transactions on Networking, Vol. 7, No. 4, August 1999. A. Bedekar, Simon C. Borst, K. Ramanan, P.A. Whiting and E.M. Yeh, Downlink scheduling in CDMA data networks, Global Telecommunications Conference, 1999. M. Elaoud, P. Ramanathan, Adaptive allocation of CDMA resources for network level QoS assurances, Proceedings of the sixth annual international conference on Mobile computing and networking, August 6 - 11, 2000, Boston, MA USA. J. Sgall, Online Scheduling - A Survey, In Amos Fiat and Gerhard J. Woeginger, editors, Online Algorithms: The State of the Art, LNCS 1442, pages 196-231, Springer-Verlag, Berlin-Heidelberg-NewYork, 1998. Baruah, S., G. Koren, D. Mao, B. Mishra, A. Raghunathan, L. Rosier, D. Shasha, F. Wang, ”On the Competitiveness of On-Line Real-Time Scheduling, ” Proceedings of the 12th IEEE Real-Time System Symposium, pages 106-115, December 1991. A. Stamoulis G. Giannakis, Packet fair queueing scheduling based on multirate multipath-transparent CDMA for wireless networks, IEEE INFOCOM’2000, vol.3, pages 1067-1076. S. Khuller, S.G. Mitchell and V.V. Vazirani, Online weighted bipartite matching, In Proc. 18th International Colloquium on Automata, Languages and Programming (ICALP), Springer LNCS, Vol. 510, 728–738, 1991. P. Bender, P. Black, M. Grob, R. Padovani, N. Sindhushayana, and A. Viterbi, CDMA/HDR: A bandwidth efficient high speed wireless data service for nomadic users, IEEE Communications Magazine, Volume 38, No.7, July 2000 Marco Riedel, Online matching for scheduling problems, In Proceedings of the 16th Symposium on Theoretical Aspects in Computer Science, LNCS 1563, pages 571–580, 1999. Ramesh Govindan and David P. Anderson. Scheduling and IPC mechanisms for continuous media. In Proc. 13th SOSP., pages 68–80, Asilomar, Pacific Grove, CA, 13 Oct. 1991. Published as ACM. SIGOPS. M. R. Garey and D. S. Johnson. Computers and Intractability. W. H. Freeman, San Francisco, CA, 1979. D. Tse, Multi-User Diversity, Seminar at Dept. of EECS, University of California, Berkeley. R. V. Nee and R. Prasad, OFDM for Wireless Multimedia Communications, Artech House, 2000. C. H. Papadimitriou and K. Steiglitz, Combinatorial Optimization: Algorithms and Complexity, Prentice-Hall, 1982. B. Hajek, On the competitiveness of online scheduling of unit length packets with hard deadlines in slotted time, Conference on Information Sciences and Systems, The John Hopkins University, March 21-23, 2001.