CPU Privilege Rings: Why rings 1 and 2 aren't used?

前端 未结 3 1775
刺人心
刺人心 2020-12-04 05:55

A couple of questions regarding the x86 CPU privilege rings:

  • Why aren\'t rings 1 and 2 used by most operating systems? Is it just to maintain code compatibi

3条回答
  •  被撕碎了的回忆
    2020-12-04 06:20

    From the perspective of OS design, having multiple privileged rings is an oddity of x86 -- most other CPUs only have two modes (supervisor and user). As such, designing an OS to require multiple privileged modes will immediately prevent it from being ported to any other CPU. Additionally, many modern virtualization packages don't correctly emulate privilege levels other than 0 and 3, making OSes that use these levels much more difficult to test.

提交回复
热议问题