[Gllug] Beagle Board
Andrew Farnsworth
farnsaw at stonedoor.com
Mon Jan 12 18:41:14 UTC 2009
Ok, so I over simplified a bit. Yes, you can do it on the older hardware but it
was not directly supported by the CPU, unlike today's CPUs or even those from the
68030 (68020 even maybe, but it didn't have a separate mmu which the 030 did)
did. These CPUs had a hardware interrupt that regularly tripped and was easily
used for preemptive multitasking. It is/was possible to do on older hardware,
but it was not standard across the board by any stretch of the imagination.
Andy
On Mon Jan 12 13:30 , Peter Corlett sent:
>On 12 Jan 2009, at 17:48, Andrew Farnsworth wrote:
>> In their defense, early PC Hardware did not include the necessary
>> circuitry to permit preemptive multitasking. [...]
>
>Actually, it did.
>
>To do pre-emptive multitasking, all you need is some means of
>generating a reasonably frequent and hopefully also regular interrupt.
>Ideally this comes from some sort of programmable timer, but if all
>else fails, zero-crossing of the PSU or some sort of timeout on an I/O
>device will have to do.
>
>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.
>
>The great thing about /* you are not expected to understand this */ is
>that it's really quite simple.
>
>Sure, you don't get protection between processes or virtual memory,
>and you may find you need to relink executables at launch time, but
>that's not *necessary* for pre-emptive multitasking to work. That's
>how the Amiga managed to pull off pre-emptive multitasking on a plain
>68000 CPU.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list