Process Management

What are Processes?

A process is like a separate logic task running in its own protected workspace. Think of it like each app on your smartphone - they run independently and can’t interfere with each other. Naturally, embedded devices don’t use flexibility of smartphones and run same tasks all the time. The advantage of process concept here is that they are separated from each other.

CMRX brings this concept to microcontrollers for the first time. Instead of having all your code mixed together in one big program, you can split it into separate processes that are isolated from each other.

How Processes Work in CMRX

Each Process Gets Its Own Space

Every process has:

Note that unlike Linux or other POSIX-compliant systems in CMRX a process can exist without having any running thread. This scenario is usable in cases where process provides RPC services and/or is a driver whose design does not require existence of driver workqueue.

Multi-Threading Within Processes

What are Threads?

Threads are like multiple workers within the same process. They share the process’s memory but can do different tasks at the same time. Each thread can have different priority configured. There is no main thread in process and if last thread of process ends the process is not destroyed.

POSIX-Like Threading

CMRX supports standard threading functions that work like desktop computers:

It also supports another synchronization mechanism such as notify/wait.

← Microkernel Architecture Inter-Process Communication →