[Gllug] Beagle Board

Vidar Hokstad vidar at aardvarkmedia.co.uk
Tue Jan 13 09:55:36 UTC 2009


On 12 Jan 2009, at 18:30, Peter Corlett wrote:
> To do pre-emptive multitasking, all you need is some means of
> generating a reasonably frequent and hopefully also regular interrupt.
[..]

> On interrupt, the CPU can then push registers onto the stack, move the
> stack pointer to a different location, and pop the registers to
> restore the state for that process. Hey presto, a pre-emptive task
> switch.


I was about to complain about that claim the PC lacked hardware  
support for it too, but you did a much better job.

In fact, there was even a preemptive multitasking BASIC extension  
available for the Commodore 64, though that was a bit of a hack since  
it could rely on the interpreter loop, but you could do preemptive  
multitasking of assembly programs too if you'd really want to - it has  
all the desirable hardware support apart from a movable stack, but the  
stack is only 256 bytes as is rarely used much so with some creativity  
you could avoid making the context switches too expensive.

Vidar
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list