deadlock check and resource request