Thread: Explain Mutual Exclusion ?

  1. #1
    Registered User
    Join Date
    Dec 2013
    Location
    Cebu City, Philippines
    Posts
    14

    Explain Mutual Exclusion ?

    Hello everybody.
    We will be having a reporting tomorrow in our Programming Languages subject. I am assigned to discuss about Mutual Exclusion in shared data and task but I am having a hard time getting an explanation on this topic and examples to present to the class. I have been actually reading articles and references about the topic and understood its concept but when I look at some algo, I don't get how it works anymore.

    Can anybody help me? Thanks.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    mutual exclusion is used to ensure that two concurrent processes do not simultaneously access shared data. it is generally achieved by the use of a "mutex" object. mutex is an abbreviation for mutual exclusion. the concurrent processes attempt to "lock" the mutex, and only one may hold a lock at one time. only the process holding the lock may access the shared data. once the process is finished accessing the shared data, it unlocks the mutex, allowing the next process to lock it.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    Registered User
    Join Date
    Feb 2014
    Posts
    13
    1) Mutual Exclusion is simple called as mutex, it is one of OS object.
    2) In multi tasking environment, it allows only one task to access the shared data.
    3) Every task has to put mutex lock when accessing shared data and release it (mutex unlock) once it is completed.

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Mutual Exclusion is actually very simple!
    Lets say a group people want some ice cream. They all have their bowls, but the ice cream scooper can only be used by one person at a time, the rest have to wait. In this case, the scooper is the shared data, and it's use is mutually exclusive.

  5. #5
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Quote Originally Posted by Yarin View Post
    Mutual Exclusion is actually very simple!
    Lets say a group people want some ice cream. They all have their bowls, but the ice cream scooper can only be used by one person at a time, the rest have to wait. In this case, the scooper is the shared data, and it's use is mutually exclusive.
    You can keep the scooper. I'm taking the whole carton, and I ain't giving it back! Sharing ice cream is for suckers.

    I guess that's just plain "exclusion", nothing mutual about it. It's an older mechanism for resource handling, not implemented in most modern systems.

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by anduril462 View Post
    You can keep the scooper. I'm taking the whole carton, and I ain't giving it back! Sharing ice cream is for suckers.
    I guess that's just plain "exclusion", nothing mutual about it. [snip]
    That kind resource handling sounds an awfully lot like the kind used in this one operating system I know of by Microsoft.

  7. #7
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Yarin View Post
    Mutual Exclusion is actually very simple!
    Lets say a group people want some ice cream. They all have their bowls, but the ice cream scooper can only be used by one person at a time, the rest have to wait. In this case, the scooper is the shared data, and it's use is mutually exclusive.
    this is probably the best possible explanation of mutual exclusion.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't get Mutual Exclusion to Work
    By joatmon in forum C Programming
    Replies: 3
    Last Post: 11-05-2013, 08:31 AM
  2. Mutual Exclusion
    By jeffc1 in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2010, 05:52 PM
  3. Producer/Consumer W/ mutual exclusion
    By pantherman34 in forum C Programming
    Replies: 10
    Last Post: 05-04-2010, 11:03 AM
  4. Mutual exclusion with threads
    By axr0284 in forum C++ Programming
    Replies: 10
    Last Post: 12-21-2005, 08:31 AM
  5. Mutual Exclusion Locks
    By sglass in forum C Programming
    Replies: 3
    Last Post: 03-21-2002, 01:31 PM

Tags for this Thread