IP Library Granted Patent US 8,601,456
Granted Patent B2
US 8,601,456 · App. 11/499,191 · Granted Dec 3, 2013

Software transactional protection of managed pointers

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,601,456
App. No.
11/499,191
Granted
Dec 3, 2013
Kind
B2
Abstract

Various technologies and techniques are disclosed that provide software transactional protection of managed pointers. A software transactional memory system interacts with and/or includes a compiler. At compile time, the compiler determines that there are one or more reference arguments in one or more code segments being compiled whose source cannot be recovered. The compiler executes a procedure to select one or more appropriate techniques or combinations thereof for communicating the sources of the referenced variables to the called code segments to ensure the referenced variables can be recovered when needed. Some examples of these techniques include a fattened by-ref technique, a static fattening technique, a dynamic ByRefInfo type technique, and others. One or more combinations of these techniques can be used as appropriate.

Claims (41)

1. A method for providing software transactional protection of managed pointers comprising the steps of:

at compile time, using a compiler that emits calls to a software transactional memory system, the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing;

determining by the compiler that there are one or more variables being passed by reference to separately compiled code segments in at least one code segment being compiled, each variable being passed by reference using an address of the particular variable;

selecting by the compiler at least one technique of a plurality of techniques for communicating the sources of the variables being passed by reference, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises:

creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments;

for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and

at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and,

wherein the modified fatten by-ref technique comprises:

at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and

passing the by-ref information holder by reference;

modifying by the compiler the at least one code segment to implement the selected technique; and

creating an executable using the modified code segment.

2. The method of claim 1 , wherein the by-ref information holder is an instance of one of a plurality of pre-defined value types.

3. The method of claim 1 , wherein technique is selected from the group consisting of a fattened by-ref technique, a modified fattened by-ref technique, and a static fattening technique.

4. A memory having computer-executable instructions for causing a computer to:

at compile time, use a compiler that emits calls to a software transactional memory system, the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing;

determine by the compiler that there are one or more variables being passed by reference to separately compiled code segments in at least one code segment being compiled, each variable being passed by reference using an address of the particular variable;

select by the compiler at least one technique of a plurality of techniques for communicating the sources of the variables being passed by reference, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises:

creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments;

for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and

at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and

adding the type as a call site argument to the call to the method; and,

wherein the modified fatten by-ref technique comprises:

at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and

passing the by-ref information holder by reference;

modify by the compiler the at least one code segment to implement the selected technique; and

create an executable using the modified code segment.

5. A memory having computer-executable instructions for causing a computer to perform steps comprising:

at compile time, using a compiler that emits calls to a software transactional memory system, wherein the software transaction memory system is a concurrency control mechanism for controlling access to shared memory in concurrent computing;

using the compiler, determine that there is a first argument and a second argument referenced in at least one code segment being compiled whose source cannot be recovered because the first argument and the second argument are variables being passed by reference using addresses of the variables;

select at least one technique of a plurality of techniques for communicating a first source of the first argument, wherein the at least one technique comprises either a fattened by-ref technique or a modified fattened by-ref technique that uses enumerations and structures, wherein the fattened by-ref technique comprises:

creating a new by-ref info type that contains information necessary to distinguish different kinds of actual arguments;

for a method that has at least one by-ref argument, change the by-ref argument to include an additional argument for a variable using the new by-ref info type; and

at a call site for the method that has the at least one by-ref argument, inserting code to assign an appropriate one or more values to the new by-ref info type, and adding the type as a call site argument to the call to the method; and,

wherein the modified fatten by-ref technique comprises:

at each call site that invokes a particular method that has reference arguments needing identified, allocating a by-ref information holder; and

passing the by-ref information holder by reference;

select at least one technique of the plurality of techniques for communicating a second source of the second argument, the second technique solving a problem that is only present with the second argument and not the first argument; and

modify the at least one code segment to implement the first technique for the first argument and the second technique for the second argument.

6. The computer-readable medium of claim 5 , wherein the problem that is only present with the second argument is that a value of the second argument is not known until runtime.

7. The computer-readable medium of claim 6 , wherein the problem is solved using a dynamic by-ref info type technique.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →