Article View: comp.sys.amiga.tech
Article #8319Re: IPC (1): Ports & Messages
From: Chuck McManis
Date: Wed, 09 Mar 1988 19:45
Date: Wed, 09 Mar 1988 19:45
29 lines
2218 bytes
2218 bytes
In article <7543@agate.BERKELEY.EDU> ( Pete Goodeve ) writes:
>[This is a response to an article in comp.sys.amiga.tech. Because of the
[Aren't 200 articles as good as 200 'yes' votes?]
> I'm not sure I follow your line of reasoning there, but there are some
> fundamental problems I see in basing everything on pipes: they're basically
> byte serial, which is very inconvenient for structured data, and even more
> important they involve buffering and therefore COPYING of data -- a lot of
> overhead. Messages on the other hand don't move -- they're just inserted
> in a list, so making a lot of data available to another task can be very
> fast. For a general IPC scheme, I think we have to be concerned with
> speed.
Have you considered using a new mechanisim that uses a buffer pool that
your task doesn't "own". It works like this, you call "OpenIPCPort()"
and the library does, and allocates a unique port for you. Then you
Put messages on it like a PIPE: by writing them in a block. The
library copies them to a buffer (preallocated) and signals who ever
you sent it to. Or you can allocate a buffer with "GetIPCBuffer()"
and save the allocation step. What this buys you is that, a) There are
no longer in resources that the task has to free they are all "owned"
by the library. Thus sudden death syndrome does not involve a loss of
memory. Second, if there was an MMU in there both tasks could map the
buffer pool as shared memory and not worry about address mismatches.
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
Technical Details
Message-ID:
<44811@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!decvax!decwrl!pyramid!oliveb!sun!pepper!cmcmanisReferences:
<7409@agate.BERKELEY.EDU> <1401@louie.udel.EDU> <7543@agate.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!decvax!decwrl!pyramid!oliveb!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: IPC (1): Ports & Messages Keywords: InterProgram Communication, tools Message-ID: <44811@sun.uucp> Date: 9 Mar 88 19:45:24 GMT References: <7409@agate.BERKELEY.EDU> <1401@louie.udel.EDU> <7543@agate.BERKELEY.EDU> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 29