This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Mutex is a Computer Science term for what Java 2 calls a lock. Since only one thread can hold the lock on an object at one time, a section of code synchronized on an object cannot be entered by a thread while another thread holds the lock on that object. The mechanism for enforcing this rule is called a mutex.
Definitely look up mutex on Google to get a deeper answer, but one example of a mutex is Java's built-in object locking via synchronization. Mutually exclusive when X "has access", Y and Z cannot "gain access." In Java, when a block of code synchronizes on an object, it obtains a mutually exclusive lock on that object. Any other block of code in another thread cannot obtain a lock on the same object until the first block releases the lock.
Joined: Jun 25, 2004
Originally posted by Kashif Riaz: Mutual Exclusion. See google for more info.
Perfect; thanks everyone for the replies! Usually I google for terms instead of posting, but in this case I just wanted to know what y'all, specifically, would say.. Ya see I'm re-reading a section in Sierra's _Sun Certified programmer & Developer for Java 2_, Chapter 9, "Threads", re-doing Exercise 9-2, "Synchronizing a Block of Code".. There was a bit I didn't grok, so I was searching through these JavaRanch forums and kept finding undefined references to that term. But anyway thanks again; all better now.