Patent ID: 7451444

Claim:
A computer-implemented apparatus having a processor for handling thread requests in a disparate computer environment, wherein the disparate computer environment arises because the threads requesting services are preemptively scheduled entities whereas service agents servicing the requests are cooperatively scheduled entities, wherein the threads requesting services are preemptively scheduled entities because processing of the threads requesting services can be temporarily interrupted, said apparatus comprising: a dispatch lock that is acquired by the requesting threads to allow a thread to gain access to a dispatch section one at a time; a service pool lock for synchronizing one of the requesting threads, that has gained access to the dispatch section, with one of the service agents; wherein the dispatch lock and the service pool lock are nested relative to each other such that the service pool lock is acquired while holding the dispatch lock in order to synchronize the service agent with the requesting thread that has gained access to the dispatch section; wherein, after the requesting thread releases the dispatch lock and the service pool lock, the service agent handles the request of the requesting thread.