Glossary
QoS class
Quality-of-Service: the userspace-facing scheduling priority. USER_INTERACTIVE down through BACKGROUND, mapped onto Mach's scheduling classes by libdispatch.
A QoS class (Quality of Service) is the userspace abstraction for telling the kernel how urgent a thread's work is. Set via pthread_set_qos_class_self, dispatch_async (queue priority), or Task(priority:) in Swift Concurrency.
The classes, highest to lowest:
| QoS | Used for |
|---|---|
USER_INTERACTIVE | The main thread of a frontmost app |
USER_INITIATED | Work the user is actively waiting for |
DEFAULT | Background work that should run soon |
UTILITY | Long-running, user-visible progress |
BACKGROUND | Maintenance, indexing |
QoS isn't just CPU priority. It propagates into I/O priority (the disk scheduler honors it), memory pressure (lower QoS means first to be paged out or jetsam'd), and IPC (a low-QoS thread blocking a high-QoS one triggers a QoS override, temporarily boosting the lower thread to avoid priority inversion).
QoS overrides through IPC chains are what keeps the system responsive — see the scheduler article.