Note: This book was previously titled Adding Multitasking Capability to Applications using Multiprocessing Services.
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.
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 Services”describes changes and additions to the Multiprocessing Services API between version 1.4 and 2.1.
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
Last updated: 2007-10-31