Method, apparatus and computer program product for invoking a thread-unaware routine that uses an operation-dependent temporary data structure
First Claim
1. A computer controlled method comprising:
- (a) invoking a thread unaware operation routine, that implements an operation that accesses an operation-dependent temporary data structure from within a multi-threaded computing environment, said thread unaware operation routine executed by a plurality of threads;
(b) invoking a pre-process routine separate from said thread unaware operation routine that prepares said operation-dependent temporary data structure for access by said thread unaware operation routine; and
(c) invoking said thread unaware operation routine by one or more of said plurality of threads to perform said thread unaware operation routine using said operation-dependent temporary data structure allocated by said pre-process routine;
(d) invoking a post-process routine separate form said thread unaware operation routine and said pre-process routine to return consolidated results from said operation-dependent temporary data structure.
3 Assignments
0 Petitions
Accused Products
Abstract
Apparatus, methods and computer program products are disclosed that allows a thread-unaware routine that accesses an operation-dependent temporary data structure to be shared by multiple threads in a multi-threaded computing environment. The programmer for an operation provides three routines—a pre-processing routine, a operation routine, and a post-processing routine. The pre-processing routine allocates the operation-dependent temporary data structure. The operation routine accesses the operation-dependent temporary data structure to perform its operation for each thread that invokes the operation routine. The post-processing routine deallocates the operation-dependent temporary data structure when it is no longer needed.
17 Citations
18 Claims
-
1. A computer controlled method comprising:
-
(a) invoking a thread unaware operation routine, that implements an operation that accesses an operation-dependent temporary data structure from within a multi-threaded computing environment, said thread unaware operation routine executed by a plurality of threads;
(b) invoking a pre-process routine separate from said thread unaware operation routine that prepares said operation-dependent temporary data structure for access by said thread unaware operation routine; and
(c) invoking said thread unaware operation routine by one or more of said plurality of threads to perform said thread unaware operation routine using said operation-dependent temporary data structure allocated by said pre-process routine;
(d) invoking a post-process routine separate form said thread unaware operation routine and said pre-process routine to return consolidated results from said operation-dependent temporary data structure. - View Dependent Claims (2, 3, 4, 5, 6)
deallocating said operation-dependent temporary data structure after completion of all of said plurality of threads.
-
-
6. The computer controlled method of claim 1 further comprising steps of:
-
(e) partitioning said operation-dependent temporary data structure into a plurality of data structure partitions; and
(f) assigning one of said plurality of data structure partitions to one of said plurality of threads for processing by said thread unaware operation routine.
-
-
7. An apparatus having a central processing unit (CPU) and a memory coupled to said CPU said apparatus comprising:
-
(g) a thread unaware operation invocation mechanism configured to invoke an operation routine, that implements an operation that accesses an operation-dependent temporary data structure from within a multi-threaded computing environment, said operation routine executed by a plurality of threads;
(h) a pre-process invocation mechanism configured to invoke a pre-process routine separate from said thread unaware operation routine that prepares said operation-dependent temporary data structure for access by said thread unaware operation routine; and
(i) an operation invocation mechanism configured to invoke said thread unaware operation routine by one or more of said plurality of threads to perform said thread unaware operation routine using said operation-dependent temporary data structure allocated by the pre-process invocation mechanisms;
(j) a post-process invocation mechanism configured to invoke a post-process routine separate from said thread unaware operation routine and said pre-process routine to further comprise a result consolidation mechanism configured to return consolidated results from said operation-dependent temporary data structures. - View Dependent Claims (8, 9, 10, 11, 12)
a post-process routine separate from said thread unaware operation routine and said pre-process routine to deallocate said operation-dependent temporary data structure after completion of all of said plurality of threads.
-
-
12. The apparatus of claim 7 further comprising:
-
(k) a partition mechanism configured to partition said operation-dependent temporary data structure into a plurality of data structure partitions; and
(l) a partition assignment mechanism configured to assign one of said plurality of data structure partitions to one of said plurality of threads for processing by said thread unaware operation routine.
-
-
13. A computer program product comprising:
-
(m) a computer usable storage medium having computer readable code embodied therein for causing a computer to invoke an thread unaware operation routine, that implements an operation that accesses an operation-dependent temporary data structure from within a multi-threaded computing environment, said thread unaware operation routine executed by a plurality of threads;
(n) computer readable program code configured to cause said computer to effect a pre-process invocation mechanism configured to invoke a pre-process routine separate from said thread unaware operation routine that prepares said operation-dependent temporary data structure for access by said thread unaware operation routine; and
(o) computer readable program code configured to cause said computer to effect an operation invocation mechanism configured to invoke said thread unaware operation routine by one or more of said plurality of threads to perform said thread unaware operation routine using said operation-dependent temporary data structure allocated by the pre-process invocation mechanism. (p) computer readable program code configured to cause said computer to effect a post-processing invocation mechanism configured to invoke a post-process routine separate from said thread unaware operation routine and said pre-process routine to further effect a result consolidation mechanism configured to return consolidated results from said operation-dependent temporary data structure. - View Dependent Claims (14, 15, 16, 17, 18)
a post-process routine to deallocate said operation-dependent temporary data structure after completion of all of said plurality of threads.
-
-
18. The computer program product of claim 13 further comprising:
-
(q) computer readable program code configured to cause said computer to effect a partition mechanism configured to partition said operation-dependent temporary data structure into a plurality of data structure partitions; and
(r) computer readable program code configured to cause said computer to effect a partition assignment mechanism configured to assign one of said plurality of data structure partitions to one of said plurality of threads for processing by said thread unaware operation routine.
-
Specification