Skip to main content
Log in

Task assignment algorithms for two-type heterogeneous multiprocessors

  • Published:
Real-Time Systems Aims and scope Submit manuscript

Abstract

Consider the problem of assigning implicit-deadline sporadic tasks on a heterogeneous multiprocessor platform comprising two different types of processors—such a platform is referred to as two-type platform. We present two low degree polynomial time-complexity algorithms, SA and SA-P, each providing the following guarantee. For a given two-type platform and a task set, if there exists a task assignment such that tasks can be scheduled to meet deadlines by allowing them to migrate only between processors of the same type (intra-migrative), then (i) using SA, it is guaranteed to find such an assignment where the same restriction on task migration applies but given a platform in which processors are \(1+\frac{\alpha}{2}\) times faster and (ii) SA-P succeeds in finding a task assignment where tasks are not allowed to migrate between processors (non-migrative) but given a platform in which processors are 1+α times faster. The parameter 0<α≤1 is a property of the task set; it is the maximum of all the task utilizations that are no greater than 1.

We evaluate average-case performance of both the algorithms by generating task sets randomly and measuring how much faster processors the algorithms need (which is upper bounded by \(1+\frac{\alpha}{2}\) for SA and 1+α for SA-P) in order to output a feasible task assignment (intra-migrative for SA and non-migrative for SA-P). In our evaluations, for the vast majority of task sets, these algorithms require significantly smaller processor speedup than indicated by their theoretical bounds.

Finally, we consider a special case where no task utilization in the given task set can exceed one and for this case, we (re-)prove the performance guarantees of SA and SA-P.

We show, for both of the algorithms, that changing the adversary from intra-migrative to a more powerful one, namely fully-migrative, in which tasks can migrate between processors of any type, does not deteriorate the performance guarantees. For this special case, we compare the average-case performance of SA-P and a state-of-the-art algorithm by generating task sets randomly. In our evaluations, SA-P outperforms the state-of-the-art by requiring much smaller processor speedup and by running orders of magnitude faster.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Algorithm 1
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. In a heterogeneous multiprocessor, under the assumption that a task cannot execute on multiple processors simultaneously at any time instant (which is stated in Sect. 2), if a task set has a task with all its utilizations greater than one then the task set is infeasible else the task set may be feasible. For example, a task set with a single task whose utilization is greater than 1 on both type-1 and type-2 processors is infeasible on a two-type platform (with any number of processors). As another example, a task set with a single task whose utilization is equal to 1 on type-1 processors and is equal to 2 on type-2 processors is feasible on a two-type platform with at least one processor of type-1 (number of type-2 processors is irrelevant here).

  2. Although the approach presented in Lenstra et al. (1990) can be “adapted” to obtain a solution for the intra-migrative model, it would incur a high time-complexity as it relies on solving a linear program.

  3. Since the work in Raravi et al. (2011) applies only to a special case in which no task utilization in the given task set can exceed one, it is ignored here.

  4. The feasible region of a linear program in n-dimensional space is the region over which all the constraints hold.

  5. The term “fully-migrative” means that (i) different jobs of a task τ i may execute on different processors and also (ii) jobs can migrate from any processor to any other processor during their execution.

  6. For this special case, the algorithm, SA, exhibited a similar average-case performance as discussed in Sect. 9. Hence, we do not discuss it here.

  7. The actual remaining capacity on processor p is given by \(1-\sum_{i: x_{i,p} =1} u_{i,p}\), where u i,p represents the utilization of τ i on processor p (Baruah 2004c). The symbol x i,p represents the indicator variable and the value of 0≤x i,p ≤1 indicates how much fraction of task τ i must be assigned to processor p. The term \(1-\sum_{i: x_{i,p} =1} u_{i,p}\) gives an accurate estimation of the remaining capacity on processor p as it ignores the fractionally assigned tasks on that processor whereas Z is pessimistic since it includes those tasks as well.

