[comp.sys.amiga] Multi-tasking and OS books

dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) (05/13/89)

In article <17183@usc.edu> papa@pollux.usc.edu (Marco Papa) writes:
>rely on MultiFinder.  Apple can try to fool end-users into thinking that 
>MultiFinder provides multitasking, but I don't think anybody on Usenet
>will ever believe that.  If you do, may I suggest you pick up ANY Operating
>Systems book.  It might be very educational.

  Although pre-emptive multi-tasking is desirerable, no OS book I've ever 
seen *requires* it.  So multi-finder is multi-tasking.  It allows more
than one process to be resident, and they will execute. You can have
programs doing serveral things "at once", right now I have a clock program
smartcom, and a rotating globe all executing under this non-multitasking
OS.  In face I believe OS/2 isn't pre-emptive either, it does task switches
on OS calls {I might be wrong}.  I do know that the Unisys A-Series low
end machines have a "true" multi-tasking OS and they aren't pre-emptive, they
do a context switch on OS calls {MCP if you work for Unisys} and a context
switch on I/O blocking.

  Multi-tasking is the ability to have more than one process resident, and
the ability to schedual more than one process to have access to the CPU.
All the OS books I've ever seen only require some form of task schedualing,
the most popular {and probably best} scheme is with an external clock that
triggers a CPU context switch to a task manager, that then decides who gets
the next time slice of CPU.  Failing to have an eternal clock, you then have
to perform the task switch at some other time.  I believe hooking this
task switch in with one or more OS calls is an undesierable, but workable
way of doing things.  Your right multi-finder isn't pre-emptive, but it
is multi-tasking.
-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////////////////////
David M. O'Rourke____________________|_____________dorourke@polyslo.calpoly.edu
|       It's only 1's & 0's, so how difficult can Computer Science be?        |
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|

papa@pollux.usc.edu (Marco Papa) (05/13/89)

In article <11336@polyslo.CalPoly.EDU> dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
>In face I believe OS/2 isn't pre-emptive either, it does task switches
>on OS calls {I might be wrong}.

You ARE wrong.

>the next time slice of CPU.  Failing to have an eternal clock, you then have
>to perform the task switch at some other time.  I believe hooking this
>task switch in with one or more OS calls is an undesierable, but workable
>way of doing things.  Your right multi-finder isn't pre-emptive, but it
>is multi-tasking.

Multi-Finder is a program switcher TOTALLY under program control. The 
program MUST be written with switch calls all over the place. When 1 simgle 
program that doesn't use multi-finder is run, NO OTHER program can take
control.  Apple is "advertising" Systems 7.0 as "True Multitasking" when 
comparing it to OS/2.  Such a comparison is a misrepresentation at minimum
and deceptive advertising in truth.

-- Marco
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) (05/14/89)

In article <17195@usc.edu> papa@pollux.usc.edu (Marco Papa) writes:
>Multi-Finder is a program switcher TOTALLY under program control. The 
>program MUST be written with switch calls all over the place. When 1 simgle 
>program that doesn't use multi-finder is run, NO OTHER program can take

  I believe there's a misunderstanding, M-Finder switchs on several calls and
"Get Next Event & SystemTask", both GNE & SysTask are called several times
by an "Macintosh" program.  There are calls specific to MF that do a better
job of Task switching, but they don't "require" you to use them for
multi-tasking to occur.  It's very hard to write a mac program that doesn't
make a OS call.  Therefore apple has Multi-finder task switch on several
OS calls.

  BTW:  I've done some checking on OS/2, are you 100% sure it doesn't task
switch on OS call.  It's suppose to run on older 80286's which I'm sure don't
have the hardware to do it pre-emptive.  Perhaps a calm, cool and collected
usenet person could set the record straight.
-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////////////////////
David M. O'Rourke____________________|_____________dorourke@polyslo.calpoly.edu
|       It's only 1's & 0's, so how difficult can Computer Science be?        |
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|

dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) (05/14/89)

:  BTW:  I've done some checking on OS/2, are you 100% sure it doesn't task
:switch on OS call.  It's suppose to run on older 80286's which I'm sure don't
:have the hardware to do it pre-emptive.  Perhaps a calm, cool and collected
:usenet person could set the record straight.

	Pre-emptive scheduling can be done with any processor.  For example,
Bryce once multi-tasked BASIC on his (PET or C64, forgot which).  I myself
have written preemptive schedulers for AT's and for my PET & C64 a long time
ago.

	To be able to do premptive scheduling *efficiently*, the OS must be 
designed for it.  The Amiga's was designed for it.  The IBMs and MACs OS were
not and you can see the mess they have to deal with now.


					-Matt

papa@pollux.usc.edu (Marco Papa) (05/14/89)

