close
The Wayback Machine - https://web.archive.org/web/20130425155136/https://developer.apple.com/technologies/mac/core.html

OS X - Core Technologies

OS X incorporates advanced core technologies that improve performance throughout the system. As a developer, you can use these advanced technologies in your app to make it faster, more responsive, and able to take advantage of the latest Mac hardware.

Image

Grand Central Dispatch

Write Less Code, Get More Done

The key innovation of GCD is shifting the responsibility for managing threads and their execution from applications to the operating system. As a result, programmers can write less code to deal with concurrent operations in their applications, and the system can perform more efficiently on single-processor machines, large multiprocessor servers, and everything in between. Without a pervasive approach such as GCD, even the best-written application cannot deliver the best possible performance, because it doesn’t have full insight into everything else happening in the system.

Image

A Finely-tuned Engine

Grand Central Dispatch is extremely efficient at what it does. It dynamically scales the workload of an application to account for the number of processors in the computer. And it makes applications more efficient by using only the number of threads required for the work being done. For example, without GCD, if an application needs 20 threads when at maximum capacity, it might set up 20 threads and consume the associated resources even when it has nothing to do. GCD, by contrast, frees resources when it’s not using them, helping to keep the whole system more responsive.

Let the Operating System Do It for You

With GCD, threads are handled by the operating system, not by individual applications. GCD-enabled programs can automatically distribute their work across all available cores, resulting in the best possible performance whether they’re running on a dual-core Mac mini, an 8-core Mac Pro, or anything in between.

GCD is implemented as a set of extensions to the C language as well as a new API and runtime engine. While initially inspired by the challenge of multicore computing, these actually solve a more general problem: how to efficiently schedule multiple independent chunks of work.

Image

64-Bit Throughout

A 64-Bit Kernel

OS X runs a 64-bit kernel on capable Mac systems. The larger address space enables much faster system calls, which dramatically boosts the performance of network services and other I/O-intensive applications that are important to professional customers.

64-Bit Applications

In OS X, nearly all system applications are 64-bit, enabling the Mac to address massive amounts of memory. 64-bit computing shatters the 4 GB barrier of 32-bit computing by enabling applications to address a theoretical 16 billion gigabytes of memory, or 16 exabytes. It can also enable the Mac to crunch twice the data per clock cycle, which can dramatically increase the speed of numeric calculations and other tasks.

Image

Additional Security Benefits

Another benefit of 64-bit applications is that they’re even more secure from hackers and malware than 32-bit versions. 64-bit applications can use more advanced security techniques to fend off malicious code and can keep their data out of harm’s way using a more secure function argument-passing mechanism.

To ensure simplicity and flexibility, OS X runs both 64-bit and 32-bit applications. So you don’t need to update everything on your system just to run a single 64-bit program.

Image

OpenCL

Harnessing the Power of the GPU for Your Application

OpenCL dramatically accelerates your application by giving you the ability to access the amazing parallel computing power of the GPU. OpenCL also opens up a new range of computationally complex algorithms for use in your application. Possibilities include: Using OpenCL to bring sophisticated financial modeling techniques to accounting applications, performing cutting-edge analysis on large media files, and incorporating accurate physics and AI simulation into entertainment software.

Image

Optimization Is Automatic

OpenCL uses runtime compilation to optimize for the kind of graphics processor in the Mac ‐ automatically adjusting itself to the available processing power. OpenCL also rigorously defines numerical precision and accuracy, providing for consistent results across a wide-variety of GPU hardware.

Just Change the Code You Need

OpenCL stands for Open Computing Language. It uses an approachable C99-based language and a flexible API for managing parallel computation. To accelerate your application, simply use Xcode to rewrite the most performance-intensive parts of your code for OpenCL. The vast majority of your application’s code can be left unchanged.