Object Oriented Software Engineering   View all facts   Glossary   Help
subject > problem > failure > deadlock or livelock > deadlock
Next deadlock or livelocklivelock    Updeadlock or livelock

deadlock
subjectfact 
deadlockcan appear as a hung system where the system is not consuming CPU time2001-08-30 14:55:11.0
has definition A failure in which two or more threads are stopped, waiting for each other to do something2001-08-30 14:55:11.0
has example
  1. thread A is waiting to access object O
  2. object O is locked by thread B
  3. thread B, however might be waiting to access object P
  4. object P is locked by thread A
Neither thread can ever progress unless some outside thread forces a break in the deadlock
2001-08-30 14:55:11.0
has example in real life gridlock2001-08-30 14:55:11.0
is a subtopic of 10.5 - Defects in Timing and Co-Ordination: Deadlock, Livelocks and Critical Races2001-08-30 14:55:11.0
is a kind of deadlock or livelock2001-08-30 14:55:11.0
may not hang a system2001-08-30 14:55:11.0
deadlock or livelockcan be caused by over-use of locking2001-08-30 14:55:11.0
can be detected by glass-box testing since you can actually study the progress and states of the various threads2001-08-30 14:55:11.0
has black-box testing strategy
  • Vary the time consumption of different threads by giving them differing amounts of input, or running them on hardware that varies in speed
  • Run a large number of threads concurrently
  • Deliberately deny resources to one or more threads (e.g. temporarily cut a network connection, or make a file unreadable)
2001-08-30 14:55:11.0
has testing strategy inspecting to detect such defects, rather than testing alone2001-08-30 14:55:11.0
may occur as a result of unusual combinations of conditions that are hard to anticipate or reproduce2001-08-30 14:55:11.0
should be tested for by a person with a background in real-time systems who can apply his or her knowledge and experience to best anticipate typical defects2001-08-30 14:55:11.0
failurecan be the result of a violation of an implicit requirement2001-08-30 14:55:35.0
is usually the result of a violation of those requirements that are stated explicitly in a requirements document2001-08-30 14:55:35.0
may arise from violations of either functional requirements or non-functional requirements2001-08-30 14:55:35.0
problemhas solution which will normally entail developing software, although you may decide that it is better to purchase software or to develop a non-software solution2001-08-30 14:57:03.0
should be written as a simple problem statement in one or two sentences2001-08-30 14:57:03.0

Next deadlock or livelocklivelock    Updeadlock or livelock