> For the complete documentation index, see [llms.txt](https://davidjosearaujo.gitbook.io/notes-miect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidjosearaujo.gitbook.io/notes-miect/sistemas-de-operacao/processor-scheduling/short-term-processor-scheduler.md).

# Short-term processor scheduler

## Preemption & non-preemption

The short-term processor scheduler can be **preemptive** or **non-preemptive**.

### **Non-preemptive scheduling**

A process keeps the processor until it blocks or ends.

* Transitions **time-out** and **preempt** do not exist.
* Typical in batch systems. *Why?*

### **Preemptive scheduling**

A process can lose the processor due to external reasons.

* by exhaustion of the assigned time quantum (**time-out** transition).
* because a more priority process becomes ready to run (**preempt** transition).

Interactive systems must be preemptive. *Why?*

What type to use in a real-time system? *Why?*
