Motivation
Threat stress tests your thread system. Run it. If the machine crashes, or it
stops printing output, then something is seriously broken with your operating
system. Use it to uncover bugs. Run it at night. It should still be printing
in the morning.
Overview
It's hard to debug a program that is using a broken scheduler. Threat is a
simple program that creates and destroys lots of threads in a non-deterministic
(pseudo) fashion.
Threat is implemented as an extension that you can load and run from the spin
shell.
Using Threat
To get threat running from the shell,
- > script ~/spin/user/threat/ALPHA_SPIN/threat.rc
- to load threat.
- > threat
and watch the output.
To terminate threat, hit a key.
The Output
Here's how to interpret the output:
- n
- there are currently "n" threads running.
- [n]
- there are currently "n" threads running (n will be an integer)
- {n}
- there are currently "n" threads waiting on a central condition variable.
- +
- a new thread has been spawned
- -
- a thread has terminated.
-
This legend is printed when threat first starts up.
bershad@cs.washington.edu