Main Content

Interprocess Data Communication in Operating Systems

An embedded processor running an operating system can support multiple user mode processes within the same processor. In this case, processes typically communicate with each other using asynchronous software API calls to the operating system. For more information on interprocess data communication in operating systems, see the Wikipedia website Inter-process communication.

The SoC Blockset™ Interprocess Data Read, Interprocess Data Channel, and Interprocess Data Write blocks simulate communication between two processes managed by an operating system. To create a one-way data channel between two processes, add an Interprocess Data Write block into the first process reference model that sends data. Next, add an Interprocess Data Read block into the other process reference model that receives data. In each model, expose the event ports to the top-level model using the Outport and Inport blocks, respectively. Finally, connect the event ports in the top level model using the Interprocess Data Channel block.

Two Way Interprocess Communication

This example shows how to two-way interprocess data communication between two processors running in an operating system managed processor.


Process1 sends a data message, using the Interprocess Data Write block, to the Interprocess Data Channel block at a 0.01 second intervals. Process2 receives and processes the data messages asynchronously, using the Interprocess Data Read block. The processed data returns to the first process and is received by an asynchronous task.


In the Simulation tab, click Run. When the simulation completes, open the Simulation Data Inspector to view the resulting signals and task executions. Process1 sends the data packet at the completion of Task11. Task21 in Process2 triggers upon receiving the event, processes the data packet, and sends the packet back to Process1. Task12 in Process1 executes immediately upon receiving the data packet, preempting Task11.

See Also

| | |