Why Do Operating Systems Only Utilize 2 of the 4 Processor Rings?

  • Thread starter Thread starter Alain De Vos
  • Start date Start date
  • Tags Tags
    Rings
AI Thread Summary
Most processors feature four protection rings, but operating systems typically utilize only two. This limitation stems from historical reasons, overhead concerns, and the specific environments in which these systems operate. For instance, Windows, primarily used in single-user home and office settings, finds two rings sufficient. In contrast, mainframe systems, which support multiple users, could benefit from additional rings. Operating systems like Multics and OS/2 experimented with more than two rings, but the complexity of Multics led to the development of the simpler Unix system. The two-ring model simplifies the management of privilege levels, with ring 0 reserved for the kernel and ring 3 for user applications. This design helps maintain security and manage mode switching efficiently. While Linux could have utilized all four rings, the decision to stick with two likely facilitated easier porting across different architectures. The core concept revolves around the distinction between privileged and unprivileged tasks, emphasizing the importance of isolating operations that require elevated privileges.
Alain De Vos
Messages
35
Reaction score
1
Most processors have 4 rings. Why do operating systems only use 2.
Historical reason ? Overhead ? There is no need for more than two rings ?
 
Technology news on Phys.org
I think its choice and the environment where a machine is used:

Windows is used in home and office with normally one user per machine hence two rings are sufficient.

Mainframe multi-user machines would take advantage of 3 rings or more.

Multics and OS/2 used more than 2 rings. Multics complexity lead ATT researchers to reject it and develop a simpler OS Unix

Anyway, here's some more info on it:

https://en.wikipedia.org/wiki/Protection_ring
 
Last edited:
  • Like
Likes Silicon Waffle
Alain De Vos said:
Most processors have 4 rings. Why do operating systems only use 2.
Historical reason ? Overhead ? There is no need for more than two rings ?
I often heard it from a few friends of mine who used to apply for positions that are basic OS or device drivers (DDs) related.
Historical reason concerns low-level system accessing modes, in which processes used to compete or use each other address spaces inadvertently . Layering would help them i.e (1) work in a more secure environment, (2) backtrack their switches between modes easier e.g your application may switch from ring 3 to ring 0 to get a function work for you but still under the supervision of your kernel, etc. Ring 1,2 are where all DDs, which are not software applications by definition, are being used. So applications e.g guest OSes created by virtual machines making most use of DDs might have their code resources stored in these rings.
 
Windows used to have ports for Alpha and MIPS. Both of these have only two rings. MacOS was on the Power architecture and 68K before that. These have only two as well. Linux grew up on x86 so I guess Mr. Torvalds could have used all four but that would have complicated future porting efforts. He either thought of this or just didn't need more.

BoB
 
The important abstraction is privileged and unprivileged. The degree of privilege is an extension of this, but the main idea of isolating tasks that require elevated privileges from those that do not is the important insight.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
hi; i purchased 3 of these, AZDelivery 3 x AZ-MEGA2560-Board Bundle with Prototype Shield and each is reporting the error message below. I have triple checked every aspect of the set up and all seems in order, cable devices port, board reburn bootloader et al . I have substituted an arduino uno and it works fine; could you help please Thanks Martyn 'avrdude: ser_open(): can't set com-state for "\\.\COM3"avrdude: ser_drain(): read error: The handle is invalid.avrdude: ser_send(): write...
Back
Top