Newsgroups: comp.sys.atari.st
Path: utzoo!utdoe!david
From: david@doe.utoronto.ca (David Megginson)
Subject: Re: Multitasking
Message-ID: <1991Feb14.133758.3687@doe.utoronto.ca>
Organization: Dictionary of Old English Project - U of Toronto
References: <74457@bu.edu.bu.edu> <1991Feb11.151210.4010@informatik.uni-erlangen.de> <1976@lee.SEAS.UCLA.EDU>
Date: Thu, 14 Feb 1991 13:37:58 GMT

In article <1976@lee.SEAS.UCLA.EDU> plinio@boole.seas.ucla.edu (Plinio Barbeito/) writes:
>Provided the time for a task switch is small enough.  If task switches
>were done every 10 seconds (and there's no law saying you can't), the
>user would notice.  Make task switches every microsecond and again
>being interrupted every now and then so that the scheduler can start
>up to "direct traffic".  Thus, in its simplicity, a single-tasking 
>system avoids the typical 10-40% overhead on the processor due to the 
>kernel having to do its housekeeping (e.g. basically "asking" each 
>process "Do you want to run now?").  An 8MHz single-tasking machine 
>running a given program would appear to be a 7.2 MHz machine if it had 
>multitasking overhead of only 10%.
>
>Since a lot of the time a single-user machine like the ST only needs 
>to be running one program, there'd better be a good reason to penalize 
>the user with a significant amount of overhead all the time.

It's not as bad as you make it out to be. First of all, all of the
interrupts (mouse handler, etc.) in the ST can slow down any program
as much as or more than a multi-tasking scheduler. The ideal way to
multi-task is to have the foreground program at full priority, and the
background program(s) at low priority. ie. if you are writing something
in an editor, the editor does not wasted CPU time while it is waiting
for a keystroke, and the compilation process in the background can use
the full CPU. As soon as you hit a key, the editor takes over most or
all of the CPU, and the compilation process bides its time until the
editor is waiting for another keystroke. I'm a fast typist, and I
don't find microemacs sluggish, even when virmf is making a new TeX
font in the background! If you have a slow hard disk, however, any
disk-bound process can slow down all the tasks. However, when I am
running only a single task under MT C-Shell or MiNT, I cannot notice
any speed difference between that and TOS.


David
-- 
////////////////////////////////////////////////////////////////////////
/  David Megginson                      david@doe.utoronto.ca          /
/  Centre for Medieval Studies          meggin@vm.epas.utoronto.ca     /
////////////////////////////////////////////////////////////////////////