In article <11373@polyslo.CalPoly.EDU> dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
>  I believe there's a misunderstanding, M-Finder switchs on several calls and
>"Get Next Event & SystemTask", both GNE & SysTask are called several times
>by an "Macintosh" program.  There are calls specific to MF that do a better
>job of Task switching, but they don't "require" you to use them for
>multi-tasking to occur.  It's very hard to write a mac program that doesn't
>make a OS call.

But that is the whole point about program switching: on the Mac you HAVE to do 
a Dos call. Take any compute-bound program like a ray-tracer.  While it is
computing the rays there are NO system calls made.  On the Mac this program is
uninterruptible, unless you decide to SLOW down the system by injecting bogus
system calls within the computation.  Another problem happens with 
communication programs at high speeds.  When using multiple programs with
MultiFinder switching to another program can be deadly for a download. Not so
on a "real" multi-tasking OS like AmigaDOS or OS/2.

>  BTW:  I've done some checking on OS/2, are you 100% sure it doesn't task
>switch on OS call.  It's suppose to run on older 80286's which I'm sure don't
>have the hardware to do it pre-emptive.  Perhaps a calm, cool and collected
>usenet person could set the record straight.

You must be kidding. What do you think XENIX runs on? 80286s! And don't tell me
that UNIX is not preemptive.  Notice that UNIX was also implemented on 8088
machines: PC/IX run on an IBM XT.  You seem to confuse memory protection and
supervisor mode. You don't need memory protection to implement a pre-emptive 
OS; you need only supervisor mode. If you are confused about OS/2, go to your 
local Waldenbook or Dalton store: they have a miriad of OS/2 books that will
show you that OS/2 is a "preemptive OS" that supports tasks, processes and
threads (in fact from a black box point of view the multi-tasking 
capabilities of the Amiga are very similar to the ones offered by OS/2: not
a surprise since both OSs use concepts very well understood in the late 70s;
something Apple sems to have not had the time to grasp :-).

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

ugkamins@sunybcs.uucp (John Kaminski) (05/14/89)

In article <11373@polyslo.CalPoly.EDU> dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
=>  BTW:  I've done some checking on OS/2, are you 100% sure it doesn't task
=>switch on OS call.

's'matter, your "?" key stuck? :-)

=>It's suppose[d] to run on older 80286's which I'm sure don't
=>have the hardware to do it pre-emptive.  Perhaps a calm, cool and collected
=>usenet person could set the record straight.

Unfortunately, you are sure of a falsehood.  Check MINIX, which will run on
the "lowly" original IBM PC, which use{s,d} a 8088 chip, of which the 80286
is a superset.  Even directly to the point, MINIX will run on an AT which is
definitely 80286-based.  And MINIX definitely has preemptive process sched-
uling.  MINIX, as I understand it, uses a timer chip in the PC to generate
periodic interrupts.  Also, consider that the PC and the PC XT had no standard
real time clock, and all those dates and times in the directory listing are
derived from the user entering the date/time at boot time and that
aforemetioned (sp?) interrupt clock.
=>-- 
=>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////////////////////
=>David M. O'Rourke____________________|_____________dorourke@polyslo.calpoly.edu
=>|       It's only 1's & 0's, so how difficult can Computer Science be?        |
=>|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|

Extremely.

---
a-WYSIWYG, a-WYSIWIG                      _ _
a-WYSIWYG, a-WYSIWIG                     ////
a-WYSIWYG, a-WYSIWIG                    ////
a-WYSIWYG, a-WYSIWIG                   ////
In the jungle                   _ _   ////
The silicon jungle              \\\\ ////
The process sleeps tonight       \\\////
                                  \_X_/
---
We can only contemplate the facts as we are able to perceive them.
Do we get what we deserve, or deserve what we get?
"I've seen yellow stripes in the middle of the road before, kids, but
  never quite this WIDE!"  -- Tom "T-bone" Stankus

ugkamins@sunybcs.uucp (John Kaminski) (05/14/89)

In article <17207@usc.edu> papa@pollux.usc.edu (Marco Papa) writes:
.
.
.
=>Notice that UNIX was also implemented on 8088
=>machines: PC/IX run on an IBM XT.  You seem to confuse memory protection and
=>supervisor mode. You don't need memory protection to implement a pre-emptive 
=>OS; you need only supervisor mode.

You seem to confuse preemptive scheduling capability and hardware requirements
for it.  Since when does an 8088 have a supervisor mode?


(not intending to flame, but curious why you seem a bit self-contradictory)

---
a-WYSIWYG, a-WYSIWIG                      _ _
a-WYSIWYG, a-WYSIWIG                     ////
a-WYSIWYG, a-WYSIWIG                    ////
a-WYSIWYG, a-WYSIWIG                   ////
In the jungle                   _ _   ////
The silicon jungle              \\\\ ////
The process sleeps tonight       \\\////
                                  \_X_/

golden@cps3xx.UUCP (golden james) (05/14/89)

The long-awaited sequel to "OS/2 vs AmigaDOS" is finally at a USENET
node near you!  Thrill to the flames exchange of Mac and Amiga owners
everywhere.

