Path: utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!cxa.daresbury.ac.uk!wh From: wh@cxa.daresbury.ac.uk (Bill Purvis) Newsgroups: comp.sys.transputer Subject: (none) Message-ID: <824.9002261209@cxa.daresbury.ac.uk> Date: 26 Feb 90 12:09:31 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 Dan McCabe writes > Does anyone out in Netland know details about the semantics of the > In and Out instructions when a memory channel is specified? I have done a little in this area. > I know that a channel is initialized with NotProcess.p (-1). Nearly right - NotProcess.p is 0x80000000, not -1 > I presume that a process descriptor is kept in the channel variable. Sort of, its actually the workspace pointer of the waiting process > Is the channel a linked list of waiting processes? > It seems to me that this would have to be the case, > since several processes may Out to the same channel before > another process does an In. Where did you get that idea. The rules of Occam insist that a channel can only be shared between TWO processes. Therefore no list is needed. > Are the registers saved in the workspace if the instruction blocks Yes, the buffer address and length are saved in the two words below the workspace pointer. > Is there some encoding that says that the channel is waiting > either for an In instruction or for and Out instruction? No, there isn't. This is a beautiful example of how a nice simple implementation can screw up if you don't have any checks. If process A does an OUT to a channel, then process B does the same, the data in process B's buffer is copied over process A's data! There is also no check that the lengths are compatible. However, if you follow the rules, it all works :-) > Thanx in advance, > danm You're welcome. Bill. ======================================================================== Bill Purvis : wh@uk.ac.dl.cxa (JANET) Daresbury Lab : +44 925 603 357 Warrington : England : ========================================================================