发明名称 Class-Based Mutex
摘要 When different types of shared resources need mutex protection, the shared resources can be organized into classes. Each class of shared resources can have multiple types of resources. A mutex pool can store multiple mutex objects, each mutex object corresponding to a class of resources. The mutex object can be used to protect each shared resource in the corresponding class.
申请公布号 US2014366036(A1) 申请公布日期 2014.12.11
申请号 US201313913463 申请日期 2013.06.09
申请人 Apple Inc. 发明人 Vemulapati Murali
分类号 G06F9/52 主分类号 G06F9/52
代理机构 代理人
主权项 1. A method comprising: allocating, by one or more computers, a plurality of first type data structures into a specified number of object groups; allocating, by the one or more computers, a plurality of second type data structures into the object groups; determining, by the one or more computers, an object pool containing a plurality of lock objects, each lock object being configured to allow no more than a designated number of instances of executing computer programs to access data structures in a corresponding object group; receiving, by the one or more computers, a first request from a first instance of an executing computer program to access a first type data structure and then a second request from a second instance of a same or different executing computer program to access a second type data structure; determining, by the one or more computers, whether to allow the second instance to access the second type data structure based at least in part on whether the first type data structure and the second type data structure belong to a same object group, wherein: the one or more computers prevent the second instance to access the second type data structure upon determining that: the first type data structure and the second type data structure are in the same object group, which is locked by a lock object corresponding to that object group; andthe lock object corresponding to the object group indicates that, if the second instance is allowed to access the second type data structure, a number of instances of executing computer programs simultaneously accessing data structures in the locked object group exceeds the designated number.
地址 Cupertino CA US