Get the latest tech news

Prioritize work at the task level


Explains how app developers can reduce energy impact on computers running OS X.

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). Listing 10-10 Example of QoS inspection via the powermetrics tool$ 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 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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Work

Work

Photo of task level

task level

Related news:

News photo

AMD Begins Work Upstreaming More Versal 2 SoC Support For Linux

News photo

Artificial Intelligence and the Future of Work

News photo

Leaked memo: Amazon says staff in Germany can apply to work from home 2 days a week amid RTO push