next up previous
Next: Processes Up: DAQ Software Architecture Previous: DAQ Software Architecture

Interprocess communication

For processes located at different machines a simple protocol over TCP/IP was developed. We recognized the idea of CORBA but found that in our case TCP/IP suits well.

For interprocess communication on the MAIN computer a segment of shared memory was used[*]. A contiguous block of shared memory is accessible for four processes running on the MAIN machine. This block is divided on fixed size buffers. The size of each buffer is guaranteed to be larger than biggest possible event (5 Kbytes). The buffers are binded in circular linked list.

This data structure is created, deleted, and reseted by the MAIN process. Other processes use these buffers. The FE process works as a producer filling the buffers by events. The REC process works as a main high-priority consumer. The MON process works as a secondary consumer.

The low-level synchronization of memory buffers access is done with mutexes and condition variables which are implemented via semaphores.



Alexander V.Inyakin 2002-04-05