Nycturne
Elite Member
- Joined
- Nov 12, 2021
- Posts
- 1,374
Small point but are QoS levels 1-8 reserved by Apple for the OS? Does anyone know why QoS levels go from 9-33?
Keep in mind that QoS has four public values: User Interactive, User Initiated, Utility and Background. This gets mapped to a more fine grained value that’s akin to a thread priority and may in fact be the thread priority set for the thread (it has been a while). It’s the thread priority that the kernel scheduler uses to determine how many time slices a thread gets, and what cores are used (in AMP mode that iOS/macOS uses on Apple Silicon). So it’s going to use a thread priority range that the kernel defined a couple decades ago to propagate QoS.
When mapping like this, you don’t want to use the full range, and you want gaps between each mapped value. 9, 17, 25, 33 in this case (IIRC). This gives you space to subdivide and add new values if needed. And 1-8 is the gap after Background. Meaning this is left behind for future use that would be less important than Background priority.
As far as I know, things like Spotlight indexing is all run at Background priority.