Under the Hood - Rings

Introduction
In this series, we will be looking under the hood of the Cosmos system, the framework for our OS. We will be looking at Hardware, Plugs, and their own language, X#. Let's start off with Rings.

What are Rings?
"Rings are Cosmos's basic 'security' feature. They restrict the actions of code so that less can go wrong. A code in a specific ring can only reference and thus use code in the adjacent rings." -Cosmos GitHub Wiki, Rings.

That's the official definition of rings from the official Cosmos wiki. There are four rings, and, as stated above, you can communicate with the ring next to it. The default ring for Cosmos is User, ring 3. Here is a list of the Cosmos rings:

0: Core

1: HAL

2: System

3: User

By adding another OS to your Solution, removing the Boot Project and Kernel class, adding  in your AssemblyInfo.cs file, and linking it to your main OS, you have successfully created an operating system that can use the system hardware.

So, why do this?
With out creating a link to the system hardware, you can't do even simple things like create a mouse! But that we will get to when we talk GUI. Let's get back to our main OS.

Categories:Browse