MIP Formulation For Robust Resource Allocation in Dynamic Real-Time Systems
MIP Formulation For Robust Resource Allocation in Dynamic Real-Time Systems
6 8 Y
matrix is assumed to be a linear function of the load level
7
B
on the primary edge of a task, with a positive slope and an
intercept that equals zero.
9 10
11 Z
Worst-case resource sharing model
Given the current load level of a task, the task compu-
source node primary edge sensor and actuator tation and communication latencies can be calculated using
the etcf and etkf matrices. These latencies are called base
communication
sink node non-primary edge primary route
latencies, or the latencies of a task when resources are not
shared. When multiple tasks compete for the same resource,
Figure 1. An example sensor-actuator net- it is assumed that the resource is fairly shared among those
work tasks. Thus, the actual latencies — the latency of a task
when a resource is shared — is calculated as the base la-
independent of the load level of a task. A task starts exe- tency multiplied by the number of tasks competing for that
cution only after it receives data from its primary edge. In resource. This resource sharing model assumes a worst-
the ASDF terminology, the firing rule of a task can be stated case scenario where all tasks attempt to utilize the resource
as: a task fires (starts execution) only when data is received at the same time. Note that the actual latency of a task de-
from the primary edge. pends on both its load level, which can vary due to changes
in the environment, and on the current resource allocation.
Run-time parameter variation This model will be referred to as the worst-case resource
If we allow run-time parameters to vary independently of sharing model throughout the paper.
one another, there will be too many possibilities of the run-
time parameter variations. Thus, we assume that there is Real-time requirements
a run-time parameter, called , which governs the changes In this paper, two types of real-time requirements are
in the load level of all the tasks. During run time, the load considered. A task ai , where ai 2 A, may be associated
level of a task varies according to the changes in and its with a throughput requirement, T HREQi. That is, the out-
initial load level. Mathematically, li = (1 + ) liinit , for put data rate of task ai is required not to be slower than its
all ai 2 A. Note that when the system starts up, is equal throughput requirement, T HREQi . Also, a primary route
to zero, and the current load level of each task is equal to its rk from one sensor to one actuator may be associated with
initial load level. an end-to-end latency requirement, LREQk . That is, the
The changes in the load level of a task are reflected in the time between the sensor sending data out and the actuator
variation of its computation and communication latencies. receiving a message resulting from the processing of that
An estimated-time-to-compute-function matrix, etcf , gives data cannot exceed LREQk . Let LREQ and THREQ be
a computation latency function for each task-machine pair vectors that represent all latency and throughput require-
(ai , ml ) that maps li to an estimated computation time of ments, respectively. Also let R be a set of all primary routes.
ai on ml . The size of the etcf matrix is jAj jMj. For
this study, each entry in the etcf matrix, etcfi;l , is assumed 3.3 Performance Metric for Robustness
to be a linear function of the load level on the primary edge
of task ai , with a positive slope, etcfi;l
a
, and non-negative To avoid early re-allocation, the resource allocation must
intercept, etcfi;l . The slope determines the rate at which
b
be robust with regard to changing conditions of the environ-
the estimated computation latency varies with respect to the ment. One way to measure the robustness of the system is
variation of the load level on the primary edge of the task to vary workload and determine the point at which the sys-
during run time. The intercept determines the CPU time tem violates real-time requirements. As discussed in Sec-
overhead for a task to process the data arriving from its non- tion 3.2, a run-time parameter governs the variations of
primary edges. Because we are interested in those cases all task workload. Thus, the amount that can vary can
x i;l =
0 otherwise
4.2 Normalized Slackness
where ai 2 A and ml 2 M. A task can be allocated to
only one machine. Consequently, for any task ai , there is
Let nsci be the normalized computation slackness of
exactly one xi;l that is equal to 1 for all ml 2 M. Given an
task ai . It is calculated as:
allocation, let nl be the total
P number of tasks that execute
on machine ml , i.e., nl = ai 2A xi;l . c
nsc =1
i
1=T HREQi
i
1=T HREQi
i
ci = x i;l etcf l n
a
i;l i l
ml 2 M
For a route rk 2 R, the normalized slackness is
Assume that communication of a task occurs twice for p
each computation: receiving data from the network, and nsr =1
k
8a 2A
k k
x =1
i;l ; i
c nsc ; 8a 2A
2M i i
c nsk 8a 2A
m
;
l
X i i
x =1
i;l ; 8a i 2A
Figure 2. Mathematical Formulation ml 2M
X
x =n
i;l l ; 8m 2 M l
min nsci ; product of two variables is replaced with one auxiliary vari-
ai 2A able, with additional constraints introduced. The following
min nski g two subsections describe both methods.
ai 2A
It was shown in [6] that the allocation that gives the high- Pre-selection
est value of cmin among all allocations will also result in the To linearize the formulation, the number of tasks allo-
highest value of max . Thus, we can use cmin as the ob- cated onto a machine is pre-selected using a linearization
jective function for maximization, instead of trying to find heuristic. The numbers are specified as a vector N , where
max directly.
nl is the pre-selected number of tasks on machine ml . An
The mathematical formulation of the resource allocation example of a heuristic used to select nl values in a heteroge-
problem is shown in Figure 2. The auxiliary variable c is neous system, called capability-based heuristic (CBH), can
a real number, while xi;l , an entry in X , is either 0 or 1. be found in [5]. This technique will be referred to as the
The objective is to maximize c, but c is limited by the first pre-selection technique throughout the paper.
three constraints corresponding to the normalized slackness The problem can now be formulated using mixed integer
of all tasks and primary routes. The last set of constraints programming, as shown in Figure 3. The main differences
enforces a task to be allocated to only one machine. Af- between Figure 2 and Figure 3 are: i) the N vector is given
ter solving the formulation, the auxiliary variable c will be as an input, and ii) additional constraints (the last set) are
equal to cmin . Furthermore, X will represent a resource al- introduced to force the actual number of tasks on each ma-
location that gives the highest value of cmin and thus the chine to be equal to the pre-selected number. The approach
highest value of max . is called MIP(*), where * is substituted by the name of the
heuristic used to pre-select the nl values. Thus, if CBH is
used to pre-select the nl values for the mixed integer pro-
5 Linearization Techniques gramming formulation (in step 1 of Figure 3), the entire
approach will be called MIP(CBH).
Direct mathematical formulation of the problem shown
in Figure 2 contains non-linear equations. Specifically, to Variable substitution
calculate nsci , nski , and nsrk , two variables
P xi;l and nl are In the pre-selection method, the search space of the lin-
multiplied together. Recall that nl = ai 2A xi;l . In [6], earized MIP formulation is limited to the allocations with
the mathematical formulation is linearized by pre-selecting the actual number of tasks on each machine equal to the pre-
nl value for each machine ml . In this P paper, the variable selected value. This limitation is mathematically described
xi;l is multiplied into the summation ai 2A xi;l . Then the as the last set of constraints shown in Figure 3. The qual-
Figure 4. The average MAIL value of alloca- Figure 5. Execution time of each approach
tions from each approach
7 Conclusion and Future Work [5] S. Gertphol and V. K. Prasanna. Robust resource allo-
cation techniques in dynamic real-time systems. Tech-
This paper developed a variable substitution technique nical report, Department of EE-Systems, University of
to linearize the mixed integer programming (MIP) formu- Southern California, 2003. in preparation.
lation for robust initial resource allocation in dynamic real- [6] S. Gertphol, Y. Yu, S. B. Gundala, V. K. Prasanna,
time systems. It was then compared with an existing lin- S. Ali, J.-K. Kim, A. A. Maciejewski, and H. J. Siegel.
earization technique based on pre-selection. Because the A mixed-integer-programming-based approach for re-
substitution technique does not restrict the search space of source allocation in dynamic real-time systems. Tech-
the MIP formulation, it guarantees to find an optimal allo- nical report, The University of Southern California,
cation. It will also find a feasible allocation, if one exists. 2002, in preparation.
The execution time of the MIP formulation linearized by
the substitution technique is also acceptable for the prob- [7] T. Hegazy and B. Ravindran. Using application ben-
lem of initial resource allocation. On the other hand, the efit for proactive resource allocation in asynchronous
pre-selection technique is fast but limits the search space of real-time distributed systems. IEEE Transactions on
an MIP formulation to allocations with the number of tasks Computers, 51(8):945 – 962, August 2002.
on each machine equal to the pre-selected numbers. Thus,
[8] O. H. Ibarra and C. E. Kim. Heuristic algorithms for
it may provide sub-optimal results and may fail to find ex-
scheduling independent tasks on nonidentical proces-
isting feasible allocations.
sors. Journal of the ACM, 24(2):280–289, Apr. 1977.
The short-coming of the pre-selection technique lies in
the heuristic used to pre-select the number of tasks on each [9] S. Kartik and C. Siva Ram Murthy. Task allocation
machine. The CBH heuristic does not consider real-time algorithms for maximizing reliability of distributed
requirements of the tasks, and thus may generate infeasi- computing systems. IEEE Transactions on Comput-
ble allocations. Heuristics that consider these requirements ers, 46(6):719 – 724, June 1997.
will be developed. Also, the importance of the pre-selected
number on the performance of the resulting allocation has [10] E. A. Lee and T. M. Parks. Dataflow process networks.
been shown in this research. Heuristics that pre-select the Proceedings of the IEEE, 83(5):773–801, May 1995.
optimal or close to optimal number of tasks on each ma- [11] G. L. Nemhauser, A. H. G. Rinnooy Kan, and M. J.
chine will also be considered. Todd, editors. Optimization: Handbooks in Opera-
tions Research and Management Science, volume 1.
References North-Holland, 1989.
[12] D.-T. Peng, K. G. Shin, and T. F. Abdelzaher. As-
[1] S. Ali, J.-K. Kim, H. J. Siegel, A. A. Maciejew- signment and scheduling of communicating periodic
ski, Y. Yu, S. B. Gundala, S. Gertphol, and V. K. tasks in distributed real-time systems. IEEE Transac-
Prasanna. Greedy heuristics for resource allocation in tions on Software Engineering, 23(12):745–758, Dec.
dynamic distributed real-time heterogeneous comput- 1997.
ing systems. In Proceeding of the International Con-
ference on Parallel and Distributed Processing Tech- [13] R. Rajkumar, C. Lee, J. Lehoczky, and D. Siewiorek.
niques and Applications, June 2002. Practical solutions for qos-based resource allocation
problems. In Proceedings of the IEEE Real-Time Sys-
[2] S. Ali, H. J. Siegel, M. Maheswaran, D. Hensgen, and tems Symposium, pages 296–306, December 1998.
S. Ali. Task execution time modeling for heteroge-
neous computing systems. In 9th Heterogeneous Com- [14] J. Santos, E. Ferro, J. Orozco, and R. Cayssials. A
puting Workshop, pages 185–199, May 2000. heuristic approach to the multitask-multiprocessor as-
signment problem using the empty-slots method and
[3] T. Cuatto, C. Passeronge, L. Lavagno, A. Jureska, rate monotonic scheduling. Journal of Real-Time Sys-
A. Damiano, C. Sansoe, and A.L. Sangiovanni- tems, 13(2):167–199, Sep. 1997.
Vincentelli. A case study in embedded system design: