System and method for using native code interpretation to move threads to a safe state in a run-time environment
First Claim
1. A system run on one or more processors for stopping threads in a safe state in a run-time environment comprising:
- a plurality of application threads; and
,a native code interpreter which is configured to stop execution of an executing thread such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and a method for interpreting native code to move threads to a safe state in a run-time environment. In a runtime system or virtual machine (VM) environment, threads process requests to the VM. In many instances such as garbage collection, context switching, and single CPU locking, the threads must be stopped in a safe state for the operation to successfully complete. The invention can be used to ensure that a thread is stopped in such a safe state. In accordance with an embodiment of the invention, when a first thread A is stopped by a second thread B, if A is not in a safe state the invention allows thread B to roll thread A forward to a safe state by interpreting the machine instruction currently is at A. A'"'"'s state is then updated accordingly.
23 Citations
60 Claims
-
1. A system run on one or more processors for stopping threads in a safe state in a run-time environment comprising:
-
a plurality of application threads; and
,a native code interpreter which is configured to stop execution of an executing thread such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system run on one or more processors for moving threads to a safe state in a run-time environment comprising:
-
a plurality of application threads; and
,a native code interpreter which is used to allow a first or a stopping thread to roll a second or an executing thread forward such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A system run on one or more processors which uses native code interpretation to move threads to a safe state in a run-time environment comprising:
-
a first and second application threads; and
,a native code interpreter configured to allow the first thread to stop execution of the second thread and roll the second thread forward such that the second thread is stopped, and the native code interpreter interprets machine code to determine if the second thread is in a safe state, and wherein if the second thread is not in a safe state, the native code interpreter moves the second thread forward in steps and at each step determines the state until the second thread is finally stopped in a safe state. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A system run on one or more processors which uses native code interpretation to stop threads in a safe state in a run-time environment, including instructions stored thereon which when executed cause the system to perform the steps of:
-
allowing a first thread to initially halt execution of a second thread; using native code interpretation of machine code to determine the current state of the second thread; and
,allowing the first thread to roll forward the state of the second thread, wherein if the second thread is not in a safe state, the first thread uses a native code interpreter to move the second thread forward in steps and each step to determine the state until the second thread is finally stopped in a safe state. - View Dependent Claims (17, 18, 19, 20)
-
-
21. A method run on one or more processors for stopping threads in a safe state in a run-time environment, comprising the steps of:
-
providing a plurality of application threads; and
,providing a native code interpreter which is configured to stop execution of an executing thread such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state. - View Dependent Claims (22, 23, 24, 25)
-
-
26. A method run on one or more processors for moving threads to a safe state in a run-time environment, comprising the steps of:
-
providing a plurality of application threads; and
,providing a native code interpreter which is used to allow a first or a stopping thread to roll a second or an executing thread forward such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state. - View Dependent Claims (27, 28, 29, 30)
-
-
31. A method run on one or more processors which uses native code interpretation to move threads to a safe state in a run-time environment, comprising the steps of:
-
providing a first and second application threads; and
,providing a native code interpreter configured to allow the first thread to stop execution of the second thread and roll the second thread forward such that the second thread is stopped, and the native code interpreter interprets machine code to determine if the second thread is in a safe state, and wherein if the second thread is not in a safe state, the native code interpreter moves the second thread forward in steps and at each step determines the state until the second thread is finally stopped in a safe state. - View Dependent Claims (32, 33, 34, 35)
-
-
36. A method run on one or more processors which uses native code interpretation to stop threads in a safe state in a run-time environment, comprising the steps of:
-
allowing a first thread to initially halt execution of a second thread; using native code interpretation of machine code to determine the current state of the second thread; and
,allowing the first thread to roll forward the state of the second thread, wherein if the second thread is not in a safe state, the first thread uses a native code interpreter to move the second thread forward in steps and at each step to determine the state until the second thread is finally stopped in a safe state. - View Dependent Claims (37, 38, 39, 40)
-
-
41. A computer readable medium including instructions stored thereon which when executed by one or more processors on the computer cause the computer to perform the steps of:
-
providing a plurality of application threads; and
,providing a native code interpreter which is configured to stop execution of an executing thread such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state. - View Dependent Claims (42, 43, 44, 45)
-
-
46. A computer readable medium including instructions stored thereon which when executed by one or more processors on the computer cause the computer to perform the steps of:
-
providing a plurality of application threads; and
,providing a native code interpreter which is used to allow a first or a stopping thread to roll a second or an executing thread forward such that the executing thread is stopped, and the native code interpreter interprets machine code to determine if the executing thread is in a safe state, and wherein if the executing thread is not in a safe state, the native code interpreter moves the executing thread forward in steps and at each step determines the state until the executing thread is finally stopped in a safe state. - View Dependent Claims (47, 48, 49, 50)
-
-
51. A computer readable medium including instructions stored thereon which when executed by one or more processors on the computer cause the computer to perform the steps of:
-
providing a first and second application threads; and
,providing a native code interpreter configured to allow the first thread to stop execution of the second thread and roll the second thread forward such that the second thread is stopped, and the native code interpreter interprets machine code to determine if the second thread is in a safe state, and wherein if the second thread is not in a safe state, the native code interpreter moves the second thread forward in steps and at each step determines the state until the second thread is finally stopped in a safe state. - View Dependent Claims (52, 53, 54, 55)
-
-
56. A computer readable medium including instructions stored thereon which when executed by one or more processors on the computer cause the computer to perform the steps of:
-
allowing a first thread to initially halt execution of a second thread; using native code interpretation of machine code to determine the current state of the second thread; and
,allowing the first thread to roll forward the state of the second thread, wherein if the second thread is not in a safe state, the first thread uses a native code interpreter to move the second thread forward in steps and at each step to determine the state until the second thread is finally stopped in a safe state. - View Dependent Claims (57, 58, 59, 60)
-
Specification