[logo] 
Home
News
Activity
About/Contact
 Major Tools
 .. BugVise
 .. Dinotrace
 .. Verilator
 .. Verilog-mode
 .. Verilog-Perl
 .. Vregs
 Other Tools
 .. Gspice
 .. IPC::Locker
 .. Schedule::Load
 .. SVN::S4
 .. Synopsys-modes
 .. SystemPerl
 .. Verilog-Pli
 .. Voneline
 General Info
 .. Book Tips
 .. Papers

Introduction to IPC::Locker

Written by Wilson Snyder <wsnyder@wsnyder.org>.

Summary

IPC::Locker provides cross-cluster locking. This lets you insure only one copy of a critical section of code executes simultaneously across all machines in a network cluster.

This is useful for protecting make jobs, or to insure a CAD tool is only invoked when a license is available for that tool.

Also included is the ability to detect if a process ID is still executing on a remote host, and a program to kill a process with another process on a remote host exits. This allows multiprocessor simulation jobs to be killed when a master process exits.

Example

Example perl code to insure only one "critical section" is in the cluster: my $lock = IPC::Locker->new(lock=>'my_lock_name')->lock; print "Only one perl program across the cluster will print this at a time...\n"; $lock->unlock;

use IPC::Locker;

Alternatively, you can place a lock around any program, such as one requiring a license:

lockersh --lock license-for-tool  my-cad-tool {arguments}

See also

See the buttons at the top of this page, which include:

IPC::Locker installation

Also available in: HTML TXT