System resource separation
The example operating system built throughout this chapter already has many interesting features, but it is still characterized by a flat model, with no memory segmentation or privilege separation. Minimalist systems do not provide any mechanisms to separate system resources and regulate the access to the memory space. Instead, tasks in the system are allowed to perform any privileged operation, including reading and altering other tasks' memory, executing operations in the address space of the kernel, and directly access peripherals and CPU registers at runtime.
Different approaches are available on the target platform, aimed at increasing the level of safety on the system by introducing a limited number of modifications to the kernel in order to:
- Implement kernel/process privilege separation
- Integrate memory protection in the scheduler
- Provide a system call interface through the supervisor call to access resources
Privilege levels
The Cortex-M CPU is designed to run...