Java多线程之互斥

来源:互联网 发布:安知玉如意txt网盘 编辑:程序博客网 时间:2024/06/05 11:14

The properites of Mutex solution:


Mutual exclusion: only one process may be active in its critical section at a time.

No deadlock: if one or more processes are trying to enter their critical section, one must eventually succeed.

No starvation: if a process is trying to enter its critical section, it must eventually succeed.

Handles lack of contention: if only one process is trying to enter its critical section, it must succeed with minimal overhead.


(Shared variables are only written to in the critical section)

0 0
原创粉丝点击