IP Library Granted Patent US 8,930,961
Granted Patent B2
US 8,930,961 · App. 13/906,809 · Granted Jan 6, 2015

Automatic mutual exclusion

Inventors: Andrew David Birrell (Los Altos, CA); Michael Acheson Isard (San Francisco, CA)
Assignee: Microsoft Corporation
G06F12/14G06F9/3004G06F9/3834G06F9/467
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,930,961
App. No.
13/906,809
Granted
Jan 6, 2015
Kind
B2
Abstract

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.

Claims (34)

1. A method for executing software utilizing shared memory space comprising:

concurrently executing a first code segment and a second code segment;

determining that a third code segment comprises a label indicating that the third code segment is unsynchronized;

in response to determining that the third code segment comprises the label indicating that the third code segment is unsynchronized, committing changes made to a shared memory by the first code segment and the second code segment; and

executing the third code segment.

2. The method of claim 1 , further comprising, responsive to determining that the third code segment comprises the label indicating that the third code segment is unsynchronized, placing the third code segment in a queue.

3. The method of claim 2 , wherein executing the third code segment comprises executing the third code segment from the queue.

4. The method of claim 1 , wherein the third code segment comprises an input/output instruction.

5. The method of claim 1 , wherein the shared memory is hardware transactional memory.

6. The method of claim 1 , wherein the shared memory is software transactional memory.

7. The method of claim 1 , wherein executing the third code segment comprises determining that the shared memory has been altered by at least one other code segment since the third code segment started executing, and, in response, reversing all changes made to the shared memory by the third code segment.

8. A system comprising:

a memory comprising computer instructions; and

at least one processor coupled to the memory, wherein, when executing the computer instructions, the at least one processor performs operations comprising:

concurrently executing a first code segment and a second code segment;

determining that a third code segment comprises a label indicating that the third code segment is unsynchronized;

in response to determining that the third code segment comprises the label indicating that the third code segment is unsynchronized, committing changes made to a shared memory by the first code segment and the second code segment; and

executing the third code segment.

9. The system of claim 8 , wherein the operations further comprise, responsive to determining that the third code segment comprises the label indicating that the third code segment is unsynchronized, placing the third code segment in a queue.

10. The system of claim 9 , wherein the operation of executing the third code segment comprises executing the third code segment from the queue.

11. The system of claim 8 , wherein the third code segment comprises an input/output instruction.

12. The system of claim 8 , wherein the shared memory is hardware transactional memory.

13. The system of claim 8 , wherein the shared memory is software transactional memory.

14. The system of claim 8 , wherein the operation of executing the third code segment comprises determining that the shared memory has been altered by at least one other code segment since the third code segment started executing, and, in response, reversing all changes made to the shared memory by the third code segment.

15. A computer-readable storage medium that is not a signal, the computer-readable storage medium comprising computer-executable instructions for performing operations comprising:

concurrently executing a first code segment and a second code segment;

determining that a third code segment comprises a label indicating that the third code segment is unsynchronized;

in response to determining that the third code segment comprises the label indicating that the third code segment is unsynchronized, committing changes made to a shared memory by the first code segment and the second code segment; and

executing the third code segment.

16. The computer-readable storage medium of claim 15 , wherein the operations further comprise, responsive to determining that the third code segment comprises the label indicating that the third code segment is unsynchronized, placing the third code segment in a queue.

17. The computer-readable storage medium of claim 16 , wherein the operation of executing the third code segment comprises executing the third code segment from the queue.

18. The computer-readable storage medium of claim 15 , wherein the third code segment comprises an input/output instruction.

19. The computer-readable storage medium of claim 15 , wherein the shared memory is hardware transactional memory.

20. The computer-readable storage medium of claim 15 , wherein the shared memory is software transactional memory.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034544/0541 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2014
From: BIRRELL, ANDREW DAVID; ISARD, MICHAEL ACHESON
To: MICROSOFT CORPORATION
Reel/Frame 033925/0578 →
Continuity (2)
Continuation 11763964 · Jun 15, 2007
Related Publication 20130262789A1 · Oct 3, 2013