• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Threads and deadlocks

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) What do you mean by deadlock in java?
2) How can we prevent deadlock's?
3) Is there any way to access OS threads from java?

[MG]Edited title from "Hi" to make it meaningful
 
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
chenna please Use A Meaningful Subject Line when you start a topic.

Did you try to do a google search about deadlocks in java. There are hundreds of tutorials on it. Also are you talking about accessing OS processes??
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chenna,

1, Deadlock is not Java specific it means the same thing independently from programming languages. As Ankit advice search for it if you don't know what deadlock means.
2, You can prevent them with proper programming. It's not an easy subject.
3, You can use java.lang.Thread to handle threads in java.
 
Marshal
Posts: 76885
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can almost always find something useful in the Java™ Tutorials.
 
Ranch Hand
Posts: 466
1
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chenna,

1) Deadlock refers to a specific condition when two or more processes are each waiting for each other to release a resource, or more than two processes are waiting for resources in a circular chain. Its a concept not limited to Java.
2) There are various algorithms which could be used to avoid this eg: Banker's Algorithm. In Java you can use syncronization keyword.
3) What do you mean by OS thread??

Try to search OS Deadlock and you'll find tons of results for help.

Thanks
Vinod
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic