1. A computer implemented method for deadlock detection of parallel programs, comprising: determining that a lock of the parallel programs is no longer used in a running procedure of the parallel programs; deleting a node corresponding to the lock that is no longer used, and edges relating to the lock that is no longer used, from a lock graph corresponding to the running procedure of the parallel programs to acquire an updated lock graph, wherein the lock graph is constructed according to lock operation of the parallel programs; and performing deadlock detection on the updated lock graph.