Inter-Process Communication

Data structures and function prototypes for interprocess communication are defined in ipc.h. A message is defined as a structure containing a union of the various message types that are possible. Seven message formats, mess_1 through mess_8, are defined (type mess_6 is obsolete). A message is a structure containing a field m_source, telling who sent the message, a field m_type, telling what the message type is (e.g., SYS_EXEC to the system task) and the data fields.

The seven message types are shown in Figure below. Message types

Function calls that are used for inter-process communication (message passing):

The second parameter in each call is the local address of the message data. Message passing mechanism in the kernel copies the message from the sender to the receiver. Reply for sendrec, overwrites the original message.

Each task, driver, or server is allowed to exchange message only with certain other processes.

notify(dest) - When a process needs to make another process aware that something important has happened.

Reference: