V
VernisOS
Architecture

IPC System

Inter-Process Communication in VernisOS uses a message queue architecture. Processes communicate by sending and receiving structured messages through kernel-mediated channels.

Message Structure

c
typedef struct {
    uint32_t source;       // Sender process ID
    uint32_t destination;  // Receiver process ID
    uint32_t type;         // Message type (request, response, event)
    uint32_t length;       // Payload length in bytes
    uint8_t  payload[256]; // Message data
    uint32_t checksum;     // SHA-256 integrity check
} ipc_message_t;

Communication Patterns

๐Ÿ”’

Synchronous

Blocking send/receive โ€” sender waits until receiver processes the message. Used for critical operations.

๐Ÿ“จ

Asynchronous

Non-blocking send โ€” message is queued and sender continues. Used for logging and monitoring.

๐Ÿ“ข

Broadcast

One-to-all message delivery โ€” used for system-wide events and policy updates.

Channels

Messages flow through named channels. Each channel has a specific purpose and message type constraints:

SYS_EVENTS

Kernel-to-all: hardware events, timer ticks, process lifecycle

AI_PIPE

AI engine โ†” Kernel: anomaly data, tuning parameters, trust scores

FS_OPS

Shell โ†” VernisFS: file read/write, directory listing

AUDIT_LOG

All processes โ†’ Audit logger: SHA-256 signed event records

Message Flow Example

text
User types: ls
  Shell process โ†’ FS_OPS channel โ†’ VernisFS module
  VernisFS reads directory sectors from disk
  VernisFS โ†’ FS_OPS channel โ†’ Shell process
  Shell displays file list to user

Every IPC message is checksummed with SHA-256
to ensure integrity during transit.