Try our "Help Me AI"
Results 1 to 5 of 5

Thread: How to Avoid Deadlock ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Status
    Offline
    Assassin's Avatar
    Reputed Member
    Join Date
    Apr 2018
    Location
    Somewhere in this Universe!!
    Posts
    646
       Rep Power
    17

    Question How to Avoid Deadlock ?

    In a multi threaded system, if a resource is blocked by one thread but is requested by another thread and vice versa, the system crashes and this causes a deadlock. This is a common and well-known problem in the multiprocessing system, parallel computing and distributed systems. This is one of the most difficult problems of multi threaded systems. Thread synchronization can be the cause of blocking situations.


    The following problems may occur due to Thread Synchronization.

    • Deadlock
    • Starvation
    • Priority Inversion
    • Busy Waiting

    Let me explain How to avoid it?

  2. #2
    Status
    Offline
    Wondergirl's Avatar
    Reputed Member
    Join Date
    May 2018
    Location
    vavuniya
    Posts
    469
       Rep Power
    17
    Quote Originally Posted by assassin View Post
    In a multi threaded system, if a resource is blocked by one thread but is requested by another thread and vice versa, the system crashes and this causes a deadlock. This is a common and well-known problem in the multiprocessing system, parallel computing and distributed systems. This is one of the most difficult problems of multi threaded systems. Thread synchronization can be the cause of blocking situations.


    The following problems may occur due to Thread Synchronization.

    • Deadlock
    • Starvation
    • Priority Inversion
    • Busy Waiting

    Let me explain How to avoid it?
    Hi here ,

    I have little knowledge on how to Avoid Deadlock in java,
    You have figured out that the real reason for deadlock is not multiple threads And
    If you Provide an ordered ,then the problem will be resolved .

  3. #3
    Status
    Offline
    Moana's Avatar
    Reputed Member
    Join Date
    May 2018
    Location
    Vavuniya Srilanka
    Posts
    1,569
    Blog Entries
    5
       Rep Power
    18
    Quote Originally Posted by Wondergirl View Post
    Hi here ,

    I have little knowledge on how to Avoid Deadlock in java,
    You have figured out that the real reason for deadlock is not multiple threads And
    If you Provide an ordered ,then the problem will be resolved .
    Here are some you could use



    • Non Overlapping Locks
    • Lock Ordering
    • Lock Timeout
    • Single Thread
    Your Last Mistake Is Your Best Teacher

  4. #4
    Status
    Offline
    Assassin's Avatar
    Reputed Member
    Join Date
    Apr 2018
    Location
    Somewhere in this Universe!!
    Posts
    646
       Rep Power
    17
    Quote Originally Posted by Wondergirl View Post
    Hi here ,

    I have little knowledge on how to Avoid Deadlock in java,
    You have figured out that the real reason for deadlock is not multiple threads And
    If you Provide an ordered ,then the problem will be resolved .
    Practically it won't workout in most of the times, finding the proper order is a big issue to me. Hope there will an algorithm to do that.

  5. #5
    Status
    Offline
    Assassin's Avatar
    Reputed Member
    Join Date
    Apr 2018
    Location
    Somewhere in this Universe!!
    Posts
    646
       Rep Power
    17
    Quote Originally Posted by Shivani View Post
    Here are some you could use



    • Non Overlapping Locks
    • Lock Ordering
    • Lock Timeout
    • Single Thread
    Theatrically it make sence, but what can i do in programming practically. Totally stuck on it!

Similar Threads

  1. How to avoid distractions while studying?
    By Karikaalan in forum General Discussion
    Replies: 8
    Last Post: 09-30-2019, 11:15 AM
  2. 9 Foods You Should Avoid for Arthritis
    By Bhavya in forum General Discussion
    Replies: 0
    Last Post: 07-17-2019, 03:35 PM
  3. Top 5 Tips to Avoid Depression
    By Bhavya in forum General Discussion
    Replies: 0
    Last Post: 06-22-2019, 01:24 PM
  4. How can we avoid unwanted arguments?
    By Tomhardy in forum General Discussion
    Replies: 3
    Last Post: 06-13-2019, 06:06 PM
  5. How can we avoid to take things personally?
    By Bhavya in forum General Discussion
    Replies: 0
    Last Post: 06-11-2019, 05:28 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Who We Are

The Hub Sri Lanka is an online community portal for all the Sri Lankan digital Citizen's to enthusiastically learn and connect with the society by enormously increasing their knowledge and careers through an extensive collaborative marketplace.

Join us
RSS RSS 2.0 XML MAP HTML