Retired Document
Important:
The Multiprocessing Services API is deprecated in OS X v10.8. In earlier versions of OS X, Multiprocessing Services allowed legacy apps to support multitasking. In apps that run in OS X v10.8 and later, you should use Grand Central Dispatch or POSIX threads to support multitasking. To learn about multiprocessing on OS X, see Concurrency Programming Guide; to learn about POSIX thread routines, see pthread
.
Introduction to Multiprocessing Services Programming Guide
Multiprocessing Services is a technology that allows your application to create tasks that run independently on one or more microprocessors. For example, you can have your application perform graphical calculations while writing data to a hard drive. Unlike the cooperative model (such as used by the Thread Manager or the Mac OS Process Manager), Multiprocessing Services automatically divides processor time among available tasks so no particular task can “hog” the system. On computers with multiple microprocessors, you can actually perform multiple tasks simultaneously. This feature allows you to divide up time-intensive calculations among several microprocessors.
This document is a complete guide to Multiprocessing Services 2.1 . This technology is available with Mac OS 9.0 and later (including Mac OS X), although some functions may work with earlier system software versions.
You should read this document if you want to add multitasking capability to Mac OS applications. This document assumes you are familiar with programming Macintosh computers. For more information about how the Mac OS handles applications in memory, see the documents Inside Macintosh: Processes and Mac OS Runtime Architectures.
Organization of This Document
This document covers Multiprocessing Services in the following chapters:
About Multitasking on the Mac OS describes the basics of multitasking and multiprocessing, as well as information about how Multiprocessing Services implements these capabilities on the Mac OS.
Using Multiprocessing Services contains programming examples and other detailed information about adding Multiprocessing Services to your application.
Preemptive Task–Safe Mac OS System Software Functions lists Mac OS system software functions that you can call from preemptive tasks.
Calculating the Intertask Signaling Time contains sample code you can use to determine the amount of time it takes to notify a task.
Changes From Previous Versions of Multiprocessing Servicesdescribes changes and additions to the Multiprocessing Services API between version 1.4 and 2.1.
See Also
For more information about multithreading on Mac OS X, see Threading Programming Guide in Carbon Process Management documentation.
For additional information about Multiprocessing Services, you should check the Apple Developer Web site: http://developer.apple.com
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-07-23