Thread related questions
Thread vs Process
Memory Dump
DeadLock in Java
What is deadlock?
Deadlock describes a situation where two or more threads are blocked forever, waiting for each other. Deadlock occurs when multiple threads need the same locks but obtain them in different order. A Java multithreaded program may suffer from the deadlock condition because the synchronized keyword causes the executing thread to block while waiting for the lock, or monitor, associated with the specified object.
Source : https://www.tutorialspoint.com/java/java_thread_deadlock.htm
How to identify it?
How to avoid it ?
Memory Leak
Java does automatic Garbage collection. However there can be situations where garbage collector does not collect objects because there are references to them. There might be situations where where an application creates lots of objects and does not use them. Just because every objects has valid references, garbage collector in Java can’t destroys the objects. Such types of useless objects are called as Memory leaks.
Source : https://www.geeksforgeeks.org/memory-leaks-java/
Links to refer: https://dzone.com/articles/memory-leak-andjava-code
Memory Dump
DeadLock in Java
What is deadlock?
Deadlock describes a situation where two or more threads are blocked forever, waiting for each other. Deadlock occurs when multiple threads need the same locks but obtain them in different order. A Java multithreaded program may suffer from the deadlock condition because the synchronized keyword causes the executing thread to block while waiting for the lock, or monitor, associated with the specified object.
Source : https://www.tutorialspoint.com/java/java_thread_deadlock.htm
How to identify it?
How to avoid it ?
Memory Leak
Java does automatic Garbage collection. However there can be situations where garbage collector does not collect objects because there are references to them. There might be situations where where an application creates lots of objects and does not use them. Just because every objects has valid references, garbage collector in Java can’t destroys the objects. Such types of useless objects are called as Memory leaks.
Source : https://www.geeksforgeeks.org/memory-leaks-java/
Links to refer: https://dzone.com/articles/memory-leak-andjava-code
Comments
Post a Comment