Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!usc!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-sdd!ncr-sd!crash!fgbrooks
From: fgbrooks@crash.cts.com (Fred Brooks)
Newsgroups: comp.sys.atari.st
Subject: Re: Multitasking on the ST
Keywords: MX2, process swapping
Message-ID: <194@crash.cts.com>
Date: 13 Aug 89 05:20:29 GMT
References: <8908021826.AA05333@ucbvax.Berkeley.EDU> <15627@watdragon.waterloo.edu> <1989Aug4.173233.8259@sj.ate.slb.com> <1067@philmds.UUCP> <1989Aug11.175942.6534@sj.ate.slb.com> <1069@philmds.UUCP>
Reply-To: fgbrooks@.UUCP (Fred Brooks)
Organization: Crash TimeSharing, El Cajon, CA
Lines: 36

In article <1069@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes:
>In article <1989Aug11.175942.6534@sj.ate.slb.com> greg@sj.ate.slb.com (Greg Wageman) writes:
>Processes that are
>waiting for some state change like a character from the keyboard
>becoming available, or the printer being ready to receive further data,
>are marked that way and will only be selected if the state they're
>waiting for changes (the test for the changed state is just a simple
>index comparision in most cases). Calls that can be safely assumed to
>complete within a reasonable amount of time are not marked waiting

I intercept the BIOS trap vector and add my own routine to do the BConin
call. If nothing is waiting in the buffer then I swapout the current process
, if a char is is the buffer it is passed on to the calling process and a
countdown variable is set to say 100 so that when then next time the buffer
is empty it won't swapout until it has checked the buffer a few times.

>|I must admit the idea sounds like it has merit.  However it's easy to
>|try something like this when blissfully unaware of the pitfalls.  The
>|biggest one I see is that GEMDOS itself is not written to be
>|re-entrant.
>
>Sure, but a) GEMDOS is not being re-entered and b) in a special way,
>GEMDOS IS re-entrant. After these stunning remarks, I'll have to make
>myself clear 8-):

GEMDOS surely can be made re-entrant. Take a quick look at my MX2 source
for an example. I admit my method is not perfect but it works 'sometimes'.

>Cheers,
>         Leo.
>
>P.S. The current version screamed for job control, signalling etc. so
>that's being implemented right now (together with some system calls
>like signal() and kill()).

I would like a copy if you are giving it away with source.