home .. forth .. colorforth mail list archive ..

Re: [colorforth] multitasking


On Fri, Oct 15, 2004 at 02:17:48PM -0400, Mark Slicker wrote:
> 
> I was curious about a couple things.
> 
> On a stack machine, how is multitasking acheived? 'pause' in
> colorForth will exchange between two sets of stacks by changing the
> stack pointers in the pentium registers. That is not an option for a
> stack machine.
> 
A great deal depends on the design of the chip.  If you want to support
more than a fixed number of contexts, you'll need a way to move the
on-chip stack (and any associated registers) to and from RAM.  For
performance reasons, you'll want explicit support for this in the
instruction set.  If you can afford the extra silicon and you want a
general-purpose CPU, this will work just fine.  Unless you can sell a
boat-load of them, they'll cost too much compared to off-the-shelf ARM
and MIPS devices.

For purpose-built machines though, I really like Chuck's x25 design: add
a MISC core for each task.

> Is the second task in colorForth really needed? It seems the display
> can clean up after itself, perhaps if you wanted to break the
> rendering into chunks a 'pause' might be useful, the same effect could
> achieved by a state variable however.
> 
I can't help you here.

> Mark
> 
-- Trey

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com