Priorities For Mac
- The MAC Group also determines priorities for the allocation of resources within a defined geographic area. MAC Group intelligence gathering and information exchange activities are usually accomplished through the information systems established by the EOC, such as the use of the MACS.
- Priority Matrix is a project management software for Mac that works natively. Works with Apple Mail, iCal. Try it free, today!
- Start up your Mac in Windows or macOS with Boot Camp. You can set the default operating system to either macOS or Windows. The default operating system is the one you want to use when you turn on or restart your Mac.
Because Apple makes the hardware, the operating systems, and many applications, our experts understand how everything works together and can help resolve most issues in a single conversation.
Enjoy 3 years of peace of mind when you buy AppleCare+ for Mac.
Every Mac comes with one year of hardware repair coverage through its limited warranty and up to 90 days of complimentary technical support. AppleCare+ for Mac extends your coverage to three years from your AppleCare+ purchase date and adds up to two incidents of accidental damage protection every 12 months, each subject to a service fee of $99 for screen damage or external enclosure damage, or $299 for other damage, plus applicable tax.1 In addition, you’ll get 24/7 priority access to Apple experts by chat or phone.2
Priority ERP Products Priority is a comprehensive, integrated business management system widely used by industrial and commercial-based companies and organizations. Priority is a scalable, flexible and easy to use ERP solution designed for companies of varying sizes, offering tailored systems that meet the requirements of its core vertical markets – manufacturing, professional services.
One stop for support
Because Apple designs the computer, the operating system, and many applications, Mac is a truly integrated system. And only AppleCare+ gives you one-stop service and support from Apple experts, so most issues can be resolved in a single call.
- 24/7 priority access to Apple experts by chat or phone
- Global repair coverage1
- Onsite repair for desktop computers: Request that a technician come to your work site3
- Mail-in repair for portable computers3: Mail in your Mac using a prepaid shipping box provided by Apple
- Carry-in repair3: Take your Mac to an Apple Store or other Apple Authorized Service Provider
Hardware coverage
AppleCare+ for Mac provides global repair coverage, both parts and labor, from Apple-authorized technicians around the world.
Coverage includes the following:
- Your Mac computer
- Battery1
- Included accessories such as the power adapter
- Apple memory (RAM)
- Apple USB SuperDrive
- Up to two incidents of accidental damage protection every 12 months, each subject to a service fee of $99 for screen damage or external enclosure damage, or $299 for other damage, plus applicable tax1
Software support
Whether you’re sitting in the comfort of your home or office or on the go, you can get direct access to Apple experts for questions on a wide range of topics, including:
- Using macOS and iCloud
- Quick how-to questions about Apple-branded apps, such as Photos, iMovie, GarageBand, Pages, Numbers, and Keynote, and pro apps such as Final Cut Pro X, Logic Pro X, and more
- Connecting to printers and AirPort networks
How to buy
- Purchase AppleCare+ with your new Mac.
- Or buy it within 60 days of your Mac purchase:
- Online (requires you to verify your serial number)
- At an Apple Store (inspection of Mac and proof of purchase are required)
- By calling 800-275-2273
AppleCare+ available for:
- MacBook
- MacBook Air
- 13” MacBook Pro
- 15” MacBook Pro
- 16” MacBook Pro
For Mac computers running macOS Server, the plan covers server administration and network management issues using the graphical user interface of macOS Server. For advanced server operation and integration issues, purchase AppleCare OS Support. See AppleCare+ Terms and Conditions for complete product details.
Get support now by phone or chat,
set up a repair, and more.
Call Apple Support at 1-800-APLCARE.
Contact Apple SupportGet support for all of your
Apple devices in one app.
Get the Apple Support appPrioritize Work at the Task Level
Apps and processes compete to use finite resources—CPU, memory, network interfaces, and so on. In order to remain responsive and efficient, the system needs to prioritize tasks and make intelligent decisions about when to execute them.
Work that directly impacts the user, such as UI updates in the active app, is extremely important and takes precedence over other work that may be occurring in the background. This higher priority work often uses more energy, as it may require substantial and immediate access to system resources.
As a developer, you can help the system prioritize work more effectively by categorizing your app’s work, based on importance. Even if you’ve implemented other efficiency measures, such as deferring work until an optimal time, the system still needs to perform some level of prioritization. Therefore, it is still important to categorize the work your app performs.
About Quality of Service Classes
OS X implements a variety of resource management attributes, which can be adjusted in order to improve the responsiveness and efficiency of the system. For example, you can adjust the CPU scheduler and I/O priorities for a task, provide a threshold for timer coalescing, and denote whether the CPU should operate in a throughput- or efficiency-oriented mode. These attributes, however, can be difficult to access and configure. A much simpler solution is to utilize quality of service (QoS) levels—known as classes—in your app.
A quality of service (QoS) class allows you to categorize work to be performed by NSOperation
, NSOperationQueue
, NSTask
, NSThread
, dispatch queues, and pthreads (POSIX threads). By assigning a QoS to work, you indicate its importance, and the system prioritizes it and schedules it accordingly. For example, the system performs work initiated by a user sooner than background work that can be deferred until a more optimal time. In some cases, system resources may be reallocated away from the lower priority work and given to the higher priority work.
Because higher priority work is performed more quickly and with more resources than lower priority work, it typically requires more energy than lower priority work. Accurately specifying appropriate QoS classes for the work your app performs ensures that your app is responsive as well as energy efficient.
Choosing a Quality of Service Class
The system uses QoS information to adjust priorities such as scheduling, CPU and I/O throughput, and timer latency. As a result, the work performed maintains a balance between performance and energy efficiency.
When you assign a QoS to a task, consider how it affects the user and how it affects other work. As shown in Table 10-1, there are four primary QoS classes, each corresponding to a level of work importance.
QoS Class | Type of work and focus of QoS | Duration of work to be performed |
---|---|---|
User-interactive | Work that is interacting with the user, such as operating on the main thread, refreshing the user interface, or performing animations. If the work doesn’t happen quickly, the user interface may appear frozen. Focuses on responsiveness and performance. | Work is virtually instantaneous. |
User-initiated | Work that the user has initiated and requires immediate results, such as opening a saved document or performing an action when the user clicks something in the user interface. The work is required in order to continue user interaction. Focuses on responsiveness and performance. | Work is nearly instantaneous, such as a few seconds or less. |
Utility | Work that may take some time to complete and doesn’t require an immediate result, such as downloading a PDF or importing data. Utility tasks typically have a progress bar that is visible to the user. Focuses on providing a balance between responsiveness, performance, and energy efficiency. | Work takes a few seconds to a few minutes. |
Background | Work that operates in the background and isn’t visible to the user, such as indexing, synchronizing, and backups. Focuses on energy efficiency. | Work takes significant time, such as minutes or hours. |
Important
Optimally, run your app at a QoS level of utility or lower at least 90% of the time when user activity is not occurring. Use powermetrics to determine how much time is being allocated to different QoS classes.
Special Quality of Service Classes
In addition to the primary QoS classes, there are two special types of QoS (described in Table 10-2). In most cases, you won’t be exposed to these classes, but there is still value in knowing they exist.
QoS Class | Description |
---|---|
Default | The priority level of this QoS falls between user-initiated and utility. Work that has no QoS information assigned is treated as default. The GCD global queue runs at this level. This QoS is not intended to be used to classify work. |
Unspecified | This represents the absence of QoS information and cues the system that an environmental QoS should be inferred. Threads can have an unspecified QoS if they use legacy APIs that may opt the thread out of QoS. |
Specify a QoS for Operations and Queues
If your app uses operations and queues to perform work, you can specify a QoS for that work. The NSOperation
and NSOperationQueue
classes both possess a qualityOfService
property, of type NSQualityOfService
, which can be set to one of the following values:
NSQualityOfServiceUserInteractive
NSQualityOfServiceUserInitiated
NSQualityOfServiceUtility
NSQualityOfServiceBackground
Listing 10-1 shows how to set the QoS for an operation.
Listing 10-1Setting the quality of service of an operationObjective-C
NSOperation*myOperation=[[NSOperationalloc]init];
myOperation.qualityOfService=NSQualityOfServiceUtility;
Swift
letmyOperation: NSOperation = MyOperation()
myOperation.qualityOfService = .Utility
Note
The default QoS for the NSOperation
class is NSQualityOfServiceBackground
.
Quality of Service Inference and Promotion
Note that QoS is not a static setting for operations and queues, and could fluctuate over time depending on a variety of criteria. For example, situations may occur where the QoS of an operation and the QoS of a queue don’t match, an operation and a dependent operation don’t match, or an operation has no QoS assigned. In these scenarios, a QoS may be inferred.
Numerous rules govern how QoS inference and promotion occurs with regard to queues (see Table 10-3) and operations (see Table 10-4).
Situation | Result |
---|---|
A queue has no QoS assigned and an operation with a QoS is added to the queue. | The queue and its other operations, if any, remain unaffected. |
A queue has a QoS assigned, and an operation with a QoS is added to the queue. | The QoS of the queue is promoted if the QoS of the new operation is higher. Any of the queue’s operations with a lower QoS are also promoted. Any operations with a lower QoS that are added to the queue in the future will infer the higher QoS. |
The QoS of a queue is raised by changing the value of the queue’s | Any of the queue’s operations with a lower QoS are promoted to the higher QoS. Any operations with a lower QoS that are added to the queue in the future will infer the higher QoS. |
The QoS of a queue is lowered by changing the value of the queue’s | Any of the queue’s operations remain unaffected. Any operations that are added to the queue in the future will infer the lower QoS, unless they have a higher QoS assigned, in which case they will retain their assigned QoS level. |
Situation | Result |
---|---|
An operation has no QoS assigned. | The operation infers the QoS of the parent operation, queue, In a situation where an operation is created on the main thread, a QoS of |
An operation with a QoS is added to a queue with a higher QoS. | The QoS of the operation is promoted to match the QoS of the queue. |
The QoS of a queue containing an operation is promoted. | The operation infers the new QoS of the queue if it is higher than the current QoS of the operation. |
Another operation becomes dependent (child) on the operation (parent). | The parent operation infers the QoS of the child operation if that QoS is higher. |
The QoS of the operation is raised by changing the operation’s | The operation infers the new QoS. Any child operations are promoted to the new QoS if it is higher. Other operations in the operation’s queue that are in front of the operation are promoted to the new QoS if it is higher. |
The QoS of the operation is lowered by changing the operation’s | The operation infers the new QoS. Any child operations remain unaffected. The queue of the operation remains unaffected. |
Adjust the QoS of a Running Operation
Once an operation is running, you can change its QoS in one of the following ways:
Change the
qualityOfService
property of the operation. Note that doing this also changes the QoS of the thread that’s running the operation.Add a new operation with a higher QoS to the running operation’s queue. This will promote the QoS of the running operation to match the QoS of the operation.
Use
addDependency:
to add an operation with a higher QoS to the running operation as a dependent.Use
waitUntilFinished
orwaitUntilAllOperationsAreFinished
. This will promote the QoS of the running operation to match the QoS of the caller.
Specify a QoS for Dispatch Queues and Blocks
If your app uses GCD, QoS classes can be applied to dispatch queues and blocks.
Dispatch Queues
For dispatch queues, you can specify a QoS by calling dispatch_queue_attr_make_with_qos_class
when creating the queue. First, create a dispatch queue attribute for the QoS, and then provide that attribute when you create the queue, as shown in Listing 10-2.
Objective-C
dispatch_queue_attr_tqosAttribute=dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT,QOS_CLASS_UTILITY,0);
dispatch_queue_tmyQueue=dispatch_queue_create('com.YourApp.YourQueue',qosAttribute);
Swift
letqosAttribute = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT, QOS_CLASS_UTILITY, 0)
letmyQueue = dispatch_queue_create('com.YourApp.YourQueue', qosAttribute)
Table 10-5 shows how GCD QoS classes map to Foundation QoS equivalents.
GCD QoS classes (defined in sys/qos.h) | Corresponding Foundation QoS classes |
---|---|
|
|
|
|
|
|
|
|
QoS is an immutable attribute of a dispatch queue, and can’t be changed once the queue has been created. To retrieve the QoS that’s assigned to a dispatch queue, call dispatch_queue_get_qos_class
.
Objective-C
qosClass=dispatch_queue_get_qos_class(myQueue,&relative);
Swift
letqosClass = dispatch_queue_get_qos_class(myQueue, &relative)
Global Concurrent Queues
In the past, GCD has provided high, default, low, and background global concurrent queues for prioritizing work. Corresponding QoS classes should be used in place of these queues. Table 10-6 describes the mappings between these queues and QoS classes.
Global queue | Corresponding QoS class |
---|---|
Main thread | User-interactive |
DISPATCH_QUEUE_PRIORITY_HIGH | User-initiated |
DISPATCH_QUEUE_PRIORITY_DEFAULT | Default |
DISPATCH_QUEUE_PRIORITY_LOW | Utility |
DISPATCH_QUEUE_PRIORITY_BACKGROUND | Background |
A global concurrent queue exists for each QoS class. To retrieve the global concurrent queue corresponding to a given QoS, call dispatch_get_global_queue
and pass it the desired QoS class. Listing 10-4, for example, retrieves the global concurrent queue for the utility QoS class.
Objective-C
utilityGlobalQueue=dispatch_get_global_queue(QOS_CLASS_UTILITY,0);
Swift
utilityGlobalQueue = dispatch_get_global_queue(QOS_CLASS_UTILITY, 0)
Queues that don’t have a QoS assigned and don’t target a global concurrent queue infer a QoS class of unspecified.
Dispatch Blocks
The GCD block API allows QoS classes to be applied at the block level, such as when calling dispatch_async
, dispatch_sync
, dispatch_after
, dispatch_apply
, or dispatch_once
. You do this when you create the block, as shown in Listing 10-5.

