O(1) scheduler priority

Creator
Creator
Seonglae Cho
Created
Created
2023 Oct 24 13:8
Editor
Edited
Edited
2023 Oct 24 14:23
Refs
Refs

140 priority level

Each process have scheduling class
A smaller value corresponds to a higher priority
based on
POSIX.4
root can only use SCHED_FIFO and SCHED_RR so conventional processes can use SCHED_OTHER
  • [0,99]: priority for real-time tasks (SCHED_FIFO and SCHED_RR)
  • [100,139]: priority for normal timesharing tasks (SCHED_OTHER or SCHED_NORMAL)
just have one ready queue so the complexity is
default user process priority is 120 (midpoint)
notion image
 
 
 

Static priority determines the length of a time slice

Usually most of other strategy do not make dependency between them
notion image
nice is from -20 to +19
nice()
,
setpriority()

Dynamic priority

  • To maintain good response time.
  • favor I/O-bound process over CPU-bound process
    • Processes which sleep a lot get a higher dynamic priority. (task’s interactivity)
    • bonus reflects task’s interactivity or average sleep time
    • notion image
 
notion image
 
 
 
 

Backlinks

CFS

Recommendations