CompuServe Thread

Forum unknown · Programming

#message passing

9 messages in this thread
#21414From: Bill HamakerJun 1, 1986 9:14 PM
I've been reading some of the amiga system liturature available in the book stores and have a question about the message passing primatives. Does anyone know if they are "safe" multiprocessing primitives. For example if you were to set up a process as a shared data base handler, can the normal system routines handle situations where to different processes (tasks) send a message at the same time to the receiving process. I found the references to ports very confusing, how does the system keep track of who sent a message so the reply goes to the right task, are reply ports shared or does each sender have its own reply port? Can anyone reply with a reasonably terse explantion of how message passing and replying works?
#21453From: Aegis DevelopmentJun 1, 1986 11:44 PM
SendMessage does the job of handling multiple tasks sending messages to a single task. .. (or is it SendIO … whatever), messages are implimented in a linked list que …. rather nice system. Each sender has his own reply port….
#21627From: Charlie HeathJun 2, 1986 11:23 PM
That's "PutMsg". The reply port is basicly a convention of having the message include a pointer to the port which the sender put there. "ReplyMsg" basicly does a "PutMsg" using the reply port stored in the replied message.
#21737From: Aegis DevelopmentJun 3, 1986 8:39 PM
I do maninly WaitIO/DoIO stuff, but I may have to get into Exec. to get the spooler up and running.
#21737From: Aegis DevelopmentJun 3, 1986 8:39 PM
I do maninly WaitIO/DoIO stuff, but I may have to get into Exec. to get the spooler up and running.
#21627From: Charlie HeathJun 2, 1986 11:23 PM
That's "PutMsg". The reply port is basicly a convention of having the message include a pointer to the port which the sender put there. "ReplyMsg" basicly does a "PutMsg" using the reply port stored in the replied message.
#21453From: Aegis DevelopmentJun 1, 1986 11:44 PM
SendMessage does the job of handling multiple tasks sending messages to a single task. .. (or is it SendIO … whatever), messages are implimented in a linked list que …. rather nice system. Each sender has his own reply port….
#21623From: Charlie HeathJun 2, 1986 11:15 PM
Message ports are set up by conventions between the tasks using the ports. Only one task can "wait" for a message port, but multiple tasks can read / write to a port. If two tasks make a "simultaneous" GetMsg request, only one will get a message ( assuming there was one message in the port ). Thus it is safe to use a message as a token which only one task can own at a time. You can set up many different ports, which can be made publicly accessible ; any publicly accessible port can be found with the "FindPort" exec function.
#21623From: Charlie HeathJun 2, 1986 11:15 PM
Message ports are set up by conventions between the tasks using the ports. Only one task can "wait" for a message port, but multiple tasks can read / write to a port. If two tasks make a "simultaneous" GetMsg request, only one will get a message ( assuming there was one message in the port ). Thus it is safe to use a message as a token which only one task can own at a time. You can set up many different ports, which can be made publicly accessible ; any publicly accessible port can be found with the "FindPort" exec function.