Test SCO Xenix IPC reliability

Joe Bob Willie haugj at pigs.UUCP
Sun Aug 28 05:35:54 AEST 1988


In article <114 at telmail.UUCP> root at telemail.UUCP (Richard Ronteltap) writes:
>Because loc[0] was initialised to 0, the child process waits if it happens
>to get to the 'while' loop first. The parent process passes the loop, prints
>TICK, changes *loc to 1 and signals the child process. AT THIS INSTANT, i.e.
>BEFORE the parent reaches pause(), the scheduler transfers control to the
>child process. (btw is this possible?)

what appears to have been happening is that if the parent ran all the
way to the kill() call before the child called signal(), the child dies
from the signal and the parent waits in pause() for the dead child to
kill the parent().  this can only happen with the parent because of setting
*loc = 0.  if the CHILD beat the PARENT through the loop after being
kill()'d to kill() the parent BEFORE the parent executes the pause(),
the parent waits in pause() forever for a signal which has already been
delivered, along with the child who is waiting for the parent.

it is possible for the scheduler to pick any runnable process at just
about any time (well, only certain times, but it appears suitably random
to the process) to run, and may suspend any running process to do so.
the only restriction on putting processes to sleep is that a process
running in system space can't been involuntarily put to sleep.  it must
call sleep() itself.
-- 
=-=-=-=-=-=-=-The Beach Bum at The Big "D" Home for Wayward Hackers-=-=-=-=-=-=
               Very Long Address: John.F.Haugh at rpp386.dallas.tx.us
                         Very Short Address: jfh at rpp386
                           "ANSI C: Just say no" -- Me



More information about the Comp.unix.xenix mailing list