How entities interact with each other

IPC messages

In KasperskyOS, entities interact through an exchange of messages.

To call an entity method, a different entity must send it a request message containing input arguments of this method. A response contains the output arguments of the method.

The entity that sends a request is called the client entity, or simply the client. The entity that receives the request and sends a response is called the server entity (server).

A request and response must have a fully defined structure corresponding to the method being called.

A message must contain a constant part and an arena. The constant part of the message contains arguments whose sizes are statically defined (integers, structures, arrays, etc.). An arena is a buffer for storing variable-size arguments.

For more details, refer to "IPC message structure".

Connections (IPC channels)

To enable two entities to exchange messages, an IPC channel, also referred to as "channel" or "connection", must be established between them.

The channel is provided by a pair of IPC handles (client and server), which are linked to each other. A client entity has a client handle, and a server entity has a server handle:

Each entity can have multiple IPC handles and, consequently, multiple connections. An entity can act as a client for some entities while acting as a server for others.

System calls for exchanging messages

KasperskyOS provides three system calls for IPC: Call, Recv and Reply:

The Call() and Recv() system calls are locking calls, meaning that messages are exchanged according to the rendezvous principle:

The interaction of entities and IPC transport is examined in more detail in the chapter titled "IPC and transport".

Page top