summaryrefslogtreecommitdiff
path: root/microkernel/mach/message.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'microkernel/mach/message.mdwn')
-rw-r--r--microkernel/mach/message.mdwn31
1 files changed, 31 insertions, 0 deletions
diff --git a/microkernel/mach/message.mdwn b/microkernel/mach/message.mdwn
new file mode 100644
index 00000000..ba47671e
--- /dev/null
+++ b/microkernel/mach/message.mdwn
@@ -0,0 +1,31 @@
+[[!meta copyright="Copyright © 2002, 2003, 2010 Free Software Foundation,
+Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+*Messages* are collections of typed data, with a defined layout.
+
+They are used for [[IPC]], and are sent to and received from [[port]]s.
+
+These messages are not only opaque data. They can also contain [[port
+rights|port]] to be passed to another [[task]]. Port rights are either
+*copied* or *moved*. Notice that port receive right must be moved but not
+copied because there can't be more than one task that holds the receive right
+to a port. The receiving task creates new local port name to the port rights
+it received.
+
+Some data in the message can be *out-of-line data*. In the message, these are
+*references* to memory regions ([[memory_object]]s) that are *virtually
+copied*. When the message is received in a task, these virtual copies become
+part of the task by mapping them into the receiver's [[virtual_address_space]].
+Another key concept that is applied is using *copy-on-write*, which means that
+data is not copied immediately, but only when it is changed. This is primarily
+used to send large blocks of data efficiently, as it is too expensive to store
+them in the kernel address space: extra copied need only be made at the moment
+that the memory regions begin to diverge, by threads modifying them.