42 lines
1.5 KiB
Plaintext
Executable File
42 lines
1.5 KiB
Plaintext
Executable File
vim: shiftwidth=3
|
|
|
|
Rosetta Operating System: Protocols
|
|
===================================
|
|
|
|
1 Introduction
|
|
--------------
|
|
|
|
Due to its nature as a message-passing operating system, a standard
|
|
"langauge" is needed in order to allow different components of the system
|
|
to communicate with each other. This document describes the communication
|
|
layer built on top of kernel IPC primitives to facilitate the fast transfer
|
|
of structured data between components.
|
|
|
|
|
|
2 Design Goals
|
|
--------------
|
|
|
|
The key consideration for Protocols is low-overhead and speed. All system
|
|
functionality is accessed via sending messages, so any speed or memory costs
|
|
incurred will affect the performance of the entire system.
|
|
|
|
In addition, Protocols should be language-agnostic. Two components written
|
|
in two different programming languages should be able to communicate as long
|
|
as they both understand the same protocol.
|
|
|
|
|
|
3 Overview
|
|
----------
|
|
|
|
Protocols is a very thin layer overtop of Mango ports. It provides a
|
|
declarative language for describing message layouts in a language-agnostic
|
|
format, and a tool for generating concrete implementations of protocols in
|
|
various programming languages.
|
|
|
|
Protocols makes heavy use of Mango's I/O vectors facility to avoid performing
|
|
any dynamic memory allocation or unnecessary copying of data. As often as
|
|
possible, any parameters you pass to a protocol function will be copied
|
|
directly into the address space of the recipient. This makes Protocols
|
|
essentially free to use.
|
|
|