(I might be forced to put "Multi-tasking" in my KILL file :-)

papa@pollux.usc.edu (Marco Papa) (05/14/89)

In article <5863@cs.Buffalo.EDU> ugkamins@sunybcs.UUCP (John Kaminski) writes:
>You seem to confuse preemptive scheduling capability and hardware requirements
>for it.  Since when does an 8088 have a supervisor mode?
>(not intending to flame, but curious why you seem a bit self-contradictory)

You're quite right.  UNIX on the 8088 has mostly been implemented using a
timer interrupt. Supervisor mode, when available, helps preventing access
to kernel protected areas.  The main point stands: you need really a little
to implement a preemptive OS. (on the 80286 UNIX usually uses supervisor mode
inside the kernel). On the IBM PC Level 0, the highest interrupt priority,
is attached to Channel 0 of the timer/counter and therefore is the best
candidate to use for preemptive scheduling. Back to the Amiga .... :-)

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

farren@well.UUCP (Mike Farren) (05/14/89)

dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
>
>  Although pre-emptive multi-tasking is desirerable, no OS book I've ever 
>seen *requires* it.  So multi-finder is multi-tasking.  It allows more
>than one process to be resident, and they will execute.
(And a lot more on preemptive vs. non-preemptive task switching)

The examples you give, though, have one major difference from MultiFinder,
and it is a crucial one.  They all do context switches under control of
the _system_, whereas MF does context switching under control of the
_application_.  If only one application does not allow MF to do its
context switching (like older applications may well), then multitasking
goes out the window, until that application is closed.  I do not find
this to be an acceptable situation.

-- 
           Mike Farren
           uucp: {your favorite backbone site}!hplabs!well!farren
           Fido: Sci-Fido, Fidonode 125/84, (415)655-0667

lphillips@lpami.wimsey.bc.ca (Larry Phillips) (05/14/89)

In <11336@polyslo.CalPoly.EDU>, dorourke@polyslo.CalPoly.EDU (David M. O'Rourke) writes:
>  Multi-tasking is the ability to have more than one process resident, and
>the ability to schedual more than one process to have access to the CPU.
>All the OS books I've ever seen only require some form of task schedualing,
>the most popular {and probably best} scheme is with an external clock that
>triggers a CPU context switch to a task manager, that then decides who gets
>the next time slice of CPU.  Failing to have an eternal clock, you then have
>to perform the task switch at some other time.  I believe hooking this
>task switch in with one or more OS calls is an undesierable, but workable
>way of doing things.  Your right multi-finder isn't pre-emptive, but it
>is multi-tasking.

You can call it multitasking if you want, but there is little difference
between making the user call for a context switch via keyboard or mouse action,
and making the currently running application call for a context switch via a
system call.

I think I'll call my Amiga a VM machine, because I can fake it in a program.

-larry

--
  - Don't tell me what kind of a day to have! -
+----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                |
| \X/    lphillips@lpami.wimsey.bc.ca or uunet!van-bc!lpami!lphillips  |
|        COMPUSERVE: 76703,4322                                        |
+----------------------------------------------------------------------+

wtm@neoucom.UUCP (Bill Mayhew) (05/16/89)

We ran Xenix 1.something and IBM's PC/IX on some PC/XT systems that
we have as long ago as 1985.  Peemptive scheduling was implemented
in a fashion using one of the 8253 timer channels to send a
periodic interrupt to the kernel (50 Hz, I think).  It more or less
worked, but thrashed miserably when several processes were fighting
over who got to use the 85 mS, 10 meg disk.  Yuck.

On the XT, there is no such thing as demand paged memory, nor is
there memory protection.  The edit/compile cycle proved pretty
tedious, as little slip-ups in pointer arithmetic would crash the
system.  We switched over to using msdos, as there was no advantage
to Xenix in that environment .. and it was much more difficult for
non-guru scientists to manage their systems.  The 640K environment
was also quite restrictive, and the "kernel" of msdos was smaller.
Everybody wanted to run 1-2-3 anyway.


Bill
wtm@impulse.UUCP

gillies@p.cs.uiuc.edu (05/17/89)

> Re: Multitasking
> 	To be able to do premptive scheduling *efficiently*, the OS must be 
> designed for it.  The Amiga's was designed for it.  The IBMs and MACs OS were
> not and you can see the mess they have to deal with now.

The main thing you want/need is a frequent repeating clock interrupt.
The PC rots because (I think) the original interrupt was only 18 times
per second (~55ms timeslice minimum).  The Mac's interrupt is 60 times
a second (vertical retrace interrupt) -- much more reasonable.  A
decent timeslice on today's multi-mips machines is 10-25 millisecs.
(40-100 interrupts/second).


Don Gillies, Dept. of Computer Science, University of Illinois
1304 W. Springfield, Urbana, Ill 61801      
ARPA: gillies@cs.uiuc.edu   UUCP: {uunet,harvard}!uiucdcs!gillies