www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/18/15:20:05

Date: 18 Jul 1994 14:54:32 U
From: "jbabcock" <jbabcock AT netrix DOT com>
Subject: RE: Real-time OS under DJGPP
To: "djgpp" <djgpp AT sun DOT soe DOT clarkson DOT edu>

A better way to classify multitasking systems is to distinguish them as
cooperative and preemptive.  A cooperative system (like Windows) requires each
task to release the CPU in order for the other tasks to run.  A preemptive
system works with a timer.  Each task has the CPU for a certain number of timer
ticks, and the CPU is switched between tasks by a supervisory procedure. 
Control can be voluntarily released before the alloted time expires.

A preemptive system requires a great deal more support for the programmer. 
Semiphores must be used to protect access to non-reentrant sections of code. 
If a task is preempted in a device driver (for example), another task may not
enter the device driver since the device will not be in the same state when the
preempted task resumes.

A more detailed description of the requirements for preemptive multitasking can
be found in most college level operating systems textbooks.

-Jim.
_______________________________________________________________________________
What do you mean by 'real-time multitasking'? I always supposed
real-time to be the contrary to multitasking... either a process owns the
cpu (real-time) or shares it (multitasking)???
Martin haltmayer AT uni-augsburg DOT de



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019