9.2.6 License Management

When using commercial simulation tools, the number of available licenses for a certain program is often limited. Thus we have to provide a way to ensure that at any point in time only a certain user prescribed amount of licenses of such programs are in use. Users can call simulation tools not only by using the predefined functions of the framework, but also from self written programs like shell scripts which are in turn called from within the framework. A suitable license management scheme has to take this into account.

In order to make our license management scheme meet these needs it works independently from the predefined functions of the framework. The following steps are necessary to use it. Whenever the number of requested licenses exceeds the number of available ones, certain processes have to wait until the required number becomes available. In order to show how many licenses are currently in use, the command show-licenses can be used.

  1. Define the names of the licenses and how many of each may be used simultaneously. This is accomplished with define-licenses and is usually done in your SIESTA configuration file.
  2. When using a license, wrap the code into with-locked-licenses.

Example.

? (define-licenses
    (:dios :total-number 5)
    (:foo :total-number 7))
> (#<LICENSE :Dios> #<LICENSE :Foo>)
The following locks one license.
? (with-locked-licenses (:dios)
    (show-licenses))
Dios      Total: 5       In use now: 1
Foo       Total: 7       In use now: 0
The following locks four licenses total.
> (with-locked-licenses (:dios)
    (with-locked-licenses (:foo 3)
      (show-licenses)))
Dios      Total: 5       In use now: 1
Foo       Total: 7       In use now: 3

Users expressed interest in varying the number of available licenses while an optimization is running. This need frequently arises in a setting where people want to reserve one or two licenses for interactive work at certain times, but want all of them to be used, e.g., at night time. For simply changing the number of totally available licenses the function set-number-of-licenses can be used in a Lisp listener.

Example.

? (set-number-of-licenses :dios 3)
> 3
;; Later, increase the number of licenses to use again.
? (set-number-of-licenses :dios 5)
> 5

Clemens Heitzinger 2003-05-08