Newsgroups: comp.sys.acorn.advocacy
Subject: Re: The ARM Club
From: banksie@khantazi.welly.gen.nz (Philip R. Banks)
Date: Thu, 12 Nov 1992 12:44:25 +1300
Reply-To: banks_p@kosmos.wcc.govt.nz
Organization: My Arc.

david@cosc.canterbury.ac.nz (cantua) writes:

> Quick redraws are great, but my point was that using 100% CPU while the
> user was dragging a window, even if the operation didn't require 100%
> CPU, is a waste - especially if some other task could have made use of
> that CPU time.  I wouldn't like everthing else (background processes,
> disk IO, etc) to stop just because I'm dragging a window.  My opinion...

   Certainly other tasks get stopped. But because the window redraw code has
100% CPU utilisation the hiatus (sp?) is as small as possible. Remember
co-operative taskings aim is to respond to the user as fast as possible not
to provide efficient backgrounding.

> Yes, I see your point about dynamic re-priotising, but you may not always
> want the "current" task to have the majority of the CPU.  Also, with
> pre-emptive, if the task handling user input is a system one, which is by
> default at a high priority, then the user need do nothing to priorities
> to get good response.

   The assumption on a co-operative system is that whatever the user is
doing has highest priority. This does mean backgrounding of tasks so that
they aren't affected by what the user is doing is effectively impossible, if
you want that you get a pre-emptive OS. Also on a co-operative system is
matters not if the task is a 'system' one or not, if the user is using it it
gets the highest priority.

> Huh?  I'm sorry I don't see what you're saying here.

   Merely that tasks are unaware of their priority in the system just like
pre-emptive tasks are.

> I don't see how response in a co-operative system is far better.

   It is better because the task being used always gets 100% CPU power to do
things. Thus redraws are faster, calculations are always done at maximum
possible speed, disc accesses are always at maximum speed etc...

> Co-operative puts the onus on the application writers to get things
> right (which is often too much to ask).  Pre-emptive leaves it up to
> the OS to get it right, and is independent of the user applications.

   Pre-emptive also suffers from often saving and restoring alot of unneeded
context. It suffers from complexity to the user if they wish to tailor tasks
speed. It suffers from a slower responsiveness because background tasks can
'cycle-steal' from the current user task. Where pre-emptive is good is as an
efficient resources utilisor. Where co-operative is good is at user
responsiveness and its dynamic response to the users activities.

   The two have radically different aims and features. Please note I am not
saying co-operative tasking is a better form of tasking than pre-emptive or
vice-versa. Merely a different form of tasking with it's own inherent
advantages and disadvantages. And one of those advantages is good
responsiveness to the user. Is there anything else that need be said?

    Philip

--
Philip R. Banks  Syntax: mail < banks_p@kosmos.wcc.govt.nz >            @@@@@/|
Take a look around you at the world we've come to know,                 @@@@/#|
Does it seem much more than a crazy circus show?                        @@@/##|
Maybe from the madness something beautiful will grow....                @@/---|
   ---The Artilleryman from Jeff Wayne's "War of the Worlds"            @/    |
Newsgroups: comp.sys.acorn.advocacy