IP Library Granted Patent US 7,941,616
Granted Patent B2
US 7,941,616 · App. 12/255,354 · Granted May 10, 2011

System to reduce interference in concurrent programs

Assignee: Microsoft Corporation
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 7,941,616
App. No.
12/255,354
Granted
May 10, 2011
Kind
B2
Abstract

Locks are used to protect variables. All variables protected by a lock are allocated on a page associated with a lock. When a thread (called the owner) acquires the lock, a local copy of the memory page containing the variable is created, the original memory page is protected, and all access of the variable in the owner thread is directed to the local copy. Upon releasing the lock, the changes from the local copy are carried over to the memory page and the memory page is unprotected. Any concurrent access of the variable by non-owner threads triggers an exception handler (due to the protection mechanism) and delays such an access until after the owner thread has finished accessing the variable.

Claims (51)

1. A method of locking variables comprising:

assigning a variable protected by a single lock to a memory page;

creating a local copy of the memory page;

locking the memory page;

allowing a process to access the local copy of the memory page;

returning an exception that is handled by an exception handler when an additional process attempts to access the memory page;

after the process is finished with the local copy of the memory page, copying the local copy of the memory page to the memory page; and

unlocking the memory page.

2. The method of claim 1 , further comprising instructing the process to hold the key to the lock.

3. The method of claim 1 , further comprising generating a report on processes that have attempted to reach a variable that is locked.

4. The method of claim 3 , further comprising identifying applications that have attempted to reach a variable that is locked.

5. The method of claim 1 , further comprising modifying application code to assign all copies of a specific variable protected by a single lock to a single memory page.

6. The method of claim 1 , further comprising:

collecting all variables protected by a lock,

collecting all like variables that are protected by a lock into a like variable set; and

storing all variables in the like variable set on the same memory page that is not shared with other data.

7. The method of claim 6 , further comprising collecting all instance of the variable protected by a lock including instance of the variable that are not protected by a lock and including both the locked instance and unlocked instance of the variable in the variable set.

8. The method of claim 6 , wherein a first set of like variables are stored on a first memory page and a second set of like variables are stored on a second memory page.

9. A computer storage medium comprising computer executable code for locking variables, the computer executable code comprising code for

assigning a variable protected by a single lock to a memory page;

creating a local copy of the memory page;

locking the memory page;

allowing a process to access the local copy of the memory page;

returning an exception that is handled by an exception handler when an additional process attempts to access the memory page;

after the process is finished with the local copy of the memory page, copying the local copy of the memory page to the memory page;

unlocking the memory page; and

generating a report on processes or applications that have attempted to reach a variable that is locked.

10. The computer storage medium of claim 9 , further comprising computer executable instructions for instructing the process to hold the key to the lock.

11. The computer storage medium of claim 9 , further comprising computer executable instructions for modifying application code to assign all copies of a specific variable protected by a single lock to a single memory page.

12. The computer storage medium of claim 9 , further comprising computer executable instructions for:

collecting all variables protected by a lock,

collecting all like variables that are protected by a lock into a like variable set; and

storing each like variable set that is protected by a lock on an individual memory page that is not shared with other data.

13. The computer storage medium of claim 12 , further comprising computer executable instructions for collecting all instance of the variable protected by a lock including instance of the variable that are not protected by a lock and including both the locked instance and unlocked instance of the variable in the variable set.

14. The computer storage medium of claim 12 , wherein a first set of like variables are store on a first memory page and a second set of like variables are stored on a second memory page.

15. A computer system comprising a processor, a memory in communication with the processor and an input output circuit; the processor being configured in accordance with computer executable instructions for locking variables, the computer executable instructions comprising instructions for:

assigning a variable protected by a single lock to a memory page;

creating a local copy of the memory page;

locking the memory page;

allowing the process to hold the key to the lock

allowing a process to access the local copy of the memory page;

returning an exception that is handled by an exception handler when an additional process attempts to access the memory page;

after the process is finished with the local copy of the memory page, copying the local copy of the memory page to the memory page;

unlocking the memory page; and

generating a report on processes or applications that have attempted to reach a variable that is locked.

16. The computer system of claim 15 , further comprising computer executable instructions for:

collecting all variables protected by a lock,

collecting all like variables that are protected by a lock into a like variable set; and

storing all variables in the like variable set on the same memory page that is not shared with other data.

17. The computer system of claim 15 , further comprising computer executable instructions for collecting all instance of the variable protected by a lock including instance of the variable that are not protected by a lock and including both the locked instance and unlocked instance of the variable in the variable set.

18. The computer system of claim 15 , wherein a first set of like variables are store on a first memory page and a second set of like variables are stored on a second memory page.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034564/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 11, 2009
From: RAJAMANI, SRIRAM; RAMALINGAM, GANESAN; RANGANATH, VENKATESH-PRASAD; VASWANI, KAPIL
To: MICROSOFT CORPORATION
Reel/Frame 022662/0893 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 19, 2009
From: RAJAMANI, SRIRAM; RAMALINGAM, GANESAN; RANGANATH, VENKATESH-PRASAD; VASWANI, KAPIL
To: MICROSOFT CORPORATION
Reel/Frame 022278/0940 →
Continuity (1)
Related Publication 20100100690A1 · Apr 22, 2010