deadlock example

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohitkulkarni1986
    New Member
    • Sep 2008
    • 3

    deadlock example

    Hello!!!
    Actually it will appear very strange b'coz everyone will be asking a solution to deadlock but I want an example(simple which I can use to explain my students)
    of deadlock.

    will anyone help me out??

    Thanks.
  • mldisibio
    Recognized Expert New Member
    • Sep 2008
    • 191

    #2
    If you are teaching synchronization to your students, then make sure you consult a very authoritative and freely available overview of threading and synchronization : Threading in C# by Joseph Albahari.

    In the chapter about Synchronization Contexts, he gives an explicit deadlock example.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      The "dining philosphers" or something like that is a common example.
      It's about people sitting at a round table with a fork in between each plate setting. Eat person requires TWO forks to eat (for some reason) and always claim the left fork first. I forget how it goes but that should be enough to find you the examples of it.

      Edit: Thanks to frinny, here is the link, http://en.wikipedia.org/wiki/Dining_...ophers_problem

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I recommend searching the web for an example....even wikipedia has a few.

        -Frinny

        Comment

        Working...