Real-time scheduling means that the tasks have well defined time constraints. For example move the airplane wing within 2 milliseconds from the autopilot changing the flight height. Execution from birth to death must happen within the defined constraints to be considered correct.​

Soft Real Time (SRT)

Soft Deadline real-time systems give no guarantee as to when a critical real-time process will be scheduled, but only guarantee that the critical process will have a higher priority.​

  • Gaming, Music Streaming, Live Video Streaming

All tasks in SRT-scheduling processes can only be blocked by an I/O, a pre-emption of a higher priority thread, or if it gives up the CPU itself.​ In both policies, new processes are always added at the end of the queue​ SCHED_FIFO has no time slices; a thread runs until it completes. Whereas in SCHED_RR the thread task runs for a set amount of time and then relinquishes the CPU if it has not finished. From which point, it is put at the end of its respective priority list as a new task

Hard Real Time (HRT)

 In Hard Deadline real-time systems, a task must be serviced by its deadline, so the scheduler must be able to guarantee this.

Hard real-time scheduling uses the Earliest Deadline First (EDF) policies.  Dynamic priority-driven scheduling algorithm for periodic tasks, and this periodic activity is called a job (the period and the deadline for the jobs must be known).​  It assigns priorities to the task according to the absolute deadline. The task whose deadline is closest gets the highest priority (usually, the deadline is the same as the period).​ To compute this deadline, the scheduler must be aware of the period of each task, the phase differences between those periods and the execution times and deadlines for each job (phase, period, execution time).​

HRT In Linux:

Linux supports hard real-time scheduling via the SCHED_DEADLINE scheduling policy

SCHED_DEADLINE (sporadic task model deadline scheduling) implements​ Earliest Deadline First​​ and the Constant Bandwidth Server (CBS) algorithm ​