发明名称 Automatic mutual exclusion
摘要 An automatic mutual exclusion computer programming system is disclosed which allows a programmer to produce concurrent programming code that is synchronized by default without the need to write any synchronization code. The programmer creates asynchronous methods which are not permitted make changes to shared memory that they cannot reverse, and can execute concurrently with other asynchronous methods. Changes to shared memory are committed if no other thread has accessed shared memory while the asynchronous method executed. Changes are reversed and the asynchronous method is re-executed if another thread has made changes to shared memory. The resulting program executes in a serialized order. A blocking system method is disclosed which causes the asynchronous method to re-execute until the blocking method's predicate results in an appropriate value. A yield system call is disclosed which divides asynchronous methods into atomic fragments. When a yield method call is made, shared memory changes are committed if possible or reversed and the atomic fragment is re-executed.
申请公布号 US9286139(B2) 申请公布日期 2016.03.15
申请号 US201514589278 申请日期 2015.01.05
申请人 Microsoft Technology Licensing, LLC 发明人 Birrell Andrew David;Isard Michael Acheson
分类号 G06F9/52;G06F9/30;G06F9/38;G06F9/46;G06F12/14;G06F13/42 主分类号 G06F9/52
代理机构 代理人 Swain Sandy;Yee Judy;Minhas Micky
主权项 1. A computer-readable storage medium comprising executable instructions that when executed by a processor cause the processor to effectuate operations comprising: executing a call to a first asynchronous method comprising a first instruction and a second instruction, wherein the first asynchronous method accesses a shared memory space which may be used by a second asynchronous method executing in parallel to the first asynchronous method; determining that the first instruction is not permitted to be executed in the first asynchronous method, and, in response, placing the first instruction in a queue; determining that the second instruction is permitted to be executed in the first asynchronous method, and, in response, executing the second instruction; determining whether the shared memory space has been altered by the second asynchronous method executing in parallel to the first asynchronous method since the first asynchronous method started executing; responsive to determining that the shared memory space has not been altered by the second asynchronous method since the first asynchronous method started executing, committing a change made to the shared memory space by the first asynchronous method; and responsive to committing the change made to the shared memory space by the first asynchronous method, executing the first instruction from the queue.
地址 Redmond WA US