[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multitasking
Hello GS crew!
*** MEGA-DISCLAIMER ***
Someone asked how multitasking works. I KNOW this has been discussed before :-)
but why not answer this simple question? I'll be very carefull - promised.
I do not get any money for it [unfortunately - I hope this will change.].
:-))))))
******
"Multitasking" with TM (The Manager) works similarly to Mac's MultiFinder.
[I've put it into quotes because a dude meant once that we know sh*t about
multitasking....remember? Hehehe...]. First you load some applications into
memory by launching them from the Finder. As soon as you have loaded them, they
are ready to multitask.
Well, almost. First, the biggest problem with multitasking is that most
programs do not support this feature. They don't crash or freeze the system,
they simply do nothing. Most applications, though, live at least in harmony
with those programs that make use of this new feature.
Imagine you have an application in the foreground (that does not multitask) and
another application (or severals...) that does actually support multitasking.
Then TM passes control to the applications the the background each time the
active program is not busy. For example, in a word-processor this happens when
you're not typing anything. In such situations TM allows those background
programs to process tasks, preferably in "small packets" so that the sleeping
application in the foreground can continue immediately.
Technically speaking, this method bases on "Null Events". Desktop application
depend on GetNextEvent, a toolcall that returns the next pending event. When
there is nothing to deal with, this procedure returns Null. Normally, an
application then loops around GetNextEvent until "something happens". TM
patches this routine and detects Null Events. It then knows that the active
program is doing nothing of interest. Therefore, it wakes up the first
background applications and executes the code segment between two
GetNextEvents. Upon returning from the background application, it checks the
event loop of the active program again, and if there is still nothing to
process, it calls the second background program etc etc.
In practice, multitasking is not that spectacular because there aren't many
applications that support multitasking. Spectrum is one of the progs that are
supposed to use the full potential of this environment. I'm indeed very
curious...I'll post a review as soon as I have installed it.
BTW, if you are still wondering how multitasking works, I recommend you to
download MultiView [Freeware]. It visualizes how this works by drawing a "CPU
chart". MultiView II will be uploaded as soon as TM 1.1 is done. MV II got tons
of new functions and requires less background time.
No PR, no names, no personal opinion - pure information. If you'd like to know
more about TM itself (this here only explains the concept behind MultiFinders),
please e-mail.
Henrik ___
/ \
| # # |
| \_/ |
\___/
--
MultiFinder is a trademark of an incorporated fruit.
___________________________________________________________________
| |
| Andre Horstmann | I am not Henrik, and Henrik is not me! |
| GEnie A.HORSTMANN | Ask me about ShadowWrite! Apple IIGS? |
| Internet: shadow@ | Hmmm - nicht immer, aber immer oefter! |
| ezinfo.vmsmail.ethz.ch | There's still a glittering in my eyes..|
|___________________________________________________________________|