US2014068572A1PendingUtilityA1

Java native interface array handling in a distributed java virtual machine

Assignee: DAWSON MICHAEL HPriority: Aug 28, 2012Filed: Aug 28, 2012Published: Mar 6, 2014
Est. expiryAug 28, 2032(~6.1 yrs left)· nominal 20-yr term from priority
G06F 9/547G06F 9/45504
50
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A method for executing native code in a distributed Java Virtual Machine (JVM) is disclosed herein. The method may include receiving, in a first thread executing in a remote execution container, a first native code-generated call, such as a Java Native Interface (JNI) call, to a second thread, the first call including a first array write request. The first call may be stored in an instruction cache and bundled with a second native code-generated call and sent to the second thread. The calls are unbundled and executed in the second thread. An opaque handle to an array returned by the second call is bundled with corresponding array data and returned to the first thread. The array data of the bundle is stored in a data cache and retrieved in response to requests for the array data addressed to the second thread. A corresponding computer program product is also disclosed.

Claims

exact text as granted — not AI-modified
1 - 10 . (canceled) 
     
     
         11 . A computer program product to execute native code in a distributed Java Virtual Machine (JVM), the computer program product comprising a computer-readable storage medium having computer-usable program code embodied therein, the computer-usable program code comprising:
 computer-usable program code to receive, in a first thread, a native code-generated call to a second thread, the first native code-generated call including a first array write instruction, the first thread executing in a remote execution container with respect to the second thread;   computer-usable program code to, in response to receipt of the first native code-generated call, store the first native code-generated call in an instruction cache;   computer-usable program code to receive, in the first thread, a second native code-generated call to the second thread, the second native code-generated call including a first function call, that is not an array write instruction, from a first calling function; and   computer-usable program code to, in response to receipt of the second native code-generated call, bundle the first and second native code-generated calls and transmit the bundled first and second native code-generated calls to the second thread.   
     
     
         12 . The computer program product of  claim 11 , further comprising computer-usable program code to:
 receive the bundled first and second native code-generated calls in a second thread;   unbundle the first and second native code-generated calls;   execute the first array write instruction in the second thread; and   execute the first function call in the second thread.   
     
     
         13 . The computer program product of  claim 12 , further comprising computer-usable program code to:
 output from the first function call a return value referencing an output array;   in response to output of the return value, bundle the return value and the output array; and   transmit the bundled return value and output array to the first thread.   
     
     
         14 . The computer program product of  claim 13 , further comprising computer-usable program code to:
 extract, in the first thread, the output array and return value from the bundled return value and output array;   store the output array in a data cache; and   return the return value to the first calling function.   
     
     
         15 . The computer program product of  claim 14 , further comprising computer-usable program code to:
 receive, in the first thread, a third native code-generated call including an array read request to access the output array;   intercept the native code-generated call in the first thread; and   return the output array from the data cache in response to the array read request.   
     
     
         16 . The computer program product of  claim 14 , further comprising computer-usable program code to:
 receive, in the first thread, a third native code-generated call including a second function call that is not an array write or array read request; and   in response to receiving the third native code-generated call, clear the data cache.   
     
     
         17 . The computer program product of  claim 14 , further comprising computer-usable program code to:
 in response to receiving the third native code-generated call, transmit any instructions stored in the instruction cache to the second thread.   
     
     
         18 . The computer program product of  claim 12 , further comprising computer-usable program code to:
 output from the first function call a return value referencing an output array;   in response to output of the return value, evaluate a size of the output array; and   if the size of the output array does not exceed a size threshold, transmit a bundle including the return value and the output array to the first thread, otherwise, transmit the return value to the first thread.   
     
     
         19 . The computer program product of  claim 12 , further comprising computer-usable program code to:
 output from the first function call a return value referencing an output array;   in response to output of the return value, evaluate a size of the output array; and   if the size of the output array exceeds a size threshold, identify an active region of the output array and transmit a bundle including the return value and the active region to the first thread, otherwise, transmit a bundle including the return value and the output array to the first thread.   
     
     
         20 . The computer program product of  claim 11 , further comprising computer-usable program code to:
 receive, in the first thread a third native code-generated call to the second thread, the third native code-generated call including a second array write instruction, the third native code-generated call received after the first native code-generated call but before the second native code-generated call;   in response to receipt of the third native code-generated call, store the third native code-generated call in the instruction cache; and   wherein the computer-usable program code to bundle the first and second native code-generated call and transmit the bundled first and second native code-generated call to the second thread is further operable to bundle the first, second, and third native code-generated calls and transmit the bundled first, second, and third native code-generated calls to the second thread.

Join the waitlist — get patent alerts

Track US2014068572A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.