Scroll to navigation

PROGVIS(1) General Commands Manual PROGVIS(1)

NAME

progvis - visualization tool for concurrent C/C++ programs

SYNOPSIS

progvis

DESCRIPTION

Progvis is a program visualization tool aimed at concurrent C/C++ programs. It allows loading arbitrary programs and stepping through them. The tool also informs about a number of concurrency issues, such as race conditions. Only a subset of C/C++ is supported. For C, most notably void pointers are not supported (for type safety). For C++, only fundamental language constructs are implemented (e.g. no templates). Much of the standard libraries both for C and C++ are not implemented either.

SYNCHRONIZATION

The system provides C-style synchronization primitives as implemented in Pintos, see: http://www.scs.stanford.edu/07au-cs140/pintos/pintos_6.html#SEC97 In summary, they are as follows:

An implementation of a semaphore.
Initialize a semaphore object to a particular (positive) value.
Increase the counter in the semaphore. Also known as signal.
Decrease the counter in the semaphore, waits if it would become less than zero. Also known as wait.
An implementation of a lock.
Initialize a lock.
Acquire a lock. Might wait.
Release a lock. Has to be done by the same thread that called lock_acquire.
Implementation of a condition variable.
Initialize a condition variable.
Cause the current thread to wait until the condition is signalled. Assumes that the lock is held. The lock will be released while the thread is waiting, but it will be re-acquired before cond_wait returns.
Wake one thread that is currently waiting inside cond_wait. Assumes that the lock is held.
Wake all threads that are currently waiting inside cond_wait.

ATOMIC OPERATIONS

A number of atomic operations are also supported. Most of these are generic, meaning that they are overloaded to work for more than one type. Here, we use P to mean any pointer type, I to mean any integer type (i.e. signed and unsigned integers, as well as booleans), and P/I to mean any pointer or integer type.

Read v and return its value, also setting v to 1.
Adds add to the value pointed to by v. Returns the old value.
Subtracts sub from the value pointed to by v. Returns the old value.
Read from v and return the value.
Write to to.
Read the value pointed to by v, and replace it with the value replace. Returns the old value.
Read the value from v, if it was equal to compare, replace it with swap. Returns the old value.

SEE ALSO

storm(1) - the language in which Progvis is implemented.

October 15 2023