A system and method for replicating a multithreaded application program
using a semi-active or passive replication strategy, wherein the
application program executes under the control of an operating system
having a thread library. The method comprises piggybacking mutex ordering
information at the Primary replica onto regular multicast messages
specifying the order in which threads in the Primary replica have been
granted their claims to mutexes; and receiving the multicast messages at
a Backup replica containing the mutex ordering information which
determines the order in which threads in the Backup replica are granted
mutexes. Thread library interpositioning is preferably utilized to
intercept calls to functions in the operating system's thread library, so
that the system and method of the invention may be implemented
transparently. The invention enforces strong replica consistency without
the need to count instructions, add significant messaging overhead, or
modify application code.