Protection Ring

In Computer Science, the ordered protection domains are referred to as Protection Rings. These mechanisms help in improving fault tolerance and provide Computer Security. Operating Systems provide different levels to access resources. Rings are hierarchically arranged from most privileged to least privileged.

Use of Protection Ring :
Use of Protection Rings provides logical space for the levels of permissions and execution. Two important uses of Protection Rings are :

  1. Improving Fault Tolerance
  2. Provide Computer Security

Levels of Protection Ring :
There are basically 4 levels ranging from 0 which is the most privileged to 3 which is least privileged. Most Operating Systems use level 0 as the kernel or executive and use level 3 for application programs. A resource that is accessible to level n is also accessible to levels 0 to n and the privilege levels are rings.

Protection Rings



Modes of Protection Ring :
There are basically two modes : Supervisor Mode, and Hypervisor Mode. These are explained as following below in brief.

  1. Supervisor Mode :
    Supervisor Mode is an execution mode in some of processors which allows execution of all instructions including privileged instructions. It also gives access to different address space, to memory management hardware, and to other peripherals. Usually, Operating System runs in this mode.



  2. Hypervisor Mode :
    Modern CPUs offer x86 virtualization instructions for hypervisor to control “Ring 0” hardware access. In order to help virtualization, VT and Pacifica insert new privilege level below “Ring 0” and Both these add nine new “machine code” instructions that only work on Ring −1 and intended to be used by hypervisor.

Implementation :
Protection Rings are combined with processor modes against rule of slave in some systems. Operating system running on hardware that supports such rules can use both methods of protecting or only one of them. Efficient use of architecture of Protection Rings requires close interaction between hardware and operating system.

The operating system is designed such that they have worked on a lot of platforms and may have different implementation mechanism rings on each platform. The security model is generally simplified to two levels of access – first is level of “core” and second is level of “user”, even if hardware providing greater granularity of performance levels.

Features of Protection Ring :

  • Protection Ring follows hierarchy.
  • Protection Ring provides layered architecture.
  • Protection Ring provides Computer Security.
  • Protection Ring provides good Fault Tolerance.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.