Personal tools
User menu

Producer-Consumer Application

Jump to: navigation, search

A canonical producer-consumer application is built, in which the producer generates data, and the consumer consumes the generated data. Between the producer consumer pair, one process is inserted to process the data.

Producer-Consumer application

In the task graph, there are three processes, i.e., one generator process, one consumer process, and one square process, with which two FIFO channels are interconnected. At each invocation, the generator process generates a real number with type double and transfers it to the square process by Channel C1. The square process gets the number, squares it, and sends the result to the consumer process by Channel C2. The consumer receives the result and displays it to on the console.

!!! Dieses Dokument stammt aus dem ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the ETH Web archive and is no longer maintained !!!