Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2007-09-28 10:55:05


Anthony Williams wrote:
> Ion Gazta?aga <igaztanaga_at_[hidden]> writes:
>> Peter Dimov wrote:
>>> Ion Gazta?aga wrote:
>>>
>>>> Does this support building those objects in mapped files, rebooting
>>>> the system, mapping the file again again and continue working?
[snip]
> However, I would not expect the mutex to survive a reboot --- there might
> still be data in the file, but I would expect a process-shared mutex to have
> at least some portion that was a handle to a kernel object, and the kernel
> object would go away with a reboot.

I have no idea what the POSIX spec requires or what most
implementations actually do. But I believe that the Linux
implementation, using the futex() system call, probably can survive a
reboot as it has no permanent kernel component. The kernel only gets
involved when a process finds the mutex locked, and needs to wait. See
'man 2 futex'. Of course the pthread_* functions, which wrap the
futex() functionality, may make it impossible to exploit this behaviour.

Phil.


Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk