Page 1 of 1

Ring 2, 1

Posted: Tue Mar 26, 2002 4:01 pm
by Chris
Ok, i know there is ring 0 and ring 3, but is there a 2 or a 1, if so, could you send me any info?

Re: Ring 2, 1

Posted: Wed Mar 27, 2002 1:16 am
by Kernel Panic
You may want to see this discussion at alt.os.development:
http://groups.google.com/groups?frame=r ... .com#link1

Re: Ring 2, 1

Posted: Wed Mar 27, 2002 1:19 am
by Kernel Panic
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

Posted: Wed Mar 27, 2002 2:47 am
by df
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.

Re: Ring 2, 1

Posted: Wed Mar 27, 2002 3:31 am
by The_Legend
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

Posted: Wed Mar 27, 2002 5:12 am
by Kernel Panic
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.