Deadlock

This is a discussion on Deadlock within the C Programming forums, part of the General Programming Boards category; Does anyone know a concept in c that avoids deadlock using semaphores. I understand the concept of Deadlock but what ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    1

    Deadlock

    Does anyone know a concept in c that avoids deadlock using semaphores. I understand the concept of Deadlock but what I don't understand is how we incorporate the concept of deadlock to semaphores. Please if anyone could assist me I would be very greatful.

    my email is c_joan_18@hotmail.com

    Thanks in advance

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,496
    C doesn't know anything about semaphores - they're usually provided by some operating specific API
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    incorporate the concept into semaphores? improper placement of semaphores is what causes deadlock. I'm not sure I understand what you're asking but its up to the programmer to properly place semaphores in a way that won't produce deadlocks.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Deadlock prevention in C
    By simpatico_qa in forum C Programming
    Replies: 12
    Last Post: 05-04-2009, 12:35 PM
  2. Replies: 10
    Last Post: 07-17-2008, 11:21 AM
  3. Deadlock - graph/edge/cycle - help with terminology
    By patricio2626 in forum C++ Programming
    Replies: 4
    Last Post: 11-24-2006, 03:22 PM
  4. Can i get a deadlock?
    By johny145 in forum Windows Programming
    Replies: 2
    Last Post: 09-18-2005, 06:43 PM
  5. Guys, need help RE: deadlock avoidance
    By tribal in forum C++ Programming
    Replies: 2
    Last Post: 11-20-2001, 02:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21