Added a name to Pd and a syscall to set it.
Added simple deadlock detection.