FOR FREE YEAR SOLVED

POSIX Real-Time Scheduling

 

The POSIX standard also provides extensions for real-time computing — POSIX.1b. Here, we cover some of the POSIX API related to schedule real-time threads. POSIX defines two scheduling classes for real-time threads:

 

SCHED_FIFO

SCHED_RR

 

SCHED_FIFO schedules threads according to a first-come, first-served policy using a FIFO queue. However, there is no time slicing among threads of equal priority. Therefore, the highest-priority real-time thread at the front of the FIFO queue will be granted the CPU until it terminates or blocks. SCHED_RR uses a round-robin policy

 

It is similar to SCHED_FIFO except that it provides time-slicing among threads of equal priority. POSIX provides an additional scheduling class — SCHED OTHER — but its implementation is undefined and system-specific; it may behave differently on different systems.