Preemption changes the active job’s service path, not just its place in a waiting queue. Define what the interrupted job retains when it returns.
Separate ready-queue priority from preemption
A preemptive resource can interrupt a current user when another permitted request takes its resource. The interrupted process must handle that interruption. Its remaining work and eventual return are model logic; resource priority alone does not automatically define whether completed work is retained or discarded. Primary reference: SimPy shared resources: preemption and interrupts.
For an original scenario, declare when preemption is allowed, which request triggers it, and the interrupted job’s re-entry rule. Keep this policy distinct from nonpreemptive priority, which waits for current service to end. Also record any transfer or switching interval rather than silently assuming zero.
Trace fictional resume and restart rules
Suppose job A begins a 10-minute task at minute 0. At minute 4, a permitted urgent job preempts it and occupies the resource for 3 minutes, ending at 7. Under resume with retained work and no switching delay, A has 6 minutes remaining and finishes at minute 13.
Under a defined restart rule, A instead performs the full 10 minutes again from minute 7 and finishes at 17. The different completion times follow different service-state rules. Neither is a physical recommendation, and priority alone does not establish which rule fits an actual operation.
Review the interrupted-process ledger
Prepare a trial table with work completed before interruption, held or released resources, urgent-job interval, re-entry and work remaining. Verify that the resumed job is not counted complete at preemption and that each resource is released or reassigned according to the intended model.
Real processes may not permit interruption at all or may need additional state-handling constraints. This guide supplies no safe interruption procedure or HM capability claim. Its decision is whether the preemptive scheduling policy includes enough process logic to explain the interrupted job’s later service.
Customer Questions
Does a priority queue alone imply preemption?
No. Preemption also interrupts active service under a defined policy.
What is A’s completion under the stated resume rule?
Minute 13, retaining the four minutes already completed.
Does the resource automatically choose resume versus restart?
No. That service-state behavior must be defined in the model.
Primary References
These references support the technical principles discussed in this guide. The worked examples and review questions are educational.
Discuss Your Machine Requirement
Share your product, container, required output and the evidence needed for your technical review.
Request a Technical Review