|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.man.cs.rainbow.deadlock.DeadlockChecker
Check a scheduling system for deadlock.
StateEngine
,
StateEnumerator
Inner Class Summary | |
static interface |
DeadlockChecker.ExplorationObserver
Allows the watching of the progress of a deadlock check. |
Field Summary | |
static int |
DEADLOCK
Indicates that a deadlock was found. |
static int |
FINISHED
Indicates that the system is free of deadlock. |
static int |
WORKING
Indicates that there is still more work to be done. |
Constructor Summary | |
DeadlockChecker(StateEnumerator enumerator)
Create a new deadlock-checker. |
Method Summary | |
void |
addExplorationObserver(DeadlockChecker.ExplorationObserver o)
Register an object for notifications of exploration activity. |
StateEngine.ChannelEvent[][] |
canDeadlock()
Search the entire state space for deadlock. |
StateEngine.ChannelEvent[][] |
canDeadlock(int steps)
Search the entire state space for deadlock. |
StateEngine |
getStateEngine()
Get the state engine. |
protected void |
notifyObservers(long minor,
long major,
int depth,
int back)
Send exploration notifications to all registered exploration observers. |
void |
removeExplorationObserver(DeadlockChecker.ExplorationObserver o)
Unregister an object for notifications of exploration activity. |
int |
step()
Perform a single deadlock step. |
int |
step(int count)
Perform several steps. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int WORKING
step()
public static final int FINISHED
step()
public static final int DEADLOCK
step()
Constructor Detail |
public DeadlockChecker(StateEnumerator enumerator) throws RainbowException
enumerator
- The simulation that is to be deadlock-checked.RainbowException
- If something goes wrong during initialisation of the scheduler.Method Detail |
public int step() throws RainbowException
RainbowException
- If something goes wrong during a step.DEADLOCK
,
FINISHED
,
WORKING
public int step(int count) throws RainbowException
count
- The (maximum) number of steps to perform in this chunk of work.RainbowException
- If something goes wrong during a step.step()
,
DEADLOCK
,
FINISHED
,
WORKING
public StateEngine.ChannelEvent[][] canDeadlock(int steps) throws RainbowException
steps
- The number of steps to be performed between calls to yield()
.RainbowException
- If something goes wrong during a step or if the thread is
interrupted.step()
,
Thread.isInterrupted()
public StateEngine.ChannelEvent[][] canDeadlock() throws RainbowException
RainbowException
- If something goes wrong during a step or if the thread is
interrupted.step()
public StateEngine getStateEngine()
public void addExplorationObserver(DeadlockChecker.ExplorationObserver o)
public void removeExplorationObserver(DeadlockChecker.ExplorationObserver o)
protected void notifyObservers(long minor, long major, int depth, int back)
minor
- The number of minor transitions performed so far.major
- The number of major transitions performed so far. Note that a
major transition is performed even when going to a state that
has been seen before.depth
- The current stack (execution path) depth.back
- The number of states backtracked out of (the size of the
store.) Note that when a transition is made to a state that
has been seen before, this count is not increased.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |