HYUNG@SCU.BITNET ("Defender of The Faith") (01/04/88)
Hello Netlanders: I am looking for a simple way to synchornize multiple processes that belong to different users. In other words, they all have different UID's. I have tried using global memory mapping giving read/write access to all these processes with each one of them monitoring a semaphore. The problem is that I can't think of any other way to monitor the semaphore except with a "while(TRUE)" loop (yes, I am writing in C). And this drives the CPU usage all the way up to the ceiling. My second try was to use system event flags, but the problem is that I can not set/reset those flags if my processes do not belong to the same Group ID. Unfortunately, at our site, each user has its own Group ID. The third solution was to put all processes in HIBER and have them wake each other up when needed. However, this requires WORLD priv and I want these processes to run without any special PRIV. I am thinking of implementing the four alternative, which is to set up 2 mailboxes for each process, one input and one output. Each mailbox will have an AST attached to it. The processes are put into hibernation and will wake up when something is written to the mailboxes (activating the AST's). However, before implementing that, I would like to find out if I am missing an obvious, simple/elegant solution to my problem. After all, asynchornous process communication (with different UID's) should be pretty common on the VAX. Thanks in advance to ANY help I can get. Henry Yung BITNET: hyung@scu ARPA: hyung%scu.bitnet@ucbjade.berkeley.edu INTERNET: henry_k_yung@cup.portal.com
rrk@byuvax.bitnet (01/05/88)
For your needs, mailboxes are the obvious solution. But how are you going to make the name of the mailbox's public with no privs?