CPC G06F 9/52 (2013.01) [G06F 9/46 (2013.01); G06F 9/466 (2013.01); G06F 9/467 (2013.01); G06F 9/48 (2013.01); G06F 9/4806 (2013.01); G06F 9/50 (2013.01); G06F 9/5005 (2013.01); G06F 9/5016 (2013.01); G06F 9/5022 (2013.01); G06F 9/5038 (2013.01); G06F 9/522 (2013.01); G06F 9/524 (2013.01); G06F 9/526 (2013.01); G06F 16/901 (2019.01); G06F 16/9024 (2019.01)] | 20 Claims |
1. A system comprising:
one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising:
receiving a representation of a computational graph having a first critical section subgraph and a second critical section subgraph, the first critical section subgraph and the second critical section subgraph each specifying a respective lock operation, a respective unlock operation, and one or more other operations;
executing the respective lock operation of the first critical section subgraph including issuing a first request to a resource to create a first shared critical section object that is associated with a first identifier;
executing the respective lock operation of the second critical section subgraph including issuing a second request to the resource to create a second shared critical section object that is also associated with the first identifier;
denying, by the resource, the second request to create the second shared critical section object based on the first identifier already being associated with the first shared critical section object that is currently maintained by the resource;
determining that the first shared critical section object was created by the resource;
in response to determining that the first shared critical section object was created by the resource, executing the one or more other operations of the first critical section subgraph in serial; and
executing the respective unlock operation of the first critical section subgraph including issuing a third request to the resource to delete the first shared critical section object.
|