摘要 |
A process replication method for use in a multi-threaded computing environment, for improving application performance, reducing the number of deadlocks and fork safing code. The method comprises acquiring and locking available mutexes from a plurality of mutexes, determining whether any unavailable mutexes from the plurality of mutexes are held by a thread that is waiting for a mutex owned by a forking thread and, if so, ceding any such mutex to the respective waiting thread and boosting priority of the waiting thread, and registering the forking thread as first waiter for any unavailable mutexes. All of the plurality of mutexes are thereby eventually acquired and locked.
|