Submitted by heartin on Sat, 10/18/2014 - 22:54
You have already seen what deadlock is and the necessary conditions for a deadlock to happen. We can try to prevent or avoid deadlock, and if that doesn’t work out, we should detect deadlock and try to recover from deadlock.
Submitted by heartin on Sat, 10/18/2014 - 22:49
System resources (e.g. CPU time, Memory space, I/O devices such as printers etc.) are finite, and many processes will be competing for these resources. If the requested resource is not readily available, the processes will have to wait. If each process holds a resource and wait for another resource, which is held by another waiting process, and if it finally forms a circular wait sequence, where everyone will be waiting indefinitely without getting the resource, it will result in a deadlock.
Submitted by heartin on Fri, 09/12/2014 - 09:08
Objects in Java are allocated on the heap. The heap is an area of memory that is used for dynamically allocated memory, such as objects. In Java, objects allocated in a program are later released by the JVM through a process called Garbage collection which is performed automatically by the JVM. An application has little control over this process. There are also other tyoes of memory available in Java.
Submitted by heartin on Wed, 08/20/2014 - 22:04
This note will provide a quick overview of different out of memory errors you might enounter, how to identify the type of the error, how you can analyze them further and how you can try to avoid them in future. We will also see some JVM flags which can help us in this analysis.
We will see the four main cases of out of memory error:
-
Not enough native memory for JVM
-
Not enough permgen/metaspace memory in heap
-
Not enough heap memory
Submitted by heartin on Thu, 08/07/2014 - 21:43
Every class in Java has a finalize() method inherited from the Object class, which will be called by GC when the object is eligible for garbage collection. Main purpose of this method is to perform any cleanup actions before the object is completely discarded by GC. However, the finalize method may take any action, including making this object available again to other threads. The finalize method of class Object does nothing; it simply returns normally.
Pages