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 :
- Improving Fault Tolerance
- 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.
Modes of Protection Ring :
There are basically two modes : Supervisor Mode, and Hypervisor Mode. These are explained as following below in brief.
- 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.
- 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.
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.
- Hardware Protection and Type of Hardware Protection
- System Protection in Operating System
- Difference Between Security and Protection
- Protection in File System
- Difference between Batch Processing and Stream Processing
- Difference between Multitasking and Multiprocessing
- Calculate server loads using Round Robin Scheduling
- Difference between Multiprocessing and Multiprogramming
- Difference between Batch Processing OS and Multiprogramming OS
- Difference between Batch Processing System and Online Processing System
- Layered Operating System
- Getting hash of a file using CMD
- Difference between Time Sharing OS and Multiprogramming OS
- Difference between Multiprogramming and Multithreading
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.