References

  • AMD Inc (2013) AMD Accelerated Processing Units. http://fusion.amd.com

  • Anderson J, Srinivasan A (2000) Early-release fair scheduling. In: Proceedings of the 12th euromicro conference on real-time systems, pp 35–43

    Google Scholar 

  • Andersson B, Bletsas K (2008) Sporadic multiprocessor scheduling with few preemptions. In: 20th euromicro conference on real-time systems, pp 243–252

    Google Scholar 

  • Andersson B, Tovar E (2007) Competitive analysis of partitioned scheduling on uniform multiprocessors. In: Proceedings of the 15th international workshop on parallel and distributed real-time systems, pp 1–8

    Google Scholar 

  • Andersson B, Baruah S, Jonsson J (2001) Static-priority scheduling on multiprocessors. In: Proceedings of the 22nd IEEE real-time systems symposium, pp 193–202

    Google Scholar 

  • Apple Inc (2013) Apple A5X: Dual-core CPU and Quad-core GPU. http://www.apple.com/ipad/specs/

  • Baruah S (2004a) Feasibility analysis of preemptive real-time systems upon heterogeneous multiprocessor platforms. In: Proceedings of the 25th IEEE international real-time systems symposium, pp 37–46

    Chapter  Google Scholar 

  • Baruah S (2004b) Partitioning real-time tasks among heterogeneous multiprocessors. In: 33rd international conference on parallel processing, pp 467–474

    Google Scholar 

  • Baruah S (2004c) Task partitioning upon heterogeneous multiprocessor platforms. In: Proceedings of the 10th IEEE international real-time and embedded technology and applications symposium, pp 536–543

    Google Scholar 

  • Baruah S, Fisher N (2007) The partitioned dynamic-priority scheduling of sporadic task systems. Real-Time Syst 36(3):199–226

    Article  MATH  Google Scholar 

  • Chen JJ, Chakraborty S (2011) Resource augmentation bounds for approximate demand bound functions. In: Proceedings of the 32nd IEEE real-time systems symposium, pp 272–281

    Google Scholar 

  • Correa J, Skutella M, Verschae J (2012) The power of preemption on unrelated machines and applications to scheduling orders. Math Oper Res 37(2):379–398

    Article  MathSciNet  MATH  Google Scholar 

  • Darera V, Jenkins L (2006) Utilization bounds for RM scheduling on uniform multiprocessors. In: Proceedings of the 12th IEEE international conference on embedded and real-time computing systems and applications, pp 315–321

    Google Scholar 

  • Davis R, Burns A (2011) A survey of hard real-time scheduling for multiprocessor systems. ACM Comput Surv 43(4):1–44

    Article  Google Scholar 

  • Dertouzos M (1974) Control robotics: the procedural control of physical processes. In: Proceedings of IFIP Congress (IFIP’74)

    Google Scholar 

  • DeVuyst M, Venkat A, Tullsen D (2012) Execution migration in a heterogeneous-ISA chip multiprocessor. In: Proceedings of the seventeenth international conference on architectural support for programming languages and operating systems, pp 261–272

    Chapter  Google Scholar 

  • Garey M, Johnson D (1978) “Strong” NP-Completeness results: motivation, examples, and implications. J ACM 25(3):499–508

    Article  MathSciNet  MATH  Google Scholar 

  • Gurobi Optimization Inc (2012) Gurobi optimizer reference manual. http://www.gurobi.com

  • Horn A (1974) Some simple scheduling algorithms. Nav Res Logist Q 21(1):177–185

    Article  MathSciNet  MATH  Google Scholar 

  • IBM (2012) CPLEX Optimizer: High-performance mathematical programming solver for linear programming, mixed integer programming, and quadratic programming. http://www.ibm.com/software/commerce/optimization/cplex-optimizer

  • Intel Corporation (2013a) Intel Atom Processor. http://www.intel.com/atom

  • Intel Corporation (2013b) Intel Core Processor Family. http://www.intel.com/core

  • Johnson D (1973) Near-optimal bin packing algorithm. PhD thesis, Department of Mathematics, Massachusetts Institute of Technology

  • Korte B, Vygen J (2006) Combinatorial optimization: theory and algorithms, 3rd edn. Springer, Berlin

    Google Scholar 

  • Lenstra J, Shmoys D, Tardos E (1990) Approximation algorithms for scheduling unrelated parallel machines. Math Program 46:259–271

    Article  MathSciNet  MATH  Google Scholar 

  • Levin G, Funk S, Sadowskin C, Pye I, Brandt S (2010) DP-FAIR: a simple model for understanding optimal multiprocessor scheduling. In: Proceedings of the 22nd euromicro conference on real-time systems, pp 3–13

    Google Scholar 

  • Liu CL, Layland JW (1973) Scheduling algorithms for multiprogramming in a hard real-time environment. J ACM 20:46–61

    Article  MathSciNet  MATH  Google Scholar 

  • Luenberger DG, Ye Y (2008) Linear and nonlinear programming. In: International series in operations research & management science, 3rd edn.

    Google Scholar 

  • Nvidia Inc (2013) Tegra 4: Mobility at the speed of life. http://www.nvidia.com/object/tegra.html

  • Papadimitriou C (1994) Computational complexity. Addison-Wesley, Reading

    MATH  Google Scholar 

  • Phillips CA, Stein C, Torng E, Wein J (1997) Optimal time-critical scheduling via resource augmentation. In: Proceedings of the 29th ACM symposium on theory of computing, pp 140–149

    Google Scholar 

  • Potts CN (1985) Analysis of a linear programming heuristic for scheduling unrelated parallel machines. Discrete Appl Math 10:155–164

    Article  MathSciNet  MATH  Google Scholar 

  • Qualcomm Inc (2013) Snapdragon Processors: All-in-one Mobile Processor. http://www.qualcomm.com/snapdragon

  • Raravi G, Andersson B, Bletsas K (2011) Provably good task assignment on heterogeneous multiprocessor platforms for a restricted case but with a stronger adversary. In: SIGBED review, vol 8, pp 19–22

    Google Scholar 

  • Raravi G, Andersson B, Bletsas K (2013) Assigning real-time tasks on heterogeneous multiprocessors with two unrelated types of processors. Real-Time Syst 49(1):29–72

    Article  Google Scholar 

  • Raravi G, Andersson B, Bletsas K, Nélis V (2012) Task assignment algorithms for two-type heterogeneous multiprocessors. In: 24th euromicro conference on real-time systems, pp 34–43

    Google Scholar 

  • Samsung Inc (2013) Exynos 5 OCTA Processor. www.samsung.com/exynos/

  • ST Ericsson (2013) NOVATHOR—Smartphone and Tablet Platforms. http://www.stericsson.com/products/smartphone-platforms.jsp

  • Texas Instruments (2013) OMAP Technologies—OMAP Applications Processors. http://www.ti.com/omap

