Pthread Scheduling of Hard Real Time Systems

Q1. Explain Pthread Scheduling of Hard Real Time Systems.

Ans. Pthread defines two scheduling classes for real-time threads:

  1. SCHED_FIFO
  2. SCHED_RR

 

  1. SCHED_FIFO

SCHED_FIFO schedules threads according to a first-come, first-served policy using a FIFO queue as outlined. 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.

  1. SCHED_RR (For Round-Robin)

SCHED_RR is similar to SCHED_FIFO except that it provides time slicing among threads of equal priority.

Leave a Reply

Your email address will not be published. Required fields are marked *

6 Views
%d bloggers like this: