11-17-06 12:30 PM
kenkahn wrote:
> Is there some 'standard' way to implement a mutex-semaphore like access
> to a hardware resource shared between applications running on different
> workstations, perhaps running different platforms like AIX, Solaris or
> Linux?
>
> At any given time only one application can own/access the resource;
> others must wait their turn. When the 'owner' gives the resource up,
> control is given to another application.
>
> All the applications, as well as the hardware resource, are connected
> via ethernet. When the hardware is started it sends out a UDP
> Broadcast message to all the applications.
>
> I'm wondering if there's some 'standard' way of doing this; perhaps
> using named pipes or something (are named pipes restricted to a single
> workstation).
There are many ways to do so.
One way is to have a proxy process somewhere, which will serialize all
access to the resource. You can design a protocol which suits best your
access patterns. If the proxy provides the same (network) protocol as
the resource being hidden behind the proxy, no code change may be
required for users of the device.
Another way is to have a nfs filesystem which is mounted by all the
users of the resource. You could then serialize access by using file
locks on that filesystem.
[ Post a follow-up to this message ]
|