Download references

Acknowledgements

This work was partially supported by National Funds through FCT (Portuguese Foundation for Science and Technology) and by ERDF (European Regional Development Fund) through COMPETE (Operational Programme ‘Thematic Factors of Competitiveness’), within projects ref. FCOMP-01-0124-FEDER-022701 (CISTER) and ref. FCOMP-01-0124-FEDER-020447 (REGAIN); by National Funds through FCT and by the EU ARTEMIS JU funding, within grant nr. 333053 (CONCERTO); by ERDF, through ON2—North Portugal Regional Operational Programme, under the National Strategic Reference Framework (NSRF), within project ref. NORTE-07-0124-FEDER-000063 (BEST-CASE).

This material is based upon work funded and supported by the Department of Defense under Contract No. FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center.

NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN “AS-IS” BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. This material has been approved for public release and unlimited distribution.

DM-0000080

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gurulingesh Raravi.

Appendix: The hardness of the task assignment problems

Appendix: The hardness of the task assignment problems

In this section, we show that both intra-migrative and non-migrative task assignment problems on a two-type heterogeneous multiprocessors are intractable.

1.1 A.1 Intra-migrative task assignment problem is NP-Complete

In this section, we show that the problem of intra-migrative task assignment on two-type heterogeneous multiprocessor platform is NP-Complete. We denote this problem as HET2-INTRA-ASSIGN and is stated in Fig. 10. In order to show this, we will first consider a restricted version of this problem which is denoted as HET2-INTRA-ASSIGN-SPEC-CASE—see Fig. 11. We will show that this problem is NP-complete. It then follows that the HET2-INTRA-ASSIGN problem is NP-complete as well.

Fig. 10
figure 11

The intra-migrative task assignment problem on a two-type heterogeneous multiprocessor platform

Fig. 11
figure 12

A restricted version of the intra-migrative task assignment problem on a two-type heterogeneous multiprocessor platform

