Shared multi-processor scheduling
We study shared multi-processor scheduling problem where each job can be executed on its private processor and simultaneously on one of many processors shared by all jobs in order to reduce the job’s completion time due to processing time overlap. The total weighted overlap of all jobs is to be maximized. The problem models subcontracting scheduling in supply chains and divisible load scheduling in computing. We show that synchronized schedules that complete each job at the same time on its private and shared processor, if any is actually used by the job, include optimal schedules. We prove that the problem is NP-hard in the strong sense for jobs with arbitrary weights, and we give an efficient, polynomial-time algorithm for the problem with equal weights.
Keywords: combinatorial optimization, divisible jobs, shared processors, subcontracting, supply chains
The problem of scheduling divisible jobs on shared processors has attracted growing attention due to its importance in scheduling job-shops, parallel and distributed computer systems, and supply chains.
Anderson  considers a job-shop scheduling model where each job is a batch of potentially infinitely small items that can be processed independently of other items of the batch. A processor in the shop is being shared between the jobs processed by the processor at the rates proportional to the processor capacity fraction allocated to them by scheduler. The objective is to minimize total weighted backlog in a given time horizon.
Bharadwaj et. al.  survey divisible load scheduling where fractions of total divisible load are distributed to subsets of nodes of a shared network of processors for distributed processing. The processing by the nodes and possible communications between the nodes overlap in time so that the completion time (makespan) for the whole load is shorter than the processing of the whole load by a single node. The goal is to chose the size of the load fractions for each node so that the makespan for the whole load is minimized.  points out that many real-life applications satisfy the divisibility property, among them ”…processing of massive experimental data, image processing applications like feature extraction and edge detection, and signal processing applications like extraction of signals buried in noise from multidimensional data collected over large spans of time, computation of Hough transforms, and matrix computations.” Drozdowski  surveys optimal solutions for a single divisible load obtained for various network topologies.
Recently, Vairaktarakis and Aydinliyim  consider scheduling divisible jobs on subcontractor’s processor in supply chains to reduce the job’s completion times. Hezarkhani and Kubiak  refer to the problem as the subcontractor scheduling problem. Vairaktarakis  points out that the lack of due attention to the subcontractors’ operations can cause significant complications in supply chains. A well-documented real-life example of this issue has been reported in Boeing’s Dreamliner supply chain where the overloaded schedules of subcontractors, each working with multiple suppliers, resulted in long delays in the overall production due dates (see Vairaktarakis  for more details and references). The subcontractor scheduling problem is common in quick-response industries characterized by volatile demand and inflexible capacities where subcontracting is often used — those include metal fabrication industry (Parmigiani ), electronics assembly (Webster et al ), high-tech manufacturing (Aydinliyim and Vairaktarakis ), textile production, and engineering services (Taymaz and Kiliçaslan ) where subcontracting enables a manufacturer to speed up the completion times of his jobs.
In the subcontractor scheduling problem each agent has its private processor and a single subcontractor’s processor shared by all jobs available for the execution of its own job. The jobs can be divided between private and shared processor so that job completion times are reduced by possibly overlapping executions on private and shared processor. Vairaktarakis and Aydinliyim  consider a non-preemptive case where at most one time interval on subcontractor’s shared processor is allowed for any job. They prove that under this assumption there exist optimal schedules that complete job execution on private and shared processor at the same time, we refer to such schedules as synchronized schedules, and show that sequencing jobs in ascending order of their processing times on the shared processor gives an optimal solution. Furthermore this solution guarantees non-empty interval on the shared processor for each job. Hezarkhani and Kubiak  observe that by allowing an agent to use a set of several mutually disjoint intervals on the subcontractor processor one does not improve schedules by increasing total overlap. Therefore,  actually observes that algorithm of  solves the single processor preemptive problem to optimality as well. In this paper we generalize this preemptive model of  by allowing many shared processors and by allowing that the reduction in job completion time be rewarded at different rates for different jobs, i.e., we allow different weights for jobs.
It is worth pointing out that Vairaktarakis and Aydinliyim  change focus from optimization typically sought after in the centralized setting to coordinating mechanisms to ensure efficiency in the decentralized systems. Vairaktarakis  analyzes the outcomes of a decentralized subcontracting system under different protocols announced by the subcontractor. Both papers assume complete information yet neither provides coordinating pricing schemes for the problem. To remedy this  designs parametric pricing schemes that strongly coordinate this decentralized system with complete information, that is, they ensure that the agents’ choices of subcontracting intervals always result in efficient (optimal) schedules. It also proves that the pivotal mechanism is coordinating, i.e., agents are better off by reporting their true processing times, and by participating in the subcontracting.
The remainder of the paper is organized as follows. Section 2 introduces notation and formulates the shared multi-processor scheduling problem. Section 3 defines some desirable characteristics of schedules and proves that there always are optimal schedules with these characteristics. Section 4 proves that there always is an optimal schedule that is synchronized. Section 5 considers special instances for which optimal schedules on shared processors are -shaped and reversible. Section 6 proves that the problem is NP-hard in the strong sense even when limited to the set of instances defined in Section 5. Section 7 gives an efficient, polynomial time algorithm for the problem with equal weights. Finally, Section 8 concludes the paper and lists open problems.
2 Problem formulation
We are given a set of preemptive jobs. Each job has its processing time and weight . With each job we associate its private processor denoted by . Moreover, shared processors are available for all jobs.
A feasible schedule selects for each job :
a shared processor ,
a (possibly empty) set of open, mutually disjoint time intervals in which executes on , and
a single time interval where executes on its private processor .
The total length of all these intervals (the ones in 2 and the one in 3) equals . The simultaneous execution of on private and shared is allowed and desirable, as follows from the optimization criterion given below. However, for any two jobs and if they use the same shared processor, i.e., , then any interval in which executes on is disjoint from any interval in which executes on . In other words, each processor can execute at most one job at a time.
Given a feasible schedule , for each job we call any time interval of maximum length in which executes on both private and shared simultaneously an overlap. The total overlap of job equals the sum of lengths of all overlaps for . The total weighted overlap of equals
A feasible schedule that maximizes the total weighted overlap is called optimal. For convenience we use the abbreviation WSMP to denote the weighted shared multi-processor scheduling problem: the instance of the problem consists of a set of jobs and the number of shared processors ; the goal is to find an optimal schedule that maximizes total weighted overlap.
This objective function is closely related to the total completion time objective traditionally used in scheduling. The total completion time can potentially be reduced by an increase of the total overlap resulting from the simultaneous execution of jobs on private and shared processors. However, to take full advantage of this potential the schedules need to start jobs at time , otherwise the overlap would not necessarily be advantageous in reducing the total completion time. At the same time we need to emphasize that the two objectives exist for different practical reasons. The minimization of total completion time minimizes mean flow time and thus by Little’s Law minimizes average inventory in the system. The maximization of the total overlap on the other hand maximizes the total net payoff resulting from completing job earlier at thanks to the use of shared processors (subcontractors) rather than at if those where not used. The is a net payoff obtained from the completion of job (order) time units earlier due to the overlap . This different focus sets the total weighted overlap objective apart from the total completion time objective as an objective important in practice in scheduling shared processors.
For illustration let us consider an example in Figure 1 with two shared processors and jobs. Note that in this example, each job completes at the same time on its private processor and on a shared one (Sections 3 and 4 will conclude that for each problem instance there exists an optimal solution with this property).
3 Simple observations about optimal schedules
We now make four simple observations that allow us to reduce a class of schedules to consider yet ensure at the same time that the reduced class always includes optimal schedules. Let be a feasible schedule. Let and be the start time and the completion times of a job on the shared processor respectively, both being if all of executes on its private processor only. A schedule is called normal if for each . We observe the following.
There exists an optimal schedule that is normal.
Let be an optimal schedule. Suppose that some job completes on a shared processor later than on its private processor in , i.e., and thus is not normal. Hence, there exist intervals such that for each , the processor executes in , and no part of executes in on either or . Then, modify by removing the job from all intervals on the shared processor (so that is idle in ) and let execute in the interval on its private processor . Note that the total weighted overlap of has not changed by this transformation. After repeating this transformation for each job if need be we obtain an optimal schedule that is normal. ∎
Let be an optimal normal schedule and let for each . There is no idle time in time interval on each shared processor .
Note that by Observation 3.1, there exists a normal optimal schedule . Suppose for a contradiction that some shared processor is idle in a time interval and for some job . Take maximum such that executes continuously in on and in on . Then, obtain a schedule by taking a piece of that executes in on and a piece of that executes in on and execute both pieces in on . Clearly, the new schedule is feasible and, since is normal, , which contradicts the optimality of . ∎
We say that a schedule is non-preemptive if each job executes in time interval on in . In other words, in a non-preemptive schedule there is at most one interval in 2 in the definition of a feasible schedule.
There exists an optimal schedule that is normal and non-preemptive.
By Observation 3.1, there exists a normal optimal schedule . Suppose that is preemptive. We transform into a non-preemptive one whose total weighted overlap is not less than that of . The transformation is performed iteratively. At the beginning of each iteration a job is selected such that executes on a shared processor in at least two disjoint time intervals and , where . Without loss of generality we assume that the intervals are of maximal lengths. Modify by shifting each job start, completion and preemption that occurs in time interval on by units to the left, i.e. towards the start of the schedule at 0. Then, the part of executed in in is executed in after the transformation. The transformation does not increase the completion time of any job on and keeps it the same on for each job . Thus, in particular, remains normal. However, the number of preemptions of the job decreases by and there is no job whose number of preemptions increases. Also, the total weighted overlap of does not change. Hence, after finite number of such iterations we arrive at a required normal non-preemptive optimal schedule. ∎
We say that a schedule is ordered if it is normal, non-preemptive and for any two jobs and assigned to the same shared processor it holds if and only if . Informally speaking, the order of job completions on the shared processors is the same as the order of their completions on the private processors.
There exists an optimal schedule that is ordered.
Let be an optimal normal and non-preemptive schedule; such a schedule exists due to Observation 3.3. Let for each . Recall that each job executes in a single interval on in a non-preemptive . By Observation 3.2, there is no idle time in time interval for each job on . Thus, we may represent on a processor as a sequence of pairs , where and the job executes in time interval
on , where , and in time interval on for each .
If is ordered, then the proof is completed. Hence, suppose that is not ordered. There exists a shared processor and an index such that
Consider a new non-preemptive schedule in which:
i.e., the order of jobs and has been reversed on while the schedules on all other processors remain unchanged. Note that this exchange does not affect start times and completion times of any job on except for and . Since is normal, we obtain
and, also by (1),
which proves that is normal. Clearly, . Set and repeat the exchange if need be. After a finite number of such exchanges we arrive at a schedule that is ordered. ∎
4 Optimal schedules are synchronized
We say that a schedule is synchronized if it is normal, non-preemptive and for each job whose part executes on some shared processor it holds . Note that a synchronized schedule is also ordered but the reverse implication does not hold in general.
In order to prove that there are optimal schedules that are synchronized we introduce pulling and pushing schedule transformations. Let be an optimal ordered (possibly synchronized) schedule. Consider a shared processor . Let , , be jobs executed on in and ordered according to increasing order of their completion times on . Let be an index such that for each . (Recall that since is normal.) Observe that completes at the same time on its private processor (since is optimal) and on and hence the index is well defined. Finally, let
We define an operation of pulling of by in as a transformation of that results in a schedule defined as follows. First, and are identical on in time interval . Then, for the job we set:
Next, for each (by proceeding with subsequent increasing values of ) we define how is executed in :
Finally, and are identical on all other processors, i.e., on all processors different from and . The operation of pulling by is illustrated in Figure 2. Note that if we take , i.e., equals the length of the entire execution interval of on , then pulling of by produces in which executes only on its private processor. From this definition we have.
The pulling of by in produces a feasible schedule and
We also define a transformation that is a ‘reverse’ of pulling. Recall that are the jobs executing on the processor . For this transformation we assume that the schedule is ordered but not synchronized and some job completes on earlier than on its private processor. Select to be the index such that for each and . The index is well defined because in optimal schedule . Let
and for each ,
The transformation of pushing of by in produces schedule defined as follows. Both and are identical on in time interval ,
Then, for each (with increasing values of ) we have
On each shared processor different than and on private processors different than the schedules and are the same.
Note that if for some , then the pushing operation eliminates from the shared processor, i.e., executes only on its private processor in . From this definition we have.
The pushing of by in produces a feasible schedule and
We also note that if one first makes pulling of some job by in a schedule which results in a schedule in which the same job precedes on the shared processor both in and , then pushing of by in results in returning back to .
We are now ready to prove our main result of this section, which will allow us to work only with synchronized schedules in the sections that follow.
There exists an optimal synchronized schedule.
Let be an optimal schedule. By Observation 3.4, we may assume without loss of generality that is ordered. Suppose that is not synchronized. We will convert into a synchronized schedule by iteratively performing transformations described below.
Let be a shared processor such that there exists a job assigned to that completes earlier on than on its private processor. Let , , be jobs executed on in and ordered according to increasing order of their completion times on . Let be the minimum index such that for each . Since is not synchronized and in an optimal schedule, the index is well defined and by the minimality of . We first argue that
Consider pulling of by in that produces a schedule . Then, by Lemma 4.1 and the optimality of ,
which proves (4).
Since is normal, by the choice of we have . Obtain a schedule by performing pushing of by in . Note that if , then completes at the same time on the shared and private processors in . If, on the other hand, for some , then is eliminated from the shared processor, i.e., executes only on its private processor in . By Lemma 4.2 and (4),
Moreover, satisfies the following two conditions:
for each , if is assigned to in , then ,
if all jobs are assigned to in , then .
Set and repeat the transformation.
Condition 1 ensures that if a job completes at the same time on private and shared processors in , then this property is either preserved by the transformation or the job is executed only on its private processor in the new schedule . Note that in the latter case, such a job will remain on its private processor during future transformations, never ‘returning’ back to any shared processor; this follows directly from the pushing transformation. Thus, in each transformation either the number of jobs executing on shared processors decreases or, due to 2, if this number does not decrease, then the number of jobs that complete at the same time on private and shared processors increases by one. Hence it follows that after at most transformations we obtain an optimal schedule that is synchronized. ∎
In a synchronized schedule the order of job executions on a processor uniquely determines the schedule on .
5 V-shapeness and duality of some instances
Our main goal in the section is to introduce special classes of instances that will provide a key to the complexity analysis of the problem in the next section. The following observation was made by  for a single shared processor non-preemptive problem and extended to preemptive one in . It will be used often in the remainder of the paper.
If jobs with processing times , respectively, are executed on a shared processor in some synchronized schedule in that order, then the job executes in time interval of length , where and
5.1 Consecutive job exchange for processing-time-inclusive instances
We begin with a lemma which allows us to calculate the difference in total weighted overlaps of two schedules, one of which is obtained from the other by exchanging two consecutive jobs on a shared processor. This exchange is complicated by the fact that for the job that gets later in the permutation after the exchange it may no longer be possible to execute on the shared processor since the job may prove too short for that. Generally, the test whether this actually happens depends not only on the processing times of the jobs that precede the later job but also on their order. Instead, we would like to be able to select an arbitrary subset of , take any permutation of the jobs in , and always guarantee that there exists a synchronized schedule that has exactly the jobs in that appear in the order determined by the permutation on the shared processor. Clearly, this freedom cannot be ensured for arbitrary instances. Therefore we introduce an easy to test sufficient condition that would always guarantee the validity of the job exchange.
Consider a set of jobs , where we assume ; here we take to be the processing time of the job , . We say that the set of jobs is processing-time-inclusive if
Note that is the makespan of a schedule on a shared processor for jobs in when the jobs are scheduled in ascending order of their processing times, i.e., the order . By , the ascending order of processing times of jobs in provides the longest schedule on the shared processor. Thus, in other words, for processing-time-inclusive jobs , the makespan is shorter than the shortest job in . The condition can be checked in time .
Finally, for a permutation of jobs with weights , respectively, define
for each .
Let be a synchronized schedule that executes processing-time-inclusive jobs with processing times and weights , respectively, in the order on a shared processor , and let . Let be a synchronized schedule obtained by exchanging jobs and in so that all jobs are executed in the order on . Then,
Note that the construction of is valid since the jobs are processing-time-inclusive. We calculate the values of and on only since the schedules on other shared processors remain unchanged and thus contribute the same amount to the total weighted overlap of both schedules. By Observation 5.1 we have
for , where
for each . We obtain
for each . Thus,
For notational brevity set
as required. ∎
Let be an optimal synchronized schedule that executes jobs with weights , respectively, on a shared processor in the order . Then, for each . ∎
We finish this section with the following feature of optimal synchronized schedules.
Let be an optimal synchronized schedule that executes jobs with processing times and weights , respectively, on a shared processor in the order . Then,
By Observation 5.1 we have for each . Since is executed on the shared processor, we have . Thus, for each .
Let be a synchronized schedule that executes jobs with processing times on a shared processor in the order . The schedule is called V-shaped if, for each shared processor, there exists an index such that and .
Optimal synchronized schedules for instances with processing-time-inclusive jobs and with for , are V-shaped.
Let be an optimal synchronized schedule for . Take an arbitrary shared processor, and let be the order of jobs on this processor. Since is optimal, by Lemma 5.2 for each (note that the jobs in are processing-time-inclusive by assumption as required in the lemma),
because and . Denote for each . By definition for . Note that if all ’s are non-negative or all of them are non-positive, then and , respectively, and hence is V-shaped. Define and . Note that implies
and thus is V-shaped. Hence, it remains to argue that . Suppose for a contradiction that (note that by definition). By (11),
which implies that . By Observation 5.4, and , which implies . Since , this gives . Hence,