Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  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:

use IPC::Locker;
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;

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

IPC::Locker documentation