next up previous contents
Next: Syncronization Issues Up: The DD System Previous: The DD System

The FIFO System

The DD system is based on a set of fifos that are created and destroyed in real time. A process attaches to the DD system by creating a fifo from which he will read C structures describing the type and location of an event in shared memory. A process can become a producer by attaching to the INPUT_FIFO from where he will read C structures telling him the address of free space to copy an event.

Events are only copied once into the DD shared memory. After that only C structures (called fev for fifo event) describing the event (type, size, shared memory id...) are passed between the processes (i.e. written/read into/from the fifos). Once a process reads such a C structure from its fifo, the event ``disappears'' from the DD system until the process puts it back into the system. This allows modifcation of events (events can be compressed, merged or even deleted and newly created).
In the E787 implementation the fifo event fev is the following C structure:

 
		  typedef structure fifo_entry { 

int shmid;

int dboff;

int *p2da;

int len;

int ctl[4];

} fifo_entry;

where :

shmid the shared memory identifier where the event resides

dboff the offset within the shared memory

*p2da pointer to the start of the event

len length of the event

ctl[4] array of control words (see below).

As it is not desirable that every process receives every event, a set of control words allow the routing of events directly to processes that ask for given event types. E787 uses the level 0 trigger bits as control words.

Processes can attach to the same fifo. In this case the events are shared between the processes. This allows to avoid bottlenecks by distributing the events between processes in a multiprocessor environment.

Fifos can be created and destroyed at any time. This enables e.g. user processes to attach to the DD system, receive a given number of events and then detach from it.

Four exceptions have to be handled: When a process reads an empty fifo, when a process wants to write into a full fifo, when the system runs out of shared memory segments into which to place new events and when ``something really bad'' happens.



next up previous contents
Next: Syncronization Issues Up: The DD System Previous: The DD System



Online software development
Thu Mar 14 10:35:53 EST 1996