Can anybody explain how to work with thread priorities in OpenBSD?
Information about this question in MAN pages is poor, it does not give clear understanding. In particular:
sched_get_priority_min/max
gives range. I have OpenBSD 6.3 amd64, and range is 0-31
.
If i see default priority policy/level of first created thread of process, i see: (SCHED_OTHER, 0)
. If 0
is lowest, how can i specify idle thread? Or priority below normal? Can i only **increase** priority? Which priority have system threads? By idea, default priority level has to be normal
.
MAN page pthread_setschedparam()
says: "The scheduling policy for a thread can either be SCHED_FIFO
(first in, first out) or SCHED_RR
(round-robin)". Why not SCHED_OTHER
? First default thread has **this** policy.
Are these priorities for real-time or are they normal?
Can anybody make it clear?
In Windows i can set idle
priority, and i see that this thread is scheduled only when there is no other work in a system. I can set time_critical
, and this thread has almost all processor time.
How to resolve these tasks in OpenBSD? What are analogues of Windows priorities: idle
, lowest
, below_normal
, normal
, above_normal
, highest
, time_critical
?
How to make choice between policies? FIFO
, OTHER
or RR
? Are these policies equal in granting processing time when priority level is the same?
A lot of questions without answers in MAN pages.
Asked by Mikola Akbal
(11 rep)
Oct 21, 2018, 11:45 PM
Last activity: Nov 17, 2020, 07:00 PM
Last activity: Nov 17, 2020, 07:00 PM