Processor scheduling and deadlock