摘要 |
Access by multiple threads to a common resource can be controlled using a bias-lock having a single owner thread selected from among the plurality of threads. The bias-lock includes an n-process lock for which non-owner processes compete and a 2-process lock for which the owner and non-owner holder of the n-process lock compete. The owner of the bias-lock can be switched to one of the non-owner threads without suspending the owner thread. An asymmetric lock can be used to eliminate the need for the 2-process lock. Bias-locks can further be extended to provide read/write bias locking mechanisms.
|