views:

5

answers:

0

Hi all

I would like to know the capability of OS eg. HP-UX where my java application is deployed. If the java application has a server socket which is listening infinitely, it acquires the system resource ie.. port from OS and use it.

Now, if the port is locked and the java process were to die(kill -9 pid) before releasing the lock... my question is Will the OS would periodically remove these dead locks, thereby releasing the resources for other process to use... –

I can understand, through java we can handle graceful shutdown of JVM to a certain level using Runtime.addshutdownhook. But I would like to know about the OS capability to detect any locked resource of crashed process, to be released for other processes to acquire.