On Tue, 29 May 2012 12:52:19 +0200
PIRONNEAU Stéphane <
stephane....@free.fr> wrote:
> Hi,
>
> Can someone explain me the supervisor mode
> in the 68000, and how it is useful for a multitasking
> environment or OS ?
It is to do with protection of resources.
If you also have an MMU with the chip, then the supervisor an user
modes give you the following:
- different tasks can not access each other's memory (MMU)
- user tasks can not directly access peripherals
- user tasks can not directly control interrupts
- user tasks always have to go through the supervisor for any system
services
If you use the chip for an embedded system which runs only code you
wrote and which users can not modify, then you don't really need all
that and usually everything runs in supervisor mode (and no MMU). All
the tasks are yours, so you know that they are not malicious and do not
try to break the system.
However, on a system where you can have multiple users (including
hostile users) or you have to cater for programs from unknown origin
(including hostile code), then you can use the supervisor mode + MMU to
protect your system. A user can destroy his/her own tasks, but has no
access to other tasks and/or shared system resources.
It should be noted that the 68000's exception model had a flaw which
made it nearly impossible to realise virtual memory (you could do it
with two 68000 chips running in sync but a few clocks apart).
Motorola fixed that in the 68010.
Regards,
Zoltan
--
Zoltán Kócsi
Bendor Research Pty. Ltd.