Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!tektronix!tekgen!tekigm2!phils From: phils@tekigm2.TEK.COM (Philip E Staub) Newsgroups: comp.sys.amiga.tech Subject: Re: single address space (was Re: Need info on exceptions) Message-ID: <3440@tekigm2.TEK.COM> Date: 29 Aug 88 05:43:02 GMT References: <8808272322.AA03740@cory.Berkeley.EDU> <125@fishpond.UUCP> <2819@pt.cs.cmu.edu> Reply-To: phils@tekigm2.TEK.COM (Philip E Staub) Organization: Tektronix, Inc., Beaverton, OR. Lines: 39 In article <2819@pt.cs.cmu.edu> bader@spice.cs.cmu.edu (Miles Bader) writes: [... deleted ...] > >For instance, do people routinely WRITE to memory pointed to by Messages >that they receive? This would create problems since the message & whatever >it points to are still only writeable by the sender, and it would be both >expensive and difficult [do to pagesize oriention of memory protection >schemes, and the unkown extent of referenced data] to move protections every >time you sent a message. I was under the impression that the normal use of >messages was to simply send another message as the reply anyway. > [... deleted ... ] > >-Miles You bet people write to memory pointed to by messages they receive! That's what happens every time you do a disk read, for example. The device driver gets a message with a pointer in xxx->io_Data which is used as the recepticle for data read from the disk. Consider the alternative: the driver would have to reply the message it received, then originate another message with the pointer to the buffer it read the data into, which the caller of the device driver would copy the data from into its own buffer. Then it would have to reply the message to the device driver. UGLY! Now, I've used another message passing operating system which *sort of* works around this by having the kernel copy the message from one task's memory space to the other. Of course, you pay the price: it's slower, and in the case of this particular operating system, the default is *not* to require a reply for each message. It actually requires a bit of a bubble in their kernel to provide for replies without setting up two message ports for each communication channel (one for the outgoing message, the other for the reply). But that's another story. -- ------------------------------------------------------------------------------ Phil Staub Tektronix, Inc., Vancouver, Washington 98668 phils@tekigm2.MEN.TEK.COM