Shared Memory overkill, what's wrong with pipes?
John Gilmore
gnu at l5.uucp
Mon Dec 30 10:05:51 AEST 1985
In article <830 at brl-tgr.ARPA>, Hoffman.wbst at xerox.arpa writes:
> I have two parallel processes (one a child of the other) and I need both
> to have access to one linked list (essentially a queue). The scenario
> is as follows:
> --The parent process allocates and fills the first node.
> --The parent process invokes the child process, and then, optionally,
> continues building the list.
> --The child process extracts the necessary information from the first
> node and then removes that node from the head of the list, proceeding to
> the next node. If there is no next node, the child process goes to sleep
> until the parent process builds another linked list.
>
> After the child process is invoked, the parent process is only concerned
> with the tail of the list while the child process is only concerned with
> the head of the list.
>
> I think that the best way to give both processes access to the linked
> list is by using shared memory... Unfortunately, I can't
> quite figure out the shared memory utilities.
Why not just create a pipe between the two processes and have the parent
shove things down it to the child?
More information about the Comp.unix.wizards
mailing list