For showing that the HET2-INTRA-ASSIGN-SPEC-CASE problem is NP-Complete, we make use of the PARTITION problem. The PARTITION problem is shown in Fig. 12 and it is well-known that this problem is NP-Complete (Corollary 15.28 in Korte and Vygen 2006, p. 365).

Fig. 12
figure 13

The partitioning problem, which is known to be NP-Complete (Korte and Vygen 2006)

Lemma 6

The HET2-INTRA-ASSIGN-SPEC-CASE problem is NP-Complete.

Proof

In order to show that a problem is NP-Complete, we need to: (1) show that the problem is in NP, (2) transform an NP-Complete problem to the problem under consideration and (3) show that the transformation (of Step (2)) can be done in polynomial time. We now show these for HET2-INTRA-ASSIGN-SPEC-CASE problem.

  1. 1.

    It is straightforward to see that the problem belongs to NP. To show that the problem is in NP, we should be able to verify, in polynomial time, the given certificate for a yes-instance of the problem. As a certificate, we take the assignment on each processor type. To check whether the given assignment in fact satisfies, for all t∈{1,2}: \((\sum_{i:f(i)=t}{u_{i}^{t}} \leq m_{t} ) \wedge (\forall i \in \{1, 2, \ldots, n \} \mbox{ such that } f(i)=t: u_{i}^{t} \leq1 )\), is obviously possible in polynomial time; specifically, the time complexity of this step is O(n).

  2. 2.

    We now transform the PARTITION problem (which is NP-Complete) to the above decision problem. Given an instance \(c_{1}, c_{2}, \ldots, c_{n} \in\mathbb{N}\) of the PARTITION problem, transform it into an instance of HET2-INTRA-ASSIGN-SPEC-CASE problem with n tasks and compute utilizations of tasks as follows:

    $$ \forall\tau_i \in\tau, \forall t \in \{1, 2 \}:\quad u_i^t = \frac{2c_i}{\sum_{k=1}^{n}{c_k}} \in(0, 1] $$
    (44)

    We now show that (intra-migrative) assignment of these n tasks on two processor types is possible if and only if there is a set S⊆{1,2,…,n} such that ∑ jS c j =∑ j∈({1,2,…,n}∖S) c j . We do so by first showing, in (a), some results we will use and then showing, in (b), the implication in one direction and finally showing, in (c), the implication in the other direction.

    1. (a)

      Results we will use:

      1. (a.1)

        It is trivial to see that \((a = b ) \Rightarrow (a = b = \frac{a+b}{2} )\). This gives us:

        $$\begin{aligned} & \biggl(\sum_{j \in S}{c_j} = \sum _{j \in ( \{1, 2, \ldots , n \} \setminus S )}{c_j} \biggr) \\ &\quad\Rightarrow\quad \biggl(\sum_{j \in S}{c_j} = \sum_{j \in ( \{1, 2, \ldots , n \} \setminus S )}{c_j} = \frac{\sum_{j \in \{1, 2, \ldots, n \}}{c_j}}{2} \biggr) \end{aligned}$$
      2. (a.2)

        It is also trivial to see that \(( (a \leq \frac{a+b}{2} ) \wedge (b \leq\frac{a+b}{2} ) ) \Rightarrow (a = b )\). This gives us:

        $$\begin{aligned} & \biggl( \biggl(\sum_{j \in S}{c_j} \leq \frac{\sum_{k=1}^{n}{c_k}}{2} \biggr) \wedge \biggl(\sum_{j \in ( \{1, 2, \ldots, n \} \setminus S )}{c_j} \leq\frac{\sum_{k=1}^{n}{c_k}}{2} \biggr) \biggr) \\ &\quad\Rightarrow\quad \biggl(\sum_{j \in S}{c_j} = \sum_{j \in ( \{1, 2, \ldots , n \} \setminus S )}{c_j} \biggr) \end{aligned}$$
      3. (a.3)

        Let us introduce g that maps an element in {1,2,…,n} to a processor type. It is defined as follows:

        $$\begin{aligned} &i \in S \quad \Leftrightarrow\quad g(i) = 1 \\ &i \in \bigl( \{1, 2, \ldots, n \} \setminus S \bigr)\quad \Leftrightarrow\quad g(i) = 2 \end{aligned}$$
    2. (b)

      Implication in one direction: We now show (using g) that if there is a set S⊆{1,2,…,n} such that ∑ jS c j =∑ j∈({1,2,…,n}∖S) c j then intra-migrative assignment of these n tasks on two processor types is possible.

      We will do so by assuming that the if-condition of (b) is true and then show that this implies that the then-condition of (b) must also be true. We know that ∑ jS c j =∑ j∈({1,2,…,n}∖S) c j . Using (a.1) on this gives us:

      $$\begin{aligned} \sum_{j \in S}{c_j} =& \frac{\sum_{j \in \{1, 2, \ldots, n \}}{c_j}}{2} \\ \sum_{j \in ( \{1, 2, \ldots, n \} \setminus S )}{c_j} =& \frac{\sum_{j \in \{1, 2, \ldots, n \}}{c_j}}{2} \end{aligned}$$

      Multiplying each side by \(\frac{2}{\sum_{k=1}^{n} {c_{k}}}\) and applying the definition of \(u_{i}^{t}\) on the left hand side and using the definition of g gives us:

      $$\begin{aligned} \sum_{j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 1}{u_j^1} =& 1 \\ \sum_{j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 1}{u_j^2} =& 1 \\ \sum_{j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 2}{u_j^1} =& 1 \\ \sum_{j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 2}{u_j^2} =& 1 \end{aligned}$$

      It obviously holds that, for a set of non-negative numbers, each element cannot be greater than the sum of all numbers in the set. Using this observation on the above gives us:

      $$\begin{aligned} &\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 1:\quad u_j^1 \leq1 \\ &\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 1:\quad u_j^2 \leq1 \\ &\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 2:\quad u_j^1 \leq1 \\ &\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 2:\quad u_j^2 \leq1 \end{aligned}$$

      Hence, we have shown that g is an assignment of tasks to processor types that satisfies the constraints stated in HET2-INTRA-ASSIGN-SPEC-CASE problem.

    3. (c)

      Implication in the other direction: We now show (using g) that if intra-migrative assignment of these n tasks on two processor types is possible then there is a set S⊆{1,2,…,n} such that ∑ jS c j =∑ j∈({1,2,…,n}∖S) c j .

      We will do so by assuming that the if-condition of (c) is true and then show that this implies that the then-condition of (c) must also be true. We know that an intra-migrative assignment of these n tasks is possible. Using the function g to express this gives us:

      $$\begin{aligned} & \biggl(\sum_{\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 1} {u_j^1} \leq1 \biggr) \\ &\quad{}\wedge \biggl(\sum_{\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 2} {u_j^2} \leq1 \biggr) \\ &\quad{}\wedge \bigl(\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 1:\quad u_j^1 \leq1 \bigr) \\ &\quad{}\wedge \bigl(\forall j \in \{1, 2, \ldots, n \} \text{ such that } g(j) = 2:\quad u_j^2 \leq1 \bigr) \end{aligned}$$

      Using the definition of \(u_{i}^{t}\) and the mapping g and multiplying each side by \(\frac{\sum_{k=1}^{n} {c_{k}}}{2}\) gives us:

      $$\begin{aligned} & \biggl(\sum_{\forall j \in S} c_j \leq \frac{\sum_{k=1}^{n} {c_k}}{2} \biggr) \\ &\quad{}\wedge \biggl(\sum_{\forall j \in ( \{1, 2, \ldots, n \} \setminus S )} c_j \leq\frac{\sum_{k=1}^{n} {c_k}}{2} \biggr) \\ &\quad{}\wedge \biggl(\forall j \in S: c_j \leq\frac{\sum_{k=1}^{n} {c_k}}{2} \biggr) \\ &\quad{}\wedge \biggl(\forall j \in \bigl( \{1, 2, \ldots, n \} \setminus S \bigr): c_j \leq\frac{\sum_{k=1}^{n} {c_k}}{2} \biggr) \end{aligned}$$

      Observing the first two expressions and using (a.2) gives us:

      $$ \sum_{j \in S}{c_j} = \sum _{j \in ( \{1, 2, \ldots, n \} \setminus S )}{c_j} $$

      This satisfies the constraints of the PARTITION problem.

  3. 3.

    Finally, it can be easily seen that the transformation from PARTITION to HET2-INTRA-ASSIGN-SPEC-CASE using Expression (44) is possible in polynomial time; specifically, the time complexity is O(n).

