Usually we use Ring 0 for the kernel and Ring 3 for user programs. Some drivers uses Ring 0, some other Ring 3.
But what about Rings 1 and 2?
I've read (from an unreliable source) that the Vista kernel runs some drivers in Ring 1, to have more stability than Ring 0 and more speed than Ring 3. Is this true?
How can this be realized? IIRC if I use paging I can only use segments with Ring 0 for Kernel page or Ring 3 for User page.
What are the differences between the 4 rings? In Ring 0 you are allowed to run any instruction, while in Ring 3 you cannot run many privileged instructions such as CLI/STI/HLT LGDT/LIDT/LTR and so. Ring 1 and 2 have the possibility to run such instructions?
Thanks
x86 protection rings
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
x86 protection rings
Please, correct my English...
Motherboard: ASUS Rampage II Extreme
CPU: Core i7 950 @ 3.06 GHz OC at 3.6 GHz
RAM: 4 GB 1600 MHz DDR3
Video: nVidia GeForce 210 GTS... it sucks...
Motherboard: ASUS Rampage II Extreme
CPU: Core i7 950 @ 3.06 GHz OC at 3.6 GHz
RAM: 4 GB 1600 MHz DDR3
Video: nVidia GeForce 210 GTS... it sucks...
Re: x86 protection rings
There is not too much difference between Rings above zero in x86 architecture. In Ring 1 you can't run priviledged instructions the same way as in Ring 3.AlfaOmega08 wrote:Usually we use Ring 0 for the kernel and Ring 3 for user programs. Some drivers uses Ring 0, some other Ring 3.
But what about Rings 1 and 2?
I've read (from an unreliable source) that the Vista kernel runs some drivers in Ring 1, to have more stability than Ring 0 and more speed than Ring 3. Is this true?
How can this be realized? IIRC if I use paging I can only use segments with Ring 0 for Kernel page or Ring 3 for User page.
What are the differences between the 4 rings? In Ring 0 you are allowed to run any instruction, while in Ring 3 you cannot run many privileged instructions such as CLI/STI/HLT LGDT/LIDT/LTR and so. Ring 1 and 2 have the possibility to run such instructions?
Thanks
The only gain is protection - the Ring 1 segments will be accessable from Ring 3 and Ring 0 from Ring 1.
But all this only if you using segments for protections which already nobody does ...
Stanislav
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: x86 protection rings
Vista runs some drivers in ring 3 for stability, not ring 1. However, Virtual PC runs guest OS kernels in ring 1 (a technique called "ring compression"), but this is an old technique that isn't necessary for CPUs that have the VT extensions.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager