This is a scheduling choice in queueing theory. A priority queue is the data structure that can select the next item; it does not itself specify what happens to the item already running. Exchange queue priority concerns the allocation of executions under a venue's matching rules, a separate modelling question.
The decision is whether to interrupt
Assume a single server, fixed priority classes and first-come, first-served ordering within each class. Whenever the server becomes free, it chooses the highest-priority class with waiting work.
| Discipline | A higher-priority job arrives during lower-priority service | What happens to interrupted work? |
|---|---|---|
| Nonpreemptive priority | The running job finishes before the newcomer can start. | No interruption occurs. |
| Preemptive-resume priority | The newcomer can interrupt the lower-priority job. | Completed work is preserved; the job later continues from that point. |
| Preemptive-repeat or restart priority | The newcomer can interrupt the lower-priority job. | Service must begin again; the model must specify whether its duration is retained or redrawn. |
Same workload, different delays
Consider a fictional risk-compute worker. Time is in seconds, and it starts empty.
- Low-priority job L arrives at and requires seconds of server time.
- High-priority job H arrives at and requires second.
- There are no other arrivals, and switching and resuming cost no time.
Both schedules process seconds of useful work and finish the workload at . The improvement for H comes from postponing L. This is an exact comparison of two schedules, not an estimate of mean latency under random arrivals.
What changes in a stochastic queue?
The zero-cost assumption matters. A task that must roll back, reload data or recompute lost work does not follow the timeline above. Restarting can increase the work needed to finish the workload; a non-interruptible operation can postpone even a nominally preemptive handover.
Strict priority also offers no automatic fairness or waiting-time bound. If higher-priority work keeps the server continuously occupied, lower-priority work can be starved. That is a possible workload, not a claim that every stable priority queue starves jobs. Capacity and stability must be assessed for the specified arrival and service processes; changing the order alone does not create processing capacity.
Sources
- MIT Urban Operations Research, §4.9.1: Preemptive and Nonpreemptive Priorities — class ordering, within-class discipline, interruption and resumption conventions.
- Eytan Modiano, MIT 6.263J, Lectures 10–11, slides 11–13 — residual-service obstruction in nonpreemptive queues, ideal preemptive-resume delay and practical overhead.