Jump to content

Identical-machines scheduling

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Erel Segal (talk | contribs) at 21:07, 19 June 2021 (Created page with ''''Identical machine scheduling''' is an optimization problem in computer science and operations research. We are given ''n'' job...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Identical machine scheduling is an optimization problem in computer science and operations research. We are given n jobs J1, J2, ..., Jn of varying processing times, which need to be scheduled on m identical machines, such that a certain objective function is optimized, for example, the makespan is minimized.

Identical machine scheduling is a special case of uniform machine scheduling, which is itself a special case of optimal job scheduling. In the general case, the processing time of each job may be different on different machines; in the case of identical machine scheduling, the processing time of each job is the same on each machine. Therefore, identical machine scheduling is equivalent to multiway number partitioning.

In the standard three-field notation for optimal job scheduling problems, the identical-machines variant is denoted by P in the first field. For example, " P||" is an identical machine scheduling problem with no constraints, where the goal is to minimize the maximum completion time.

This problem is also a special case of the multiway number partitioning problem. In both problems, the goal is to partition numbers into subsets with nearly-equal sum; identical machine scheduling is a special case in which the objective is to minimize the largest sum. Many algorithms for multiway number partitioning, both exact and approximate, can be used to attain this objective.

In the standard three-field notation for optimal job scheduling problems, the identical-machines variant is denoted by P in the first field. For example, " P||☃☃" is an identical machine scheduling problem with no constraints, where the goal is to minimize the maximum completion time. In some variants of the problem, instead of minimizing the maximum completion time, it is desired to minimize the average completion time (averaged over all n jobs); it is denoted by Q||. More generally, when some jobs are more important than others, it may be desired to minimize a weighted average of the completion time, where each job has a different weight. This is denoted by Q||.

Algorithms

Minimizing the average completion time

Minimizing the average completion time can be done in polynomial time:

  • The SPT algorithm (Shortest Processing Time First), sorts the jobs by their length, shortest first, and then assigns them to the processor with the earliest end time so far. It runs in time O(n log n), and minimizes the average completion time on identical machines,[1] P||.
    • There can be many SPT schedules; finding the SPT schedule with the smallest finish time (also called OMFT - optimal mean finish time) is NP-hard. Sahni[2] presents an exponential-time algorithm and a polynomial-time approximation algorithm for identical machines.
  • Horowitz and Sahni[3] present an exact algorithm, with run time O(n log m n), for minimizing the average completion time on uniform machines, Q||.
  • Bruno, Coffman and Sethi[4] present an algorithm, running in time , for minimizing the average completion time on unrelated machines, R||.

Minimizing the weighted-average completion time

Minimizing the weighted average completion time is NP-hard even on identical machines, by reduction from the knapsack problem.[3] It is NP-hard even if the number of machines is fixed and at least 2, by reduction from the partition problem.[2]

Sahni[2] presents an exponential-time algorithm and a polynomial-time approximation algorithm for identical machines.

Horowitz and Sahni[3] presented:

  • Exact dynamic programming algorithms for minimizing the weighted-average completion time on uniform machines. These algorithms run in exponential time.
  • Polynomial-time approximation schemes, which for any ε>0, attain at most (1+ε)OPT. For minimizing the weighted average completion time on two uniform machines, the run-time is = , so it is an FPTAS. They claim that their algorithms can be easily extended for any number of uniform machines, but do not analyze the run-time in this case. They do not present an algorithm for weighted-average completion time on unrelated machines.

Minimizing the maximum completion time (makespan)

Minimizing the maximum completion time is NP-hard even for identical machines, by reduction from the partition problem. Many exact and approximation algorithms are known.

For identical machines, the problem is equivalent to multiway number partitioning, where the job lengths are the numbers, the number of machines (denoted here by m) is the number of parts (denoted there by k), and the goal is to minimize the maximum sum. See multiway number partitioning#minmax for details about exact and approximate algorithms.

Graham proved that:

  • Any list scheduling algorithm (an algorithm that processes the jobs in an arbitrary fixed order, and schedules each job to the first available machine) is a approximation for identical machines.[5] The bound is tight for any m. This algorithm runs in time O(n).
  • The specific list-scheduling algorithm called Longest Processing Time First (LPT), which sorts the jobs by descending length, is a approximation for identical machines.[6]: sec.5  It has good asymptotic convergence properties even for uniform machines.[7] It is also called greedy number partitioning.

Sahni[2] presented several algorithms for identical machines. In particular:

  • A PTAS that attains (1+ε)OPT in time . It is an FPTAS if m is fixed. For m=2, the run-time improves to . The algorithm uses a technique called interval partitioning.

Horowitz and Sahni[3] presented:

  • Exact dynamic programming algorithms for minimizing the maximum completion time on both uniform and unrelated machines. These algorithms run in exponential time (recall that these problems are all NP-hard).
  • Polynomial-time approximation schemes, which for any ε>0, attain at most (1+ε)OPT. For minimizing the maximum completion time on two uniform machines, their algorithm runs in time , where is the smallest integer for which . Therefore, the run-time is in , so it is an FPTAS. For minimizing the maximum completion time on two unrelated machines, the run-time is = . They claim that their algorithms can be easily extended for any number of uniform machines, but do not analyze the run-time in this case.

Hochbaum and Shmoys[8] presented several approximation algorithms for any number of identical machines (even when the number of machines is not fixed):

  • For any r >0, an algorithm with approximation ratio at most (6/5+2r ) in time .
  • For any r >0, an algorithm with approximation ratio at most (7/6+2r ) in time .
  • For any ε>0, an algorithm with approximation ratio at most (1+ε) in time . This is a PTAS. Note that, when the number of machines is a part of the input, the problem is strongly NP-hard, so no FPTAS is possible.
    • The run-time of this algorithm was later improved to .[9]

Later,[10] they developed a PTAS for uniform machines.

Epstein and Sgall[11] generalized the PTAS for uniform machines to handle more general objective functions. Let Ci (for i between 1 and m) be the makespan of machine i in a given schedule. Instead of minimizing the objective function max(Ci), one can minimize the objective function max(f(Ci)), where f is any fixed function. Similarly, one can minimize the objective function sum(f(Ci)).

Extensions

Dependent jobs: In some cases, the jobs may be dependent. For example, take the case of reading user credentials from console, then use it to authenticate, then if authentication is successful display some data on the console. Clearly one task is dependent upon another. This is a clear case of where some kind of ordering exists between the tasks. In fact it is clear that it can be modelled with partial ordering. Then, by definition, the set of tasks constitute a lattice structure. This adds further complication to the multiprocessor scheduling problem.

Static versus Dynamic: Machine scheduling algorithms are static or dynamic. A scheduling algorithm is static if the scheduling decisions as to what computational tasks will be allocated to what processors are made before running the program. An algorithm is dynamic if it is taken at run time. For static scheduling algorithms, a typical approach is to rank the tasks according to their precedence relationships and use a list scheduling technique to schedule them onto the processors.[12]

Multi-stage jobs: In various settings, each job might have several operations that must be executed in parallel. Some such settings are handled by open shop scheduling, flow shop scheduling and job shop scheduling.

References

  1. ^ Horowitz, Ellis; Sahni, Sartaj (1976-04-01). "Exact and Approximate Algorithms for Scheduling Nonidentical Processors". Journal of the ACM. 23 (2): 317–327. doi:10.1145/321941.321951. ISSN 0004-5411.
  2. ^ a b c d Sahni, Sartaj K. (1976-01-01). "Algorithms for Scheduling Independent Tasks". Journal of the ACM. 23 (1): 116–127. doi:10.1145/321921.321934. ISSN 0004-5411.
  3. ^ a b c d Horowitz, Ellis; Sahni, Sartaj (1976-04-01). "Exact and Approximate Algorithms for Scheduling Nonidentical Processors". Journal of the ACM. 23 (2): 317–327. doi:10.1145/321941.321951. ISSN 0004-5411.
  4. ^ Bruno, J.; Coffman, E. G.; Sethi, R. (1974-07-01). "Scheduling independent tasks to reduce mean finishing time". Communications of the ACM. 17 (7): 382–387. doi:10.1145/361011.361064. ISSN 0001-0782.
  5. ^ Graham, Ron L. (1966). "Bounds for Certain Multiprocessing Anomalies". Bell System Technical Journal. 45 (9): 1563–1581. doi:10.1002/j.1538-7305.1966.tb01709.x. ISSN 1538-7305.
  6. ^ Graham, Ron L. (1969-03-01). "Bounds on Multiprocessing Timing Anomalies". SIAM Journal on Applied Mathematics. 17 (2): 416–429. doi:10.1137/0117039. ISSN 0036-1399.
  7. ^ Frenk, J. B. G.; Rinnooy Kan, A. H. G. (1987-05-01). "The Asymptotic Optimality of the LPT Rule". Mathematics of Operations Research. 12 (2): 241–254. doi:10.1287/moor.12.2.241. ISSN 0364-765X.
  8. ^ Hochbaum, Dorit S.; Shmoys, David B. (1987-01-01). "Using dual approximation algorithms for scheduling problems theoretical and practical results". Journal of the ACM. 34 (1): 144–162. doi:10.1145/7531.7535. ISSN 0004-5411. S2CID 9739129.
  9. ^ "Bin packing with restricted piece sizes". Information Processing Letters. 31 (3): 145–149. 1989-05-08. doi:10.1016/0020-0190(89)90223-8. ISSN 0020-0190.
  10. ^ Hochbaum, Dorit S.; Shmoys, David B. (1988-06-01). "A Polynomial Approximation Scheme for Scheduling on Uniform Processors: Using the Dual Approximation Approach". SIAM Journal on Computing. 17 (3): 539–551. doi:10.1137/0217033. ISSN 0097-5397.
  11. ^ Epstein, Leah; Sgall, Jiri (2004-05-01). "Approximation Schemes for Schedulingon Uniformly Related and Identical Parallel Machines". Algorithmica. 39 (1): 43–57. doi:10.1007/s00453-003-1077-7. ISSN 1432-0541.
  12. ^ Kwok, Yu-Kwong; Ahmad, Ishfaq (1999-12-01). "Static scheduling algorithms for allocating directed task graphs to multiprocessors". ACM Computing Surveys. 31 (4): 406–471. CiteSeerX 10.1.1.322.2295. doi:10.1145/344588.344618. ISSN 0360-0300.