Path: utzoo!mnetor!uunet!husc6!uwvax!rutgers!bellcore!faline!thumper!braun From: braun@thumper.bellcore.com (David A. Braun) Newsgroups: comp.sys.amiga Subject: Re: IPC - A proposal Message-ID: <976@thumper.bellcore.com> Date: 9 Mar 88 15:04:01 GMT References: <5375@well.UUCP> <739@nuchat.UUCP> <7455@agate.BERKELEY.EDU> <2116@polya.STANFORD.EDU> Reply-To: braun@thumper.UUCP (David A. Braun) Organization: Bellcore MRE Lines: 38 (...) Folks - What is the problem with using a port that is shut down anyway. The send message function (whatever it's called) should just return an error like "opened cupboard - no bone". The "real" problem with the amiga DOS and lots of other PC OS's is the use of addresses as pointers to dynamic resources. The obvious problem is that the resource is freed and the address re-used for something else. GURU time. A better solution is to use UNIQUE handles for resources like message ports. To clients, the value is meaningless. To the owner of the resource, the value may well be an address, but if so the owner must validate the value. I've seen several solutions to this problem (I won't take space here describing my favorite - but if you ask ...). Most have little impact on performance (1 memory reference instruction to de-reference the handle) and great impact on reliability. > >> >>Oh, and give them a longword length if at all possible; I can see >>no reason to *limit* message length to 64K. It's that kind of >>thinking that gave MSDOS 640K and TOS 40 folders. > >But we're using an exec Message structure, and this already has a UWORD >for the length! We aren't applying an absolute limit here, though: >just define a type of message for the job which has a pointer to the >data -- who wants to copy that much data into the message structure >anyway? > -- Pete -- I can think of a whole bunch of reasons for having a 32 bit length field! Especially in the area of resource control - oh that's right, AmigaDOS doesn't have resources! I keep forgetting. dave Braun braun@bellcore.com