• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Looking Inside Windows XP Pro... > Multitasking and Symmetric Multiproc...

Multitasking and Symmetric Multiprocessing

MS-DOS and other simple operating systems allow you to run only a single program at a time. A multitasking operating system allows you to run multiple programs at the same time. Actually, in a single CPU system, only one process is active and running at any particular point in time. Processes can be further subdivided into units of instructions called threads, each performing tasks that can be run in parallel with other tasks that the application requires. Each thread is given what at first appears to be a very short amount of time in which to run, measured in milliseconds. However, keep in mind that today's fast CPUs can run millions of instructions per second, so even a small time slice granted to a particular program thread can be more than sufficient to accomplish a lot of work.

In a single CPU system, only one thread can execute at a time on the CPU. The method used to decide when it is time for a thread to stop executing and yield the processor to another thread is important. In Windows 3.1, for example, nonpreemptive multitasking was used. This method works by letting a particular task run until it is finished, and it voluntarily gives up the CPU to the next task. Of course, if the running program doesn't want to let go of the CPU, then your system can hang up. In preemptive multitasking, which is the method used by Windows XP, the operating system determines when it is time for a task to yield to another task.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint