Skip to content

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:

QoSUsed for
USER_INTERACTIVEThe main thread of a frontmost app
USER_INITIATEDWork the user is actively waiting for
DEFAULTBackground work that should run soon
UTILITYLong-running, user-visible progress
BACKGROUNDMaintenance, indexing
apple-oss-distributions/libdispatchsrc/queue.cGCD's queue-priority → QoS → Mach thread-policy mapping.View on GitHub(line )

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.

See also: thread, jetsam, Mach.