Read this whole guide offline with no ads, for a very low price!
Click Here!

Custom Search







Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 7: History, Installing and Use of the MacOS
      9  You are Booted Up, Now What?

Previous Topic/Section
Context Switching
Previous Page
Pages in Current Topic/Section
1
Next Page
Virtual Memory
Next Topic/Section

Pre-Emptive Multitasking and Protected Memory

We were talking last about GetNextEvent and loops; now let us cover how Mac OS X blows that out of the water. In the Mac OS X with the scheduler a completely new concept is introduced. The scheduler is actually a part of a module of the operating system itself called the kernel, which loads before other programs and runs the operation of the very basic actions of the operating system. With the scheduler, a program can be written to have no interface elements at all, and therefore leave the user with complete control of the OS and computer.

In Mac OS X, when you run a program, the scheduler is in charge and allots a certain amount of processor time to that application. Since the scheduler is in total control, it is up the scheduler to decide when that particular application’s time is up, whereupon it takes back the control of the CPU, and lets the next program to start initiating code. Here is where the scheduler can pre-empt any application it wants to. With this pre-emptive action, Mac OS X begins a new layer of direction between the program and the microprocessor. Thankfully, this allows other things to take place, good things!

Ok, so we understand now that thanks to scheduler, the OS can pre-empt any application from using resources not allocated to it, or go beyond any designated time constraints. Now let us see how this affects memory. By design, all memory activity must be very strictly monitored in order for the scheduler to work. Hence, as a program’s code is run, certain safeguards are made to make certain that the program’s memory usage stays within the designated limits. So that if an application attempts to write any data inside some other program’s allocated space, or if one program interferes with the actions of any essential system resources, it will be stopped. This is how the concept of protected memory works.

The fusion of both pre-emptive multitasking and protected memory creates a layer of protection for the operating system in which no single rogue program or any other tasks or processes can take over the available system resources, or even the entire computer. Should there be a glitch or bug in a program or utility, that specific program will crash alone. Such a crash would not affect the rest of the system, but would also release the previously used memory and resources back to the operating system. Everything else running will continue to do so without error or interruption. With scheduler, programs are not forced to pay attention to the tasks being performed or any resource demands being made by other applications. In this environment, there simply are no interaction issues. In this type of setting, programs can carry on as well or as poorly as their designers intended, without affecting the stability of the operating system or the user’s level of control.


Previous Topic/Section
Context Switching
Previous Page
Pages in Current Topic/Section
1
Next Page
Virtual Memory
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



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.