The present invention relates to systems, method and computer program products for delegating work in a computer environment.
Parallel programming is a form of parallelization of computer code across multiple processors in parallel computing environments. Task parallelism distributes execution processes (threads) across different parallel computing nodes.
In order to write a parallel program, programmers should understand how to use mutex locks, how to avoid dead lock situations, when to instruct the compiler not to optimize because it might jeopardize the parallel integrity of the system, and should make sure there is no concurrency around critical data. Simplifying parallelizing a program requires removing many of these difficult error prone steps.
According to one embodiment, a method of delegating work of a computer program across a mixed computing environment is provided. The method includes: performing on one or more processors: allocating a container structure on a first context; delegating a new operation to a second context based on the container; receiving the results of the new operation; and storing the results in the container.
According to another embodiment, a computer program product for delegating work of a computer program across a mixed computing environment is provided. The computer program product includes a tangible storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing. The method includes: allocating a container structure on a first context; delegating a new operation to a second context based on the container; receiving the results of the new operation; and storing the results in the container.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention. For a better understanding of the invention with the advantages and the features, refer to the description and to the drawings.
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The forgoing and other features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
The following description is merely exemplary in nature and is not intended to limit the present disclosure, application, or uses. It should be understood that throughout the drawings, corresponding reference numerals indicate like or corresponding parts and features.
With reference now to
Each of the processors 14, 20-24 communicates over a network 26. The network 26 can be a single network or multiple networks and can be internal, external, or a combination of internal and external to the machine 12, depending on the location of the processors 14, 20-24.
In various embodiments, each processor 14, 20-24 can include of one or more central processors (not shown). Each of these central processors can include one or more sub-processors. The configuration of these central processors can vary. Some may be a collection of stand alone processors attached to memory and other devices. Other configurations may include one or more processors that control the activities of many other processors. Some processors may communicate through dedicated networks or memory where the controlling processor(s) gather the necessary information from disk and other more global networks to feed the smaller internal processors.
In the examples provided hereinafter, the computing machines 12 and processors 14, 20-24 will commonly be referred to as nodes. The nodes perform portions of a computer program 28 using the delegation system 11.
With reference now to
As shown in
The program logic 38 of each context 36 can be composed of systems 48, spaces 50, and planes 52. For example, the universe 32 (
With reference back to
To further enable the execution of the universe 32 across the nodes 30a, 30b, and within the nodes 30a, 30b, each process 34 may include or be associated with a collection of support routines called a run-time environment 56 (as will be discussed in more detail below). In various embodiments, the node environment 54 communicates with the run-time environment 56 using name sockets 58. As can be appreciated, other forms of communication means may be used to communicate between systems such as, for example, shared memory.
With reference now to
With regard to the ownership, in order to execute a computer program 28 (
Other contexts that need operations performed on that object may delegate that operation to the owning context 36b. The context that requests the construction and that delegates operations on the object is called a delegating context 36a. The delegation can be a local delegation between contexts 36a. 36b within a node 30a (see
In various embodiments, as shown in
Based on the ownership, the constructor 60 creates a container structure 64 for the object. The container 64 can include, but is not limited to, a lock 66, a context identification 68, and an address 70. For example, when a delegating context 36a creates a new object for an owning context 36b (other than itself), the delegating context 36a creates the container 64. The lock 66 of the container 64 is a mutex that is locked on behalf of the owning context 36b. The mutex lock includes a control variable containing the context identity 68 of the lock holder. When a context other than the lock holder attempts to acquire the lock that context will be blocked. When the lock holder attempts to acquire the lock, the access is permitted. This allows one context to lock on behalf of another.
The address 70 of the container 64 is memory for the owning context 36b to use to store results 78 of the object. That memory can be the size of the object or the size of a pointer. For example, if the container 64 includes enough memory for the data, the owning context 36b can use that memory for the object. In another example, if the container 64 only includes enough memory for a pointer, the owning context 36b can allocate a new object and place a pointer to that new object inside the container 64.
Once the constructor 60 establishes the container 64 and locks the container 64 on behalf of the owning context 36b, the delegator 62 then delegates a “new operation” to the owning context 36b. In order to delegate the operation, the delegator 62 generates a package that includes enough information to determine what operation to perform, what arguments the operation requires, and where to put the results. In various embodiments, the delegation function can be a structure that contains a function pointer for cases where the owner is in the same address space and an index into a function table in the case where the owner is not. Further in the case where the owning context 36b is in the same address space the function pointer is not the pointer to the constructor but rather a pointer to the function that knows how to unpack the structure and call the actual constructor. This additional service function can be automatically generated by a compiler.
In the case where a distant delegation is performed, as shown in
The owning context 36b, through a delegation process, removes the new operation from a work queue 74 and performs the operation on an operation processor 76. Through the operation, the owning context 36a allocates the contents of the structure, places the new information within the address 70 of the container 64, and unlocks the container 64.
Any time after the “new operation” has been delegated, the delegating context 36a can use the container 64 to delegate other operations on the container 64. The container 64 is used by the owning context as a class identifier in the same way as “this” is used in an object oriented language. Access to the data is controlled by the mutex lock not the pointer itself. Therefore, once the container 64 is allocated the owning context 36b has the necessary reference to perform the requested operations.
To insure correct operation of the delegated operations, in-order delegations are used until the construction of the object is complete. An in-order delegation forces the owning context 36b to perform the operations in the same order as they were placed on the work queue 74. After the creation of the object is complete, both in-order and out-of-order delegations are processed. For example, until the object is completely constructed the delegating context 36a holds the delegation beginning with the first out-of-order delegation. After construction is complete the held delegations are released in the order they were received and given to the owner for processing. This restriction prevents any out-of-order operations from attempting to work on an object before the object is constructed. Each successive operation request on the object uses the same container pointer so each successive operation sees the results of the previous delegations on that object.
In computing systems where the delegation is built into the language with proper safeguards, the mutex lock operation can be removed. This can be accomplished, for example, by the “this” object being an opaque type, where the programmer can't reference but the owning context can cast into a meaningful data type. Because the delegating contexts can't reference the object, only the owner will be able to access the data. This removes all locks except those used to place the operation on the work queue 74 of the owning context 36a. Further this allows the delegating context 36a to delegate operations on the object before the owning context 36b may have completed construction.
With specific reference now to
When that handle in the reference is not null the queue is able to release this delegation to the owning context 36c. Ownership requires that the new operator have an additional argument called the owning context. It may be implemented as an additional argument or a delegation operation permitted on the new operator. In either case, the context that owns the data does the construction. Additionally the destructor functions need to be owner aware.
As can be appreciated, the processes 34a and 34b can each include transceivers (not shown) that transmit and receive the operations and results 78 between the processes 34a 34b and that place the operations and results 78 in their respective locations (e.g., the work queue 74, or the address 70).
With reference now to
In
The owning context 36b receives the new operation and allocates the memory, initializes the value, and places the object value in the container at 100. The container is unlocked at 102. Thereafter, the method owning context 34b may continue with further processing.
In
The owning context removes the package from the queue 74 at 112. The package is interpreted and the function is performed at 114. The results of the function are placed in the area allocated by the delegator at 116. The results are unlocked at 118. Thereafter, the owning context 34b may continue with further processing.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, element components, and/or groups thereof.
The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated
The flow diagrams depicted herein are just one example. There may be many variations to this diagram or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention.
While the preferred embodiment to the invention had been described, it will be understood that those skilled in the art, both now and in the future, may make various improvements and enhancements which fall within the scope of the claims which follow. These claims should be construed to maintain the proper protection for the invention first described.
Number | Name | Date | Kind |
---|---|---|---|
4414624 | Summer, Jr. et al. | Nov 1983 | A |
5193191 | McKeeman et al. | Mar 1993 | A |
5307492 | Benson | Apr 1994 | A |
5437030 | Reitman et al. | Jul 1995 | A |
5553286 | Lee | Sep 1996 | A |
5555411 | England et al. | Sep 1996 | A |
5708810 | Kern et al. | Jan 1998 | A |
5734822 | Houha et al. | Mar 1998 | A |
5828853 | Regal | Oct 1998 | A |
5860006 | Osborne et al. | Jan 1999 | A |
5923878 | Marsland | Jul 1999 | A |
5923884 | Peyret et al. | Jul 1999 | A |
5933639 | Meier et al. | Aug 1999 | A |
6026362 | Kim et al. | Feb 2000 | A |
6112023 | Dave et al. | Aug 2000 | A |
6158045 | You | Dec 2000 | A |
6158047 | Le et al. | Dec 2000 | A |
6185733 | Breslau et al. | Feb 2001 | B1 |
6209020 | Angle et al. | Mar 2001 | B1 |
6324683 | Fuh et al. | Nov 2001 | B1 |
6374402 | Schmeidler et al. | Apr 2002 | B1 |
6397331 | Ober et al. | May 2002 | B1 |
6442752 | Jennings et al. | Aug 2002 | B1 |
6487577 | Sundararajan | Nov 2002 | B1 |
6493728 | Berger | Dec 2002 | B1 |
6560609 | Frey et al. | May 2003 | B1 |
6708195 | Borman et al. | Mar 2004 | B1 |
6711616 | Stamm et al. | Mar 2004 | B1 |
6748459 | Lin et al. | Jun 2004 | B1 |
5915511 | Susaria et al. | Feb 2005 | A1 |
6886081 | Harres | Apr 2005 | B2 |
6901588 | Krapf et al. | May 2005 | B1 |
6915511 | Susarla et al. | Jul 2005 | B2 |
6931636 | Deao et al. | Aug 2005 | B2 |
6975595 | Peterson | Dec 2005 | B2 |
7031887 | Jain et al. | Apr 2006 | B2 |
7073170 | Grier et al. | Jul 2006 | B2 |
7174544 | Zee | Feb 2007 | B2 |
7281247 | Lodwick et al. | Oct 2007 | B2 |
7321958 | Hofstee et al. | Jan 2008 | B2 |
7401219 | Aho et al. | Jul 2008 | B2 |
7415703 | Aguilar, Jr. et al. | Aug 2008 | B2 |
7519800 | Michaelis | Apr 2009 | B2 |
7533389 | Verbeke et al. | May 2009 | B2 |
7555744 | Chkodrov et al. | Jun 2009 | B2 |
7574438 | Cina | Aug 2009 | B2 |
7584239 | Yan et al. | Sep 2009 | B1 |
7657573 | Hancsarik | Feb 2010 | B1 |
7689783 | Hofstee et al. | Mar 2010 | B2 |
7689784 | Suzuoki | Mar 2010 | B2 |
7992133 | Theroux et al. | Aug 2011 | B1 |
8001427 | Sohm et al. | Aug 2011 | B2 |
8205095 | Chung | Jun 2012 | B2 |
20010047512 | Szewerenko et al. | Nov 2001 | A1 |
20020144248 | Forbes et al. | Oct 2002 | A1 |
20020170047 | Swetland | Nov 2002 | A1 |
20030009467 | Perrizo | Jan 2003 | A1 |
20030012440 | Nakanishi | Jan 2003 | A1 |
20030088865 | Lim et al. | May 2003 | A1 |
20030135621 | Romagnoli | Jul 2003 | A1 |
20040019890 | Verbeke et al. | Jan 2004 | A1 |
20040054861 | Harres | Mar 2004 | A1 |
20040172383 | Yoshida | Sep 2004 | A1 |
20040215522 | Eder | Oct 2004 | A1 |
20040243979 | Pugh et al. | Dec 2004 | A1 |
20040268345 | Lodwick et al. | Dec 2004 | A1 |
20050081181 | Brokenshire et al. | Apr 2005 | A1 |
20050086644 | Chkodrov et al. | Apr 2005 | A1 |
20050165847 | Kusama | Jul 2005 | A1 |
20050223359 | Nagaraju et al. | Oct 2005 | A1 |
20050262109 | Alexandrescu | Nov 2005 | A1 |
20060037011 | Shi et al. | Feb 2006 | A1 |
20060069713 | Wei et al. | Mar 2006 | A1 |
20060095898 | Chow et al. | May 2006 | A1 |
20060130065 | Chin et al. | Jun 2006 | A1 |
20060168571 | Ghiasi et al. | Jul 2006 | A1 |
20060225060 | Goyan | Oct 2006 | A1 |
20070006174 | Sohm et al. | Jan 2007 | A1 |
20070011494 | Xie et al. | Jan 2007 | A1 |
20070033592 | Roediger et al. | Feb 2007 | A1 |
20070055958 | Birenheide et al. | Mar 2007 | A1 |
20070220517 | Lippett | Sep 2007 | A1 |
20070250814 | Bendapudi et al. | Oct 2007 | A1 |
20070283358 | Kasahara et al. | Dec 2007 | A1 |
20080209405 | Roberts et al. | Aug 2008 | A1 |
20080244599 | Hodson et al. | Oct 2008 | A1 |
20080313640 | Liu et al. | Dec 2008 | A1 |
20090070750 | Gu | Mar 2009 | A9 |
20090119513 | Chung | May 2009 | A1 |
20090164995 | Waris | Jun 2009 | A1 |
20090228892 | Di Luoffo et al. | Sep 2009 | A1 |
20100100941 | Eom et al. | Apr 2010 | A1 |
20100146013 | Mather | Jun 2010 | A1 |
20100162226 | Borissov | Jun 2010 | A1 |
20100299499 | Golla et al. | Nov 2010 | A1 |
20100302944 | Bessis et al. | Dec 2010 | A1 |
20100318693 | Espig et al. | Dec 2010 | A1 |
20110289100 | Madhavarapu | Nov 2011 | A1 |
20110320501 | Woodard | Dec 2011 | A1 |
20120180054 | Beatty, III et al. | Jul 2012 | A1 |
20120185677 | Beatty, III et al. | Jul 2012 | A1 |
20120185828 | Beatty, III et al. | Jul 2012 | A1 |
20120185837 | Beatty, III et al. | Jul 2012 | A1 |
20130086338 | Blainey et al. | Apr 2013 | A1 |
20130086570 | Blainey et al. | Apr 2013 | A1 |
Entry |
---|
Anthony Chronopoulous, “A Class of Parallel Iterative Methods Implemented on Multiprocessors”, Dept of Computer Science, University of IL, Nov. 1986. |
Khalifa et al., “Dynamic On-Line Allocation of Independent Task onto Heterogeneous Computing Systems to Maximize Load Balancing”, 978-1-4244-3555-5/08 IEEE 2008. |
Mark Edward Segal et al., “Dynamic Program Updating in a Distributed Computer System”, IP.com, IPCOM00128761D, 1989. |
PCT Application No. PCT/US012/020256 Filed: Jan. 5, 2012 Applicant: International Business Machines Corporation International Search Report and Written Opinion. |
“Sourcery G++ Lite ARM EABI Sourcery G++ Lite 2010q1-188 Getting Started”, CodeSourcery , 2009 , , pp. 1-91. |
Herman Chung-Hwa Rao , “Distributed Application Framework for Large Scale Distributed System”, IEEE , 1993 , , pp. 31-38. |
Larry Peterson et al. , “Distributed Shared Library”, ACM , 1992 , , pp. 1-5. |
“distcc: a fast, free distributed CIC++ compiler” , Distcc, Dec. 2004, <https://code.google.com/p/distcci>, pp. 1-2. |
Harold Carr et al., “Compiling Distributed C++”, IEEE, 1993, <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=395492>, pp. 1-8. |
Meier, M., et al., Experiences with Building Distributed Debuggers, SPDT '96 Proceedings of the SIGMETRICS symposium on Parallel and distributed tools, 1996, pp. 70-79. |
Miller, B., et al., A Mechanism for Efficient Debugging of Parallel Programs, PADD '88 Proceedings of the 1988 ACM SIGPLAN and SIGOPS workshop on Parallel and distributed debugging, 1988, pp. 141-150. |
Peter Fritzson , “Preliminary Experience from the DICE system a Distributed Incremantal Compiling Environment”, ACM, 1984, <http://delivery.acm.org/10.1145/810000/808256/p113-fritzson.pdf>, pp. 1-11. |
Number | Date | Country | |
---|---|---|---|
20120180054 A1 | Jul 2012 | US |