A protocol for resource locking and deadlock detection in a multi-user environment