Hence the proof. □

Theorem 10

The HET2-INTRA-ASSIGN problem is NP-Complete.

Proof

Follows from Lemma 6 and the fact that HET2-INTRA-ASSIGN-SPEC-CASE problem is a restricted form of HET2-INTRA-ASSIGN problem. □

1.2 A.2 Non-migrative task assignment problem is NP-Complete in the strong sense

In this section, we show that the problem of non-migrative task assignment on a two-type heterogeneous multiprocessor platform is NP-Complete in the strong sense. We denote this problem as HET2-NON-ASSIGN and is stated in Fig. 13. In order to show this, we will first consider a restricted version of this problem which is denoted as HET2-NON-ASSIGN-SPEC-CASE—see Fig. 14. We will show that this problem is NP-complete in the strong sense. It then follows that the HET2-NON-ASSIGN problem is NP-complete in the strong sense as well.

Fig. 13
figure 14

The non-migrative task assignment problem on a two-type heterogeneous multiprocessor platform

Fig. 14
figure 15

A restricted version of the non-migrative task assignment problem on a two-type heterogeneous multiprocessor platform

For showing that the HET2-NON-ASSIGN-SPEC-CASE problem is NP-Complete in the strong sense, we make use of the 3-PARTITION problem. The 3-PARTITION problem is shown in Fig. 15 and it is well-known that this problem is NP-Complete in the strong sense (see, e.g., Garey and Johnson 1978).

