It is locked by the process, if the process terminate the lock is released.