[comp.sys.apple] Multitasking GS? Sure, why not.

spike@bu-cs.BU.EDU (Spike) (06/12/88)

	Could you have true Multitasking on the GS?  Yes, I think you.
UN*X, namely Minix, run on 8086 Machines which the GS is easily as
powerful as. 

	Would it be easy to do?  No.   It would take a great deal of
time and effort.  I do not believe that anyone could do it in their
spare time (not in any reasonable amount of time).  Also existing
software could not run under this OS as it is not likely to be well
behaved. 

	One of the major short coming in the GS is lack of real memory
management.  Any program can happily write to any memory at any time.
In a Multitasking environment this is a big problem, program can
overwrite each other and the OS.  Programs can bypass calls to the OS,
writing directly to the screen and disks, causing great deal of havoc
if more then one tries to access something at the same time.

*A place to start*

	What needs do be done first is for to write a compiler.  'C'
would be the most likely candidate, tho if well writen it could have
other front ends.  This compiler would produce code in a number of
models, using the 65816 banks.  The use of banks would make easly
relocatable, as could be loaded by the OS in to any avaible bank.
This could be done by having no 'long calls' in the code.  The 65816
allows you to relocate the stack, so each program could have its own
stack (C does quite a bit on the stack).  With a run time loader the
program could also have it's own data space or data/stack space.


	With this done porting Minix to the GS would be possible.
Also the compiler should bring big bucks ;-)

	Consider this a Request For Comment.  Lets get some ideas
flowing, and then see if we can put together a group or company to
write the compiler.

->Spike

       "You'll laugh, you'll cry, you'll kiss 3 bucks goodbye."
 UUCP:	...!harvard!bu-cs!bu-it!spike  INTERNET: spike@bu-it.bu.edu
CSNET: spike%bu-it@bu-cs   BITNET: spike%bu-it.bu.edu@bostonu "VPS sucks"

gwyn@brl-smoke.ARPA (Doug Gwyn ) (06/12/88)

In article <23275@bu-cs.BU.EDU> spike@bu-it.bu.edu (Joe Ilacqua) writes:
>	One of the major short coming in the GS is lack of real memory
>management.  Any program can happily write to any memory at any time.

Whitesmiths' Idris operating system managed quite well on LSI-11s,
which had the same problem.  Sure, a buggy program could crash the
system, but I doubt it would be any worse than current Apple IIGS
standalone software, which frequently crashes my GS.

>Programs can bypass calls to the OS, writing directly to the screen
>and disks, ...

Of course the running applications would have to behave themselves.
The IIGS ToolKit and ProDOS take care of practically everything along
these lines, so there is little excuse for IIGS programs to bypass the
official system interface.

>	What needs do be done first is for to write a compiler.  'C'
>would be the most likely candidate, tho if well writen it could have
>other front ends.  This compiler would produce code in a number of
>models, using the 65816 banks.  The use of banks would make easly
>relocatable, as could be loaded by the OS in to any avaible bank.
>This could be done by having no 'long calls' in the code.  The 65816
>allows you to relocate the stack, so each program could have its own
>stack (C does quite a bit on the stack).  With a run time loader the
>program could also have it's own data space or data/stack space.

Where have you been?  The IIGS loader already relocates while loading,
and it provides sufficient functionality to support multitasking.
There is already a C compiler, which is not terrific but should be
good enough.

Restricting code to fit in one bank is unacceptable.

ralphw@ius3.ius.cs.cmu.edu (Ralph Hyre) (06/14/88)

In article <23275@bu-cs.BU.EDU> spike@bu-it.bu.edu (Joe Ilacqua) writes:
>
>
>	Could you have true Multitasking on the GS?  Yes, I think you.
>UN*X, namely Minix, run on 8086 Machines which the GS is easily as
>powerful as. 
>*A place to start*
>
>	What needs do be done first is for to write a compiler.  'C'
>would be the most likely candidate, tho if well writen it could have
>other front ends.  This compiler would produce code in a number of
>models, using the 65816 banks.  The use of banks would make easly
>relocatable, as could be loaded by the OS in to any avaible bank.

Well, there's only 1 GS C compiler that I know of, but the Mac
cross-development environment is coming.  Those who remember the first
days of the Mac remember needing a Lisa to develop on.  This makes the
GS sound like a good way to sell Macs :-)

ACK (Amsterdam Compiler Kit) was used for PC-Minix, so there is a start.
There are already lots of back-ends, so 65816 might not be too hard.

Problem is mainly documentation, so that the inevitable assembler
can be made to fit with the C code calling conventions.  I think
someone needs to try with the APW C compiler (taking care not to do
any toolbox stuff) just to see what happens.

Good luck.  I'll join you when I get a GS myself.

-- 
					- Ralph W. Hyre, Jr.

Internet: ralphw@ius2.cs.cmu.edu    Phone:(412)268-{2847,3275} CMU-{BUGS,DARK}
Amateur Packet Radio: N3FGW@W2XO, or c/o W3VC, CMU Radio Club, Pittsburgh, PA

jm7e+@andrew.cmu.edu (Jeremy G. Mereness) (06/15/88)

As with any multitasking system, the software under it will have to behave
itself and follow some standards. Sure, a lot of programs may crash a
multitasking OS on the GS, but so do a great deal of programs on the Mac under
Multifinder because they don't follow the same such rules

>       One of the major short coming in the GS is lack of real memory
>management.  Any program can happily write to any memory at any time.

There are dedicated memory allocation tools on the GS, (memory manager, etc.)
and if the
thing were fast enough and had enough memory, it could conceivably do the job.

I would be satisfied with something like the Mac's old Switcher or a version of
Roger Wagner's Softswitch that could work with Prodos 16 applications, and
maybe some kind of protocol that some software that could most benefit from
multitasking or background use (such as com software when downloading or
fileserving) could work using interrupts. However, if people say the GS or GS+
(hope, hope) could be a true multitasker, than more power to it. But that'l
take a while. In the meantime, these "false multitasking" concepts could make
the GS a lot more powerful....


Capt. Albatross
jm7e+@andrew.cmu.edu

============
disclaimer: These opinions are mine and will remain so until more intelligent
or insightful or informed people are kind enough to show me the error of my
ways.
Remember: A mind is a terrible thing to baste.