[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Real" Multitasking (Re: GNO questions...)



slp@vax1.mankato.msus.edu writes:

>FYI: People who refer to preemptive multitasking as "real" multitasking are
>people who know sh*t about what's what.  

  Please, if you have a valid point then you don't need to attempt to
offend people to get it across.

>Cooperative multitasking is every
>bit as real (or actually fake) as preemptive multitasking.  (The reason I
>say actually fake is that under both systems, the processor is never truly
>running things simultaneously.  

  We know this.

>Both systems put one or more processes on
>hold while running another.  The only difference between the two is how the
>computer decides to put one process on hold and run another.  Preemptive
>multitasking distributes time more smoothly and fairly, and is thus ideal
>for multi-user systems.  However, it is less efficient.  

  It's only as inefficient as the implementation of the routines that 
maintain per-process information.  GNO (preemptive) stores all the registers, of
course, as must a cooperative system.  All other process-dependent context
information is accessed through a single pointer which is also context
switched.  No less effecient than cooperative (and you could in fact
implement a cooperative system like that if you designed it from the
ground up).

>A cooperative
>multitasker generally doesn't have to save as much information (ie. registers,
>machine state, etc.) during switches so it is more efficient.  

  A cooperative multitasking doesn't have to save as many registers? Eh?

>Cooperative multitasking is
>more efficient for many reasons I didn't mention above and is always the best
>way to go unless you absolutely require a level of smoothness that justifies
>the additional overhead and complexity of preemptive multitasking and the
>problems that go with it (re-entrant OS routines and so on). 

  Excuse me?  There are MANY other reasons preemptive multitasking
is clearly superior to cooperative.  This is NOT a Macintosh slam.
The Mac was stuck with cooperative because MultiFinder was an add-on mega-hack.
System 7.0 could easily have been a complete rewrite utilizing
preemption and the Mac would be the better for it.  Cooperative OS routines
have to be reentrant as well, if they call the Event manager.  In a preemptive
system, you look at the code; if it uses globals, you turn off task
switching or use semaphores.  It's simple, in fact it's trivial.

>Those who wish to flame me via E-mail please send to "gtr@tfsquad.mn.org"
>(not the address listed as "From" above as I'm on a friend's account
>at the moment).

  Really, we can do without unnecessary flame fodder from someone who
doesn't even care.

>-GTR
-- 
 Jawaid Bazyar              |   Ask me about the GNO Multitasking Environment
 Procyon, Inc.              |   for the Apple IIgs!   
 bazyar@cs.uiuc.edu         |   P.O Box 620334
 --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 781-3273