Ring 2, 1
Re: Ring 2, 1
You may want to see this discussion at alt.os.development:
http://groups.google.com/groups?frame=r ... .com#link1
http://groups.google.com/groups?frame=r ... .com#link1
Re: Ring 2, 1
And yes, there do exist ring 1 and 2, but Intel doesn't seem to provide any mechanisms for using them with the virtual memory (though it could be easily done): that is, the per-page protection recognises only user level (ring 3) and the supervisor level (all other rings, I suppose; but I may be wrong).
Re: Ring 2, 1
frmo reading the technical docs, it sounds like ring1+2 were meant for things like device drivers, but since all other arch's only have a 0/3 style (kernel/user) levels, using 1+2 makes for interoperability issues + porting issues.
-- Stu --
Re: Ring 2, 1
What about speed? I've heard that switching from Ring 3 to Ring 0 seems to be relatively slow if compared to switching Tasks from Ring 3 to Ring 3. What about Ring 3 to Ring 2 to Ring 1 and Ring 0?
Re: Ring 2, 1
AFAIK, swithing from any lower-privileged level to the higher-privileged one involves calling an INT (or generating an exception, which is actually the same). That is, switching from ring 3 to ring 2 is the same that switching from ring 1 to ring 0.
Switching tasks from ring 3 to ring 3 always involves ring 0, since that's where the scheduler executes. In any multitasking system (provided that it doesn't use some perverted kind of cooperative-multitasking) you can never switch from one user process to another if you ARE a user process.
Switching tasks from ring 3 to ring 3 always involves ring 0, since that's where the scheduler executes. In any multitasking system (provided that it doesn't use some perverted kind of cooperative-multitasking) you can never switch from one user process to another if you ARE a user process.