Real-Time CPU Scheduling

Recall that a Real-Time OS is one whose processes need to complete within defined time limits.

There are 2 types of Real-Time systems:

  1. Soft real-time systems: in such OSs, performance will suffer if tasks don't get completed in time. Example: gaming console.
  2. Hard real-time systems: these OSs will totally fail their purpose if tasks don't get completed in time. Example: medical or military equipment.

Real-time systems require pre-emptive priority-based scheduling. Whenever a task must run, the OS will generate an interrupt that will cause the currently-running process to be removed from the CPU in favor of the timed process.

Hard real-time systems must provide 100% guarantees that a task's scheduling needs can be met. One approach is to use an admission-control algorithm, in which each task must specify its needs at the time it attempts to launch.