Protection rings are different privilege levels granted to software, with the kernel being the most privileged, applications the least privileged, and drivers somewhere in between.

My question is why are they called rings? (as opposed to privilege levels) Is this justified historically or through the analogy making it easier to understand?

up vote 8 down vote accepted

Warning: This answer contains educated speculation.

"Rings" clearly expresses the "nested set" aspect of protection rings, which were described as "concentric" in early papers describing them.

The earliest citation for rings which I can find is the 1967 paper "Protection in an Information Processing Utility" by Robert M. Graham. It states,

We define rings to be ordered, disjoint sets of segments, numbered from 0 to some maximum.

Text repeated in the picture because it looks so darn cool

The 1972 paper "A Hardware Architecture for Implementing Protection Rings" by Michael D. Schroeder and Jerome H. Saltzer provides more language that reinforces this image (emphasis mine):

In a system which uses segmentation as a memory addressing scheme, protection can be achieved in part by associating concentric rings of decreasing access privilege with a computation.

and

Put another way, the sets of access capabilities represented by the various rings of a process form a collection of nested subsets, with ring 0 the largest set and ring r - 1 the smallest set in the collection.

The concentric circle metaphor clearly correlates to this notion of "nested subsets", in a way that other metaphors - like the OSI 7-layer "stack" model - do not.

The other language that works better with concentric circles is "gates." Again to quote Schroeder and Saltzer,

Restricting the start of execution in a particular domain to certain program locations, called gates, provides [protection]...

With a ring structure, a gate between two layers is the only clear connectivity point - whereas with a stack, a gate may exist on the line between the shared connection line, but other methods of access may be perceived by traversing the whitespace along the sides. Again, the OSI model more closely matches that, where layers may be 'leaped' and ignored. With a concentric ring structure, it becomes clear that every layer of access is cumulative (in one direction, in the case of protection rings.)

While gates do also lend themselves to the medieval castle design of concentric walls with gates between them, I cannot find any historic references equating Multics rings with castles; only modern references drawing the analogy in order to illustrate the concept.

This is going to be a low-quality answer, I'm afraid... but I can't put a picture in a comment.

I've always imagined it like the City of Gondor from The Lord of the Rings. To protect the tower in the centre of the city, the walls are built as concentric rings around the city.

To gain entrance to the higher rings implied a higher level of trust from the city's Steward.

The city of Gondor and the tower of Minas Tirith from The Lord of the Rings.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.