[comp.unix.internals] blocking comms

D.Parrott@cs.ucl.ac.uk (Dave Parrott) (02/28/91)

I am prototyping a parallel processing system and have run in to a
problem ... I wonder if anyone can help?

I have a process called "subsystem" that listens to a fixed set of
named pipes (I'm using these for quickness at the moment).  Up to a
fixed number of other processes all called "pe" can `log-in' to the
subsystem by registering on one of the currently unused input pipes;
the subsystem communicates back on the corresponding output pipe.

This works well for the 1st 5 pe's and then collapses on the 6th.
The susbsystem blocks trying to write to the pe to confirm that it is
now logged in and the pe blocks trying to read the message.

Using ps -gl I get the following:

     F UID   PID  PPID CP PRI NI  SZ  RSS WCHAN    STAT TT  TIME COMMAND
4082011090  3688  3687  0  15  0 112  320 pause    S    p9  0:06 -csh (csh)
  80211090  3714  3688  1  25  01576    8          T    p9  0:33 emacs
4080011090  3850  3688  1   1  0  40  176 fifo_all I    p9  0:00 subsystem
  80011090  3851  3688  5   1  0  40   96 select   I    p9  0:00 pe
  80011090  3852  3688  4   1  0  40  192 select   I    p9  0:00 pe
  80011090  3853  3688  3   1  0  40  200 select   I    p9  0:00 pe
  80011090  3854  3688  1   1  0  40  192 select   I    p9  0:00 pe
  80011090  3855  3688  3   1  0  40  200 select   I    p9  0:00 pe
  80011090  3856  3688  4   1  0  40  192 kernelma I    p9  0:00 pe
     11090  3860  3688 14  28  0 224  376          R    p9  0:00 ps -gl
  82011090  3718  3714  0  15  0  48  152 pause    I    pa  0:00 /usr/ucl/lib/

The pe's stopped in select are working correctly, the pe stopped in
kernalma... is not.

Any ideas???

I have confirmed that it is nothing to do with the named pipes
themselves or the number of i/o channels per process etc (the open()
calls work properly, it is the read() and write() calls that are
blocking).


thanks,

Dave.