Objective-C
dispatch_block_tmyBlock;
myBlock=dispatch_block_create_with_qos_class)(
0,QOS_CLASS_UTILITY,-8,^{…});
dispatch_async(myQueue,myBlock);
Swift
letmyBlock = dispatch_block_create_with_qos_class(0, QOS_CLASS_UTILITY) {
..
}
dispatch_async(myQueue, myBlock)
Priority Inversions
When high-priority work becomes dependent on lower priority work, or it becomes the result of lower priority work, a priority inversion occurs. As a result, blocking, spinning, and polling may occur.
In the case of synchronous work, the system will try to resolve the priority inversion automatically by raising the QoS of the lower priority work for the duration of the inversion. This will occur in the following situations:
When
dispatch_sync()
anddispatch_wait()
are called for a block on a serial queue.When
pthread_mutex_lock()
is called while the mutex is held by a thread with lower QoS. In this situation, the thread holding the lock is raised to the QoS of the caller. However, this QoS promotion does not occur across multiple locks.
In the case of asynchronous work, the system will attempt to resolve the priority inversions occurring on a serial queue.

Important
Developers should try to ensure that priority inversions don’t occur in the first place, so the system isn’t forced to attempt a resolution.
Specify a QoS for Tasks and Threads
Tasks and threads also support QoS.
NSTask and NSThread
Both NSTask
and NSThread
possesses a qualityOfService
property, of type NSQualityOfService
. These classes will not infer a QoS based on the context of their execution, so the value of this property may only be changed before the task or thread has started. Reading the qualityOfService
of a task or thread at any time will provide its current value.
The Main Thread and the Current Thread
The main thread is automatically assigned a QoS based on its environment. In an app, the main thread runs at a QoS level of user-interactive. In an XPC service, the main thread runs at a QoS of default. To retrieve the QoS of the main thread, call the qos_class_main
function, as shown in Listing 10-6.
Swift
letqosClass = qos_class_main()
To retrieve the QoS of the currently running thread, call the qos_class_self
function, as shown in Listing 10-7.
Swift
letqosClass = qos_class_self()
pthreads
You can assign a QoS class when creating a pthread by using an attribute, as shown in Listing 10-8, which creates a utility pthread.
VMware Workstation Player VMware Workstation Player is an ideal utility for running a single virtual machine on a Windows or Linux PC. Organizations use Workstation Player to deliver managed corporate desktops, while students and educators use it for learning and training. The free version is available for non-commercial, personal and home use. @gbiondo VMWare Workstation for Windows does have a free viewer that can run VMs so it is a valid question as to how run a VM for free under MacOS – mmmmmm Sep 13 '18 at 17:05 1 @gbiondo The question is On Windows there is free player for VMWare is there a free version ons MacOS – mmmmmm Sep 14 '18 at 9:56. VMware Fusion: Powerfully Simple Virtual Machines for Mac. VMware Fusion Pro and VMware Fusion Player Desktop Hypervisors give Mac users the power to run Windows on Mac along with hundreds of other operating systems, containers or Kubernetes clusters, side by side with Mac applications, without rebooting. Fusion products are simple enough for home users and powerful enough for IT. 'There is a free player for VMware on Windows, is there a free version as well for mac? If not, any other free alternatives?' VMware Workstation Player, also known as VMware Player is a free desktop virtualization software package used for simultaneously running several operating systems for 64-bit computers having Microsoft Windows or Linux.
Objective-C
pthread_attr_tqosAttribute;
pthread_attr_init(&qosAttribute);
pthread_attr_set_qos_class_np(&qosAttribute,QOS_CLASS_UTILITY,0);
pthread_create(&thread,&qosAttribute,f,NULL);
Swift
varthread = pthread_t()
varqosAttribute = pthread_attr_t()
pthread_attr_init(&qosAttribute)
pthread_attr_set_qos_class_np(&qosAttribute, QOS_CLASS_UTILITY, 0)
pthread_create(&thread, &qosAttribute, f, nil)
To change the QoS of a pthread, call pthread_set_qos_class_self_np and pass it the new QoS to apply, as shown in Listing 10-9.
Listing 10-9Changing the QoS of a pthreadObjective-C
pthread_set_qos_class_self_np(QOS_CLASS_BACKGROUND,0);
Mac Store
Swift
pthread_set_qos_class_self_np(QOS_CLASS_BACKGROUND, 0)
Priorities For Mac Os
About CloudKit and Quality of Service
If your app uses the CloudKit framework, it’s worth noting that certain CloudKit classes implement custom QoS behavior by default.
CKOperation
is a subclass of theNSOperation
class. Although theNSOperation
class has a default QoS level ofNSQualityOfServiceBackground
,CKOperation
objects have a default QoS level ofNSQualityOfServiceUtility
. At this level, network requests are treated as discretionary when your app isn’t in use.CKContainer
is a subclass of theNSObject
class. Interactions withCKContainer
objects occur at a QoS level ofNSQualityOfServiceUserInitiated
by default.CKDatabase
is a subclass of theNSObject
class. Interactions withCKContainer
objects occur at a QoS level ofNSQualityOfServiceUserInitiated
by default.
For information about CloudKit classes, see CloudKit Framework Reference.
Debugging Quality of Service Classes
There are several ways you can evaluate your code in order to determine whether a particular QoS has been applied.
Xcode
By setting breakpoints in Xcode or pausing your app while testing, you can inspect your app with the CPU usage gauge in the debug navigator in order to confirm that requested QoS classes are being applied. See Figure 10-1.
powermetrics
Use the powermetrics tool to analyze your app and determine how much time is being allocated to different QoS classes.
In Listing 10-10, metrics are retrieved for the running tasks on a device. The results show that an app is running primarily at a QoS level of user-interactive (19.96
), with much less user-initiated (0.62
), utility (0.0
), and background (0.0
) work occurring. As a result, the app is using more energy than if it were running more work at the lower QoS classes. If the breakdown provided for your app is not what you expect, then you should investigate further. Consider running spindump to analyze your code.
$ sudo powermetrics --show-process-qos --samplers tasks
*** Sampled system activity (Fri Feb 20 11:55:48 2015 -0800) (5004.56ms elapsed) ***
*** Running tasks ***
Name ID CPU ms/s User% Deadlines (<2 ms, 2-5 ms) Wakeups (Intr, Pkg idle) QOS (ms/s) Default Maint BG Util Lgcy U-Init U-Intr
ListerOSX 8083 21.05 79.16 0.00 0.00 10.19 4.60 0.00 0.00 0.00 0.00 0.43 0.62 19.96
See powermetrics(1) Mac OS X Manual Page for information on using this tool.
spindump
Use the spindump tool with the -timeline
option to sample and profile your app in order to determine which QoS class applies as a specific portion of code executes at a given time. Listing 10-11 shows that a thread is running at a QoS level of user-initiated.
$ sudo spindump -timeline ListerOSX
Thread 0x48e64c 1000 samples (1-1000) priority 37
<thread QoS user initiated, IO policy standard>
1000 thread_start + 13 (libsystem_pthread.dylib + 5149) [0x7fff8c3aa41d] 1-1000
1000 _pthread_start + 176 (libsystem_pthread.dylib + 12773) [0x7fff8c3ac1e5] 1-1000
1000 _pthread_body + 131 (libsystem_pthread.dylib + 12904) [0x7fff8c3ac268] 1-1000
See spindump(8) Mac OS X Manual Page for information on using this tool.
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use Privacy Policy Updated: 2016-09-13