Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site l5.uucp Path: utzoo!linus!decvax!decwrl!sun!l5!gnu From: gnu@l5.uucp (John Gilmore) Newsgroups: net.unix-wizards Subject: Re: Shared Memory overkill, what's wrong with pipes? Message-ID: <366@l5.uucp> Date: Sun, 29-Dec-85 19:05:51 EST Article-I.D.: l5.366 Posted: Sun Dec 29 19:05:51 1985 Date-Received: Tue, 31-Dec-85 00:39:19 EST References: <830@brl-tgr.ARPA> Organization: Nebula Consultants in San Francisco Lines: 22 In article <830@brl-tgr.ARPA>, Hoffman.wbst@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?