A special process is launched at initialisation time - the garbage demon.
Its main task is to delete the shared memory segments that were allocated
to handle events, larger than the default maximum event length.
These events are not put back into the INPUT_FIFO in order to keep the
number of buffers constant over time. As the event is no longer used,
they are put into the GARBAGE_FIFO to which the garbage demon is attached.
This demon has the permission to delete the shared memory segments (note
that due to the flexible structure of the DD system, any producing process
can create extra large events and thus additional memory segments).
In addition the garbage demon checks in regular intervals whether
any processes that were attached to the system suddenly disappeared
and then removes such processes from the DD system
.
The garbage demon also shuts
the DD system down if no other processes are attached to it or if
he is told to do so.