Strategies for testing multithreaded code?
Date: Tue, 12 Jan 1999 12:41:51 +0100 Organization: NETLAB plus – the best ISP in Slovakia >Subject says it all: are there any well known or widely used >methods for ensuring your multithreaded algorithms are threadsafe? >Any pointers to useful research on the topic? Let us suppose a program property is an attribute that is true of every possible history of that program (a history of a program being a concrete sequence of program states, transformations from one state to another are carried out by atomic actions performed by one or multiple threads). Now what about being able to provide a proof that your program has safety (absence of deadlock, mutual exclusion, …) and liveliness (partial/complete correctness, …) properties? To prove your program has absence of deadlock property, you may define an invariant DEADLOCK that is true when all (cooperating) threads in your program block. Then proving your program will not deadlock is very simple – you need to assert that for every critic