[ace-users] Files created for USYNC_PROCESS mutexes

Martin Corino mcorino at remedy.nl
Tue Sep 11 01:22:58 CDT 2007

Hi Nathan,

Have a look at the Process_Mutex_Test in the $ACE_ROOT/tests directory. It has 
some useful comments.

On pthread based *nix systems you will always be stuck with the files for 
process shared objects like mutexes and semaphores because memory mapped 
files are required there to implement the process sharing.

In short; successful implementation of process shared objects on these 
platforms absolutely requires you to set up your application(s) carefully 
where you designate the longest 'living' process as the object owner so it 
can clean up after all the object 'users' have terminated.


On Tuesday 11 September 2007 02:40, Douglas C. Schmidt wrote:
> Hi Nathan,
> > Windows does not show this. We have only been running this on Linux
> > (RedHat) ES/AS 3.0+ and Solaris 9+ (Sparc), and do see it on those
> > platforms, and as far as I know, they behave identically.
> Ok, that's helpful info.
> >> My guess is that you're simply seeing a consequence of the way in
> >> which process-level locks are implemented on some platforms, but it
> >> would be helpful if you could provide more info.
> >
> >I'll provide whatever information you think might be helpful.
> Great, thanks.
> > For what it's worth, in case it wasn't clear, it is not our
> > intention to have the mutex remain locked if there are no longer any
> > processes running. When the last process using the mutex is running,
> > we'd like the mutex to unlock or even disappear entirely. The
> > problem is that it remains locked, apparently due to the existence
> > of the file.
> Two things:
> . Use ACE_Process_Mutex not ACE_Mutex (... USYNC_PROCESS) since the
>   latter is really not intended for general use.
> . That's not how the ACE_Process_Mutex stuff is designed to work.  You
>   need to call remove() when you want it to go away.
> Thanks,
>      Doug

                           Martin J.N. Corino | Remedy IT Expertise BV
          Postbus 101 |  2650 AC Berkel en Rodenrijs | The Netherlands
                       tel: +31 (10) 522 0139 | fax: +31 (33) 246 6511
                                  World Wide Web: http://www.remedy.nl

More information about the Ace-users mailing list