when our applications response time becomes slow or application itself gets hung, we restart the JVM's. In the top level i know that the memory is released,cleared and reinitialized once it is started. But in detail, what is happening beneath this? Is there any link that you guys can help me out with?
The JVM process is completely stopped, and a new JVM process is started. Most likely the threads from the first process are all stopped, its memory is marked as safe for reuse, and a new memory pool is reserved for the second process.
It's just like any other process.
If I were you however, I would try to investigate WHY the application is slowing down and hanging. Perhaps it is a memory problem; objects that cannot be garbage collected because there is still a live reference somewhere that you might not need. Perhaps something else. You'll need to do a lot of debugging and profiling to find out.