Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

System process model

Brew MP employs its system process model to host services and applications. A Brew MP process defines the set of rights and restrictions for the execution of the code it governs to access memory or other resources.

In Brew, applets execute in a single designated thread on the handset. This thread is commonly referred as the Brew thread, and is a single task context shared by all the running applets. Most of the earlier software implementations for Brew were created with the assumption that all the users of the software would execute in the same thread.

Threads live in processes, and code executing in a thread is limited in its access to memory and kernel services according to the process in which it lives. All operating system services of Brew MP are represented by objects. For example, critical section functionality is provided via an object that implements the ICritSect interface. The kernel enforces that applets can only access objects that they have been granted. The kernel does not decide to whom the objects are granted, nor does it dictate what the objects can do. The kernel, therefore enforces the mechanism, and not the policy.

Each process is given an Env that maintains its rights and establishes the protection boundary for the process. The protection domain and rights of a process are maintained via its Env. See Environments for more information.

The Brew MP system process model transparently supports memory-protected (multi-process), non memory-protected (single-process), single processor, and dual processor implementations. In modern operating systems, there is usually one kernel process and multiple user processes. For both performance and resources considerations, Brew MP only supports the kernel process and no user processes are supported. .

Kernel process

The Brew MP kernel process is a privileged execution environment that can access all memory, enforces privileges, and controls process interaction. There is only one instance of the kernel process on a Brew MP device.

The kernel process is the most privileged process that governs all the running objects and enforces their rights to access memory and resources. The kernel process also hosts critical system services; services running in the kernel process always have system level privileges.