System and method for synchronizing access to shared variables in a virtual machine in a digital computer system
First Claim
1. A code generator for generating, from code in a program, native code executable by a computer system, the code generator comprising:
- A. a code portion receiver configured to receive a portion of the program code for which the native executable code is to be generatedB. a synchronization statement detector configured to determine whether the received program code portion includes a statement for synchronizing access by multiple execution threads to at least one variable contained within the obtained code; and
C. a native code generator configured to, in response to positive determination by said synchronization statement detector, generate native code for the synchronization statement including a wait-free synchronization construct to synchronize access to the at least one variable.
2 Assignments
0 Petitions
Accused Products
Abstract
A code generating system generates, from code in a program, native code that is executable by a computer system. The code generating system may be included in a just-in-time compiler used to generate native code that is executable by a computer system, from a program in Java Byte Code form, and specifically generates, in response to Java Byte Code representative of a synchronization statement that synchronizes access by multiple threads of execution to at least one variable contained in the Java Byte code, one or more native code instructions that implements a wait-free synchronization methodology to synchronization access to the at least one variable. Since the instructions which implement the wait-free synchronization methodology do not require calls to the operating system, they can generally be processed more rapidly than other synchronization techniques which do require operating system calls.
-
Citations
18 Claims
-
1. A code generator for generating, from code in a program, native code executable by a computer system, the code generator comprising:
-
A. a code portion receiver configured to receive a portion of the program code for which the native executable code is to be generated B. a synchronization statement detector configured to determine whether the received program code portion includes a statement for synchronizing access by multiple execution threads to at least one variable contained within the obtained code; and C. a native code generator configured to, in response to positive determination by said synchronization statement detector, generate native code for the synchronization statement including a wait-free synchronization construct to synchronize access to the at least one variable. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A code generation method for generating, from code in a program, native code executable by a computer system, the code generation method comprising the steps of:
-
A. receiving a portion of the program code for which the native executable code is to be generated B. determining whether the received program code portion includes a statement for synchronizing access by multiple execution threads to at least one variable contained within the obtained code; and C. in response to positive determination during said synchronization statement determination step, generate native code for the synchronization statement including a wait-free synchronization construct to synchronize access to the at least one variable. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer program product for use in connection with a computer to provide a code generator for generating, from code in a program, native code executable by a computer system, the computer program product comprising a computer-readable medium having encoded thereon:
-
A. a code portion receiver module configured to enable the computer to receive a portion of the program code for which the native executable code is to be generated B. a synchronization statement detector module configured to enable the computer to determining whether the received program code portion includes a statement for synchronizing access by multiple execution threads to at least one variable contained within the obtained code; and C. a native code generator module configured to enable the computer to, in response to positive determination by said synchronization statement detector, generate native code for the synchronization statement including a wait-free synchronization construct to synchronize access to the at least one variable. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification