2.7.3 Protection Levels

T-Kernel assumes four levels of memory protection, from 0 to 3.

  • Level 0 has the highest privilege and level 3 the lowest.
  • Access can be made only to memory at the currently running protection level or lower.
  • Changing from one protection level to another is accomplished by invoking a system call or extended SVC, or by interrupt or CPU exception.

The uses of each protection level are as follows.

Protection level





0

OS, subsystems, device drivers, etc.



1

System application tasks



2

(reserved)



3

User application tasks



A nontask portion (task-independent portion, quasi-task portion, etc.) runs at protection level 0. Only a task portion can run at protection levels 1 to 3. A task portion can also run at protection level 0. Some MMUs support only two protection levels, privileged and user level. In such a case protection levels 0 to 2 are assigned to privileged level, and protection level 3 to the user level, as if there were 4 levels. In a system with no MMU, all protection levels 0 to 3 are treated as identical.

Comments