Core

The Core of PwnOS (a.k.a. kernel) is everything that runs at Privilege Level 0.  It provides functionality for protected operations such as resource management and device I/O.

The root level of Core just contains an entry-point (CoreCallGate) into Core from Libraries.  From this entry-point, the calls are routed to their requested functions.  Most of these functions have associated preprocessing functions that retrieve the associated parameters.  These preprocessing functions may also check validity/security of the parameters passed-in, since the Libraries calling the Core don’t always have the same permissions as the Core calling its own functions directly.

Core is split into the following sections

Entry point into the Core from Libraries.
The Libraries section of PwnOS provides common, useful functions and functionality, and a gateway to the Core.
The Sync section of Core provides functions for mutual exclusion.
The Memory section of Core provides memory management functions.
The Threads section of Core provides thread and process management functions, including common scheduling operations.
The Messages section of Core provides functions for sending and receiving messages to and from message queues.
The I/O section of Core provides device management functions.
The Files section of Core provides functions for accessing files and virtual files.