Multitasking and the Mac
To understand fully the concepts behind cooperative multitasking, pre-emptive multitasking and protected memory, we have to go back to comprehend the birth of multitasking. We will explore things that we all take now for granted and could not imagine spending a day without. First, we will look at the history and the cooperative multitasking used in Mac OS 9.
Way back when Macs were new, operating systems were made to be operated by one user working with one program. Obviously, this is no longer the case. Today, we want our computers to do more, faster, and with less work on our part. In order to understand these changes to task implementation, we have to explore a little more history.
Computer programs are a series of instructions stored in memory, and these instructions need data stored either in the microprocessor or in the RAM. These instructions are usually designed to carry out very specific tasks, like moving information from one location to another, compare the information and switch to subroutines depending upon the results of the comparisons. When these instructions are run by the microprocessor, it will keep track of where it is using a program instruction pointer.
At some level, such programs have total control over the computer at the time its running. At that time, the only code being executed is the code pointed to by the instruction pointer.
Those of us that can remember the 80s might remember programs that utilized a main event loop. This was code that ran hundreds of times a second, and the a command, specifically the GetNextEvent would interact with the rest of the OS, stopping the current program and passing control of the computer to the operating system. At this point, the OS saves the microprocessor state and the program counter. As soon as the OS is done, it reports to the program what activities were performed, and then the program can make any appropriate changes and move on.
Home - Table Of Contents - Contact Us
CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005
Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.