Fig. 15
figure 16

The 3-partitioning problem, which is known to be NP-Complete in the strong sense (Garey and Johnson 1978)

Lemma 7

The HET2-NON-ASSIGN-SPEC-CASE problem is NP-Complete in the strong sense.

Proof

In order to show that a problem is NP-Complete in the strong sense, we need to: (1) show that the problem is in NP, (2) transform a problem which is NP-Complete in the strong sense to the problem under consideration and (3) show that the transformation (of Step (2)) can be done in polynomial time. We now show these for HET2-NON-ASSIGN-SPEC-CASE problem.

  1. 1.

    It is straightforward to see that the problem belongs to NP. As a certificate, we take the assignment on each processor. To check whether the given assignment in fact satisfies \(\sum_{i:f(i)=j}{u_{i}^{t}} \leq1\) for every processor j∈ type-t of π (where t∈{1,2}) is obviously possible in polynomial time; specifically the time complexity is O(n).

  2. 2.

    We now transform the 3-PARTITION problem (which is NP-Complete in the strong sense) to the above decision problem. Given an instance c 1,c 2,…,c n=3m and B of the 3-PARTITION problem, transform it into an instance of HET2-NON-ASSIGN-SPEC-CASE problem with n=3m tasks by computing utilizations of tasks as follows:

    $$ \forall\tau_i \in\tau, \forall t \in \{1, 2 \}:\quad u_i^t = \frac{c_i}{B} $$
    (45)

    We now show that (non-migrative) assignment of these 3m tasks on m processors is possible if and only if c 1,c 2,…,c n=3m can be partitioned into m subsets I 1,I 2,…,I m such that \(\forall j \in \{1, 2, \ldots, m \}: \sum_{i \in I_{j}}{c_{i}} = B\). We do so by first showing, in (a), some results we will use and then showing, in (b), the implication in one direction and finally showing, in (c), the implication in the other direction.

    1. (a)

      Results we will use:

      1. (a.1)

        Let us introduce g that maps an element in {1,2,…,3m} to a processor. It is defined as follows:

        $$ i \in I_j \quad\Leftrightarrow\quad g(i) = j $$
    2. (b)

      Implication in one direction: We now show (using g) that if c 1,c 2,…,c 3m can be partitioned into m subsets I 1,I 2,…,I m such that \(\forall j \in \{1, 2, \ldots, m \}: \sum_{i \in I_{j}}{c_{i}} = B\) then there is an assignment of these 3m tasks on m processors.

      We will do so by assuming that the if-condition of (b) is true and then show that this implies that the then-condition of (b) must also be true. We know that c 1,c 2,…,c 3m can be partitioned into m subsets I 1,I 2,…,I m such that \(\forall j \in \{1, 2, \ldots, m \}: \sum_{i \in I_{j}}{c_{i}} = B\). Multiplying each side by \(\frac{1}{B}\) and applying the definition of \(u_{i}^{t}\) on the left hand side and using the definition of g gives us:

      $$\begin{aligned} &\forall j \in \{1, 2, \ldots, m \}:\quad \sum_{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} u_i^1 = 1 \\ &\forall j \in \{1, 2, \ldots, m \}:\quad \sum_{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} u_i^2 = 1 \end{aligned}$$

      Hence, we have shown that g is an assignment of tasks to processors that satisfies the constraints stated in HET2-NON-ASSIGN-SPEC-CASE problem.

    3. (c)

      Implication in the other direction: We now show (using g) that if non-migrative assignment of these n tasks on m processors is possible then c 1,c 2,…,c 3m can be partitioned into m subsets I 1,I 2,…,I m such that \(\forall j \in \{1, 2, \ldots, m \}: \sum_{i \in I_{j}}{c_{i}} = B\).

      We will do so by assuming that the if-condition of (c) is true and then show that this implies that the then-condition of (c) must also be true. We know that a non-migrative assignment of these n tasks is possible. Using the function g to express this gives us:

      $$\begin{aligned} &\forall j \in \{1, 2, \ldots, m \}:\quad \biggl(\sum _{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} u_i^1 \leq1 \biggr) \\ &\quad{}\wedge \forall j \in \{1, 2, \ldots, m \}:\quad \biggl(\sum _{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} u_i^2 \leq1 \biggr) \end{aligned}$$

      Since it is a non-migrative assignment, it also holds that (from one of the assumptions of HET2-NON-ASSIGN-SPEC-CASE problem):

      $$ \frac{1}{m} \times \biggl(\sum_{i \in \{1, 2, \ldots, n \}} u_i^1 \biggr) = \frac{1}{m} \times \biggl(\sum _{i \in \{1, 2, \ldots, n \}} u_i^2 \biggr) = 1 $$

      Applying this on the earlier expression gives:

      $$\begin{aligned} &\forall j \in \{1, 2, \ldots, m \}:\quad \biggl(\sum _{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} u_i^1 = 1 \biggr) \\ &\quad{}\wedge \forall j \in \{1, 2, \ldots, m \}:\quad \biggl(\sum _{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} u_i^2 = 1 \biggr) \end{aligned}$$

      Multiply both sides by B and using the definition of \(u_{i}^{t}\) gives us:

      $$\begin{aligned} &\forall j \in \{1, 2, \ldots, m \}:\quad \biggl(\sum _{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} c_i = B \biggr) \\ &\quad{}\wedge \forall j \in \{1, 2, \ldots, m \}:\quad \biggl(\sum _{\forall i \in \{1, 2, \ldots, n \} \text{ such that } g(i)=j} c_i = B \biggr) \end{aligned}$$

      Note that these two expressions state the same thing so only one is needed. Also, we form the partitioning as follows. Let I j be the set of all integers such that i∈{1,2,…,n} and g(i)=j. This gives us:

      $$ \forall j \in \{1, 2, \ldots, m \}:\quad \sum_{\forall i \in I_j} c_i = B $$

      This satisfies the constraints of the 3-PARTITION problem.

  3. 3.

    Finally, it can be easily seen that the transformation from 3-PARTITION to HET2-NON-ASSIGN-SPEC-CASE using Expression (45) is possible in polynomial time; specifically, the time complexity is O(n).

Hence the proof. □

Theorem 11

The HET2-NON-ASSIGN problem is NP-Complete in the strong sense.

Proof

Follows from Lemma 7 and the fact that HET2-NON-ASSIGN-SPEC-CASE problem is a restricted form of HET2-NON-ASSIGN problem. □

Rights and permissions

Reprints and permissions

About this article

Cite this article

Raravi, G., Andersson, B., Nélis, V. et al. Task assignment algorithms for two-type heterogeneous multiprocessors. Real-Time Syst 50, 87–141 (2014). https://doi.org/10.1007/s11241-013-9191-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11241-013-9191-3

Keywords

Navigation