Mutex
R&S
®
CMW
4User Manual 1178.4160.02 ─ 03
mutex. A script enters the critical section only if the mutex is not locked. Otherwise,
the script waits.
●
Synchronization point
Use the commands to program the following behavior: A script/process reaching a
synchronization point joins it and waits until synchronization is complete.
The number of processes/scripts that must join the synchronization point is config-
urable. The first or the last joining process can be ordered to execute a special
task.
The synchronization is complete if the defined number of processes has joined and
an optionally ordered single task is complete.
●
Variables
Use the commands to define integer variables, change the variable values and
query the values.
The created SCST objects are only available during the current session. After a startup
or reboot, there are no user-defined SCST objects.
The term "process" is used in the following. There are several parallel processes that
are timed via SCST commands. Each process is typically related to a single SCPI con-
nection, a single DUT and a single test script instance.
The SCST command groups are described in detail in the following sections.
2 Mutex
Mutex stands for mutual exclusion. Use mutexes to protect critical test script sections
that can only be entered by one process at a time. A critical section, for example, con-
figures a measurement, executes the measurement and retrieves the results.
Mutexes work with a lock/unlock mechanism. When a process reaches the beginning
of a critical section, it tries to lock the mutex for that section. The process enters the
critical section only if locking succeeds. When the process leaves the critical section, it
unlocks the mutex.
Lock
Mutex locked
Process 1
Unlock
Lock request
Process 2
Unlock
Mutex lockedWait
Lock
Figure 2-1: Waiting for mutex unlocking