Important: The information in this document is obsolete and should not be used for new development.
Preface - About This BookThis book describes the parts of the Macintosh Operating System that allow you to manage processes and tasks. It includes introductory material about managing processes on Macintosh computers as well as a complete technical reference to the Process Manager, the Time Manager, the Vertical Retrace Manager, and other process-related services provided by the system software.
If you are new to programming on the Macintosh Operating System, you should begin with the chapter "Introduction to Processes and Tasks." This chapter provides a general introduction to process and task management on Macintosh computers. It describes how the Operating System controls access to the CPU and other system resources to create a cooperative multitasking environment in which your application and any other open applications run. This environment is managed primarily by the Process Manager, which is responsible for launching processes, scheduling their use of the available system resources, and handling their termination.
This chapter also describes how your application can install tasks that are executed asynchronously from your application, usually in response to interrupts. You can
Once you are familiar with basic process and task management on Macintosh computers, you might need to look at the chapter "Process Manager." It describes how you can get information about open processes and, if necessary, launch processes and desk accessories. You can also use the Process Manager to alter the processing status of an application or to terminate your application.
- execute a task after a certain amount of time has elapsed
- execute a task repetitively
- notify the user while your application is in the background
- execute a task between screen refreshes
- execute a routine as part of the shutdown or restart process
If you want a task to be executed after some specified amount of time has elapsed, you can use the Time Manager to schedule that task for later execution. The task can reschedule itself, so you can use the Time Manager to execute a routine repetitively. You can also use the Time Manager to calculate elapsed times and to synchronize events in the Macintosh computer. See the chapter "Time Manager" for details.
The Vertical Retrace Manager allows you to schedule a task for execution during vertical retrace interrupts. Like Time Manager tasks, vertical retrace tasks can reschedule themselves so that they are executed repetitively. In general, you should use the Vertical Retrace Manager to handle repetitive tasks that need to be synchronized with the redrawing of the screen and the Time Manager to handle those tasks that don't. See the chapter "Vertical Retrace Manager" for details.
You can use the Notification Manager to inform users of significant occurrences in applications that are running in the background or in software that is largely invisible to the user. This software includes device drivers, vertical blanking (VBL) tasks, Time Manager tasks, completion routines, and desk accessories that operate behind the scenes. See the chapter "Notification Manager" for complete details.
You should read the chapter "Segment Manager" for information about how the Operating System manages the loading and unloading of your application's code segments into and out of memory. By dividing your application's executable code into segments, you allow it to run in a memory partition that is smaller than the total size of the application itself.
The final chapter in this book, "Shutdown Manager," shows how you can install procedures that are executed as part of the final stages of shutting down or restarting a Macintosh computer.
- Format of a Typical Chapter
- Conventions Used in This Book
- Special Fonts
- Types of Notes
- Assembly-Language Information
- Development Environment