activepolaris.blogg.se

\less\ mac os x for archive utility
\less\ mac os x for archive utility







\less\ mac os x for archive utility
  1. LESS MAC OS X FOR ARCHIVE UTILITY HOW TO
  2. LESS MAC OS X FOR ARCHIVE UTILITY PDF

Table 10-3 NSOperationQueue QoS inference and promotion rulesĪ queue has no QoS assigned and an operation with a QoS is added to the queue. Listing 10-1Setting the quality of service of an operation

LESS MAC OS X FOR ARCHIVE UTILITY HOW TO

Listing 10-1 shows how to set the QoS for an operation. The NSOperation and NSOperationQueue classes both possess a qualityOfService property, of type NSQualityOfService, which can be set to one of the following values: If your app uses operations and queues to perform work, you can specify a QoS for that work. Threads can have an unspecified QoS if they use legacy APIs that may opt the thread out of QoS. This represents the absence of QoS information and cues the system that an environmental QoS should be inferred. This QoS is not intended to be used to classify work. Work that has no QoS information assigned is treated as default. The priority level of this QoS falls between user-initiated and utility. Work takes significant time, such as minutes or hours. Work that operates in the background and isn’t visible to the user, such as indexing, synchronizing, and backups. Work takes a few seconds to a few minutes. Focuses on providing a balance between responsiveness, performance, and energy efficiency. Utility tasks typically have a progress bar that is visible to the user.

LESS MAC OS X FOR ARCHIVE UTILITY PDF

Work that may take some time to complete and doesn’t require an immediate result, such as downloading a PDF or importing data. Work is nearly instantaneous, such as a few seconds or less.

\less\ mac os x for archive utility

Focuses on responsiveness and performance. The work is required in order to continue user interaction. 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. If the work doesn’t happen quickly, the user interface may appear frozen. Work that is interacting with the user, such as operating on the main thread, refreshing the user interface, or performing animations. Table 10-1Primary QoS classes (shown in order of priority) As shown in Table 10-1, there are four primary QoS classes, each corresponding to a level of work importance. When you assign a QoS to a task, consider how it affects the user and how it affects other work. As a result, the work performed maintains a balance between performance and energy efficiency. The system uses QoS information to adjust priorities such as scheduling, CPU and I/O throughput, and timer latency. Accurately specifying appropriate QoS classes for the work your app performs ensures that your app is responsive as well as energy efficient. In some cases, system resources may be reallocated away from the lower priority work and given to the higher priority work.īecause higher priority work is performed more quickly and with more resources than lower priority work, it typically requires more energy than lower priority work. For example, the system performs work initiated by a user sooner than background work that can be deferred until a more optimal time. By assigning a QoS to work, you indicate its importance, and the system prioritizes it and schedules it accordingly. A much simpler solution is to utilize quality of service (QoS) levels-known as classes-in your app.Ī quality of service (QoS) class allows you to categorize work to be performed by NSOperation, NSOperationQueue, NSTask, NSThread, dispatch queues, and pthreads (POSIX threads). These attributes, however, can be difficult to access and configure. 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. OS X implements a variety of resource management attributes, which can be adjusted in order to improve the responsiveness and efficiency of the system. Therefore, it is still important to categorize the work your app performs. 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. This higher priority work often uses more energy, as it may require substantial and immediate access to system resources.Īs a developer, you can help the system prioritize work more effectively by categorizing your app’s work, based on importance. 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.

\less\ mac os x for archive utility

In order to remain responsive and efficient, the system needs to prioritize tasks and make intelligent decisions about when to execute them. Apps and processes compete to use finite resources-CPU, memory, network interfaces, and so on.









\less\ mac os x for archive utility