🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #7229

Re: Task WAIT on a Mac

#7229
From: David Phillip Oster
Date: Fri, 26 Sep 1986 17:06
57 lines
3739 bytes
In article <255@husc6.HARVARD.EDU> (mitsuharu hadeishi) writes:
>
>The Mac software architecture, although revolutionary in its time, makes
>it MUCH more difficult for old applications to run comfortably in a
>multitasking environment (and much less efficient, since an event loop
>is inherently less efficient than a event-driven task (that uses
>task Wait()ing.))  ...

Please correct me when I am wrong, but I'm under the impression that the
Amiga has both time-sliced multi-tasking and, a routine called Wait() hat
lowers the priority of an application.  The application is supposed to
call Wait() when it has nothing to do.   How do Amiga programmers handle
continuous mouse tracking so their programs can change the cursor shape as
the cursor enters different kinds of objects?

On the Mac, the equivalent routine to Wait() is called SystemTask.
SystemTask() suspends its caller and gives other applications a chance to
run.  If you want time sliced multi-tasking, you just queue a task on the
vertical interrupt queue, to be awakened at a future time that is a
essentially a parameter of the queue call.  Interrupt handlers are also
straight forward, and are used in Mac device drivers.

My Menu Clock runs as a SystemTask style task, drawing the time in the
menu bar only when the application has asserted, by calling SystemTask,
that it is okay to style a couple of cycles to do the drawing. 

Mac owners can see mult-tasking by going into an editor, and resizing the
window to about half screen size.  Bring up the KeyCaps desk accessory
and put it beside your editor window.  Click on the editor window and
begin typing.  KeyCaps tracks the state of the keyboard even when it is
not the top window.  

(I have written 90% of a desk accessory that uses this
technique to give a histogram of your instantaneous typing speed, recorded
over the last 15 minutes, with numerical average speeds for the last 5 and
15 minuetes. When it is finished, I will post it.)

Some things you can't do on a Mac:
1.) Time-slice Multitask two vanilla application programs. (Andy Hertzfeld
said that he decided not to do it in Servant because the amount of task
state you need to swap in the current applications makes the swap to
slow.)  (You can multi-task applications and desk accessories though. And
there have been some pretty powerful desk accessories released: Click-On
WorkSheet, MockWrite and MiniWrite, and Acta (an outline editor) spring to
mind.)

2.) give tasks of the same class priorities.  Withing the constraints of
memory, you can have "w" applications active at once, "x" desk accessories,
"y" vbl tim-slice tasks, and "z" device drivers.

Are there any Amiga programmers who needed task priorities?  If so, why ?

I'm not trying to flame, I'm trying to learn.

--- David Phillip Oster		-- "We live in a Global Village."
Arpa: oster@lapis.berkeley.edu  --
Uucp: ucbvax!ucblapis!oster     -- "You are Number Six."
Technical Details
Message-ID: <1341@jade.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!qantel!lll-lcc!lll-crg!nike!ucbcad!ucbvax!jade!lapis!oster
References: <3868@ut-ngp.UUCP> <3374@ism780c.UUCP> <15656@ucbvax.BERKELEY.EDU> <167@apple.UUCP> <4027@ut-ngp.UUCP> <255@husc6.HARVARD.EDU>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!qantel!lll-lcc!lll-crg!nike!ucbcad!ucbvax!jade!lapis!oster
From: oster@lapis.berkeley.edu (David Phillip Oster)
Newsgroups: net.micro.mac,net.micro.amiga
Subject: Re: Task WAIT on a Mac
Message-ID: <1341@jade.BERKELEY.EDU>
Date: Fri, 26-Sep-86 13:06:57 EDT
Article-I.D.: jade.1341
Posted: Fri Sep 26 13:06:57 1986
Date-Received: Tue, 30-Sep-86 06:33:50 EDT
References: <3868@ut-ngp.UUCP> <3374@ism780c.UUCP> <15656@ucbvax.BERKELEY.EDU> <167@apple.UUCP> <4027@ut-ngp.UUCP> <255@husc6.HARVARD.EDU>
Sender: usenet@jade.BERKELEY.EDU
Reply-To: oster@lapis.berkeley.edu.UUCP (David Phillip Oster)
Organization: University of California, Berkeley
Lines: 57