Multiple Agents

The serialization and synchronization functionality is available only on a single agent computer. Silk Performer provides an additional number of functions that extend the use of serialization and synchronization across multiple agents.

Serialization across multiple agents is made possible by the GlobalResourceEnter and GlobalResourceRelease functions. GlobalResourceEnter defines a resource that can be occupied by only a limited number of users. The caller has to wait until the number of users who occupy the resource is less than the maximum number of users who are allowed to occupy the resource. The GlobalResourceRelease function releases a resource that was occupied with the GlobalResourceEnter function. If there are users still waiting for the resource, the next user in the queue resumes the simulation.

Synchronization across multiple agents is made possible by the GlobalWaitFor function. This function defines a checkpoint (rendezvous point) and blocks the calling user. The caller waits until a specified number of users (including the caller) have reached or passed the checkpoint, or until a specified timeout occurs. The checkpoint is identified by name and is visible to all the users, including those running on various remote agents. A waiting user continues when the specified timeout is reached or the given number of users have called the function for a checkpoint. A user who has timed out is also regarded as having passed the checkpoint.

The functions GlobalVarGet, GlobalVarInc, and GlobalVarSet are used, respectively, to get, increment, and set the values of global integer variables that are accessible for all the users on all the agents.

For detailed information on these functions, refer to the BDL Function Reference.