An algorithm portfolio schedule specifies how computational resources are assigned to members of an algorithm portfolio over time. For a sequential algorithm portfolio, it states which algorithm receives each time interval, whether interrupted work is resumed or discarded, and when computation stops. A parallel algorithm portfolio also needs a processor allocation and a rule for accepting and combining results. Listing candidate algorithms alone does not specify a schedule.
An original interleaving example makes the distinction between processor time and elapsed time explicit. Suppose algorithms A and B need respectively and seconds of processor time on a particular input. Give A one second, then B one second, repeating while preserving both states and stopping at the first accepted result. A receives its third second during elapsed interval , so the portfolio finishes at seconds. At that point A has used processor-seconds and B has used . With two dedicated processors, the corresponding parallel algorithm portfolio would finish at seconds. These calculations assume no algorithm portfolio switching overhead and no resource contention.
More generally, let be processor time supplied to candidate by elapsed time , and let be its required processor time. In the resumable, interference-free model, the completion time is
Discarding a state on every interruption changes this model: separate short runs do not necessarily accumulate into one longer run. The original portfolio study compared parallel, interleaved and restart execution precisely because these are different policies.[ref]
Choose an objective before comparing algorithm portfolio schedules: expected value of running time, probability of finishing by a deadline, and total computing work need not favor the same allocation. A schedule chosen using retrospective runtimes also requires evaluation on inputs that did not determine the schedule.
Algorithm portfolio switching overhead is elapsed time or computing work spent changing the active member of an algorithm portfolio, beyond the useful work counted for the candidate algorithms. It can include a context switch, saving or restoring search state, rebuilding data structures and warming a processor's working data. The measured cost depends on the implementation and on what its runtime accounting already includes.
For an explicit model, give one candidate seconds of useful work, then spend seconds switching. Repeating equal intervals indefinitely gives useful-time fraction
For and , this is . Reducing the useful interval to with the same switch cost drops the fraction to . Small time slices improve responsiveness but can consume more of the budget in switching.
Terminal bookkeeping matters. In the illustrative algorithm portfolio schedule where A and B alternate one-second useful intervals, A completes after its third interval and B has received two. Four switches occur before completion. With per switch, elapsed time is ; there is no fifth switch after the stopping rule has fired. Comparing this with the zero-overhead trace isolates the stipulated switching cost.
The original portfolio experiments distinguish interleaving from parallel and restart execution.[ref] Applying such policies requires distinguishing switching cost from algorithmic work that is abandoned. If a run is discarded and restarted, lost progress changes the completion process itself; treating it as a fixed additive switch cost can misrepresent the sequential algorithm portfolio. Report whether timings include initialization, state transfer and result checking, and measure the actual switching events.
A sequential algorithm portfolio allocates one processor's time among candidate algorithms or runs. Its algorithm portfolio schedule determines which candidate runs, when to switch and whether an interrupted run is resumed or abandoned. The original portfolio study compared single-processor interleaving and restart policies with parallel execution.[ref]
Consider original runtimes seconds and seconds on two equally likely input types. Either fixed choice has mean or seconds. Run for at most four seconds, then start if has not finished. The two completion times are and seconds, so the scheduled mean is seconds. The schedule succeeds because the candidates have complementary performance.
Algorithm portfolio switching overhead can erase that gain. If the switch costs seconds whenever it occurs, the second completion time becomes seconds and the mean becomes seconds, worse than always running . The cost must be charged to the actual switching events, rather than added equally to every instance.
A timeout also does not say that the interrupted candidate would never solve the input. Resuming preserves previous search work only if the implementation supports it; restarting begins a different run. Record budgets, state retention, random seeds and the final stopping rule when reporting a sequential portfolio's performance. A good schedule on measured inputs still needs evaluation on unused inputs.