WO2007041760A1 - Modified machine architecture with advanced synchronization - Google Patents

Modified machine architecture with advanced synchronization Download PDF

Info

Publication number
WO2007041760A1
WO2007041760A1 PCT/AU2006/001445 AU2006001445W WO2007041760A1 WO 2007041760 A1 WO2007041760 A1 WO 2007041760A1 AU 2006001445 W AU2006001445 W AU 2006001445W WO 2007041760 A1 WO2007041760 A1 WO 2007041760A1
Authority
WO
WIPO (PCT)
Prior art keywords
computer
lock
computers
updated
memory
Prior art date
Application number
PCT/AU2006/001445
Other languages
French (fr)
Inventor
John Matthew Holt
Original Assignee
Waratek Pty Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from AU2005905579A external-priority patent/AU2005905579A0/en
Application filed by Waratek Pty Limited filed Critical Waratek Pty Limited
Priority to AU2006301907A priority Critical patent/AU2006301907A1/en
Publication of WO2007041760A1 publication Critical patent/WO2007041760A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/52Indexing scheme relating to G06F9/52
    • G06F2209/522Manager

Definitions

  • the present invention relates to computing and, in particular, to the simultaneous operation of a plurality of computers interconnected via a communications network.
  • the abovementioned patent specifications disclose that at least one application program written to be operated on only a single computer can be simultaneously operated on a number of computers each with independent local memory.
  • the memory locations required for the operation of that program are replicated in the independent local memory of each computer.
  • each computer has a local memory the contents of which are substantially identical to the local memory of each other computer and are updated to remain so. Since all application programs, in general, read data much more frequently than they cause new data to be written, the abovementioned arrangement enables very substantial advantages in computing speed to be achieved.
  • the stratagem enables two or more commodity computers interconnected by a commodity communications network to be operated simultaneously running under the application program written to be executed on only a single computer.
  • the genesis of the present invention is a desire to at least partially overcome the abovementioned difficulty.
  • a multiple computer environment in which different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of a plurality of computers, each having a local memory and each being interconnected via a communications network, and in which at least one memory location is replicated in the memory of each said plurality of computers, and after each occasion at which each said memory location has its contents written to, or re-written, with a new content, all said corresponding memory locations of said computers are in due course updated via said communications network with said new content, the further improvement comprising the steps of:
  • a computer system comprising a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of said plurality of computers, at least one memory location is replicated in the local memory of each said computer, said system further comprising updating means associated with each said computer to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content, and lock means associated with each said computer to acquire a lock on an object, asset or resource, said lock means including a recording means in which is recorded the name and updated content of all said local memory locations written to prior to releasing said lock, and said lock means after releasing said lock and prior to permitting the acquisition of the same lock by another one of said computers transmitting said updated memory location(s) and updated content(s) to said another one computer, whereby any said computer on
  • a single computer intended to operate in a multiple computer system which comprises a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of said plurality of computers, and at least one memory location is replicated in the local memory of each said computer, said system further comprising updating means associated with each said computer to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content, said single computer comprising: a local memory having at least one memory location intended to be updated via a communications port connectable to said communications network, updating means to in due course update the memory locations of other substantially similar computers via said communications port; lock means associated with said local memory to acquire a lock on an object, asset or resource of said local memory, said lock means including a recording means in which is recorded the name and updated content of said
  • a single computer adapted to interoperate with a plurality of other external computers as a multiple computer system
  • said computer has a local processor and a local memory coupled to the local processor and said computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on said single computer and said plurality of computers, and wherein at least one memory location is replicated in the local memory of each said computer, each said computer including memory location updating means to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content; a method comprising: acquiring a lock on an object, asset, or resource of said local memory of said single computer prior to initially writing said new content; recording the name and updated content of said at least one local memory location of said single computer written to prior to releasing said lock; releasing said lock on said object, asset, or resource
  • a single computer adapted to interoperate with a plurality of other external computers as a multiple computer system
  • said computer has a local processor and a local memory coupled to the local processor and said computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on said single computer and said plurality of computers, and wherein at least one memory location is replicated in the local memory of each said computer, each said computer including memory location updating means to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content; a method comprising: receiving a communication of updated memory location(s) and updated content(s) to send by a different one of said plurality of computers by said single computer over said communications network; and updating the local memory locations of said single computer in response to said received communication.
  • a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a plurality of computers to carry out any of the above methods.
  • Fig. IA is a schematic illustration of a prior art computer arranged to operate JAVA code and thereby constitute a single JAVA virtual machine
  • Fig. IB is a drawing similar to Fig. IA but illustrating the initial loading of code
  • Fig. 1C illustrates the interconnection of a multiplicity of computers each being a JAVA virtual machine to form a multiple computer system
  • Fig. 2 schematically illustrates "n" application running computers to which at least one additional server machine X is connected as a synchronizing lock server
  • Figs. 3 and 4 are flowcharts respectively illustrating the acquire lock and release lock procedures of a first embodiment
  • Figs. 5 and 6 are flowcharts illustrating the respective procedures of a second embodiment.
  • the code and data and virtual machine configuration or arrangement of Fig IA takes the form of the application code 50 written in the JAVA language and executing within the JAVA virtual machine 61.
  • the intended language of the application is the language JAVA
  • a JAVA virtual machine is used which is able to operate code in JAVA irrespective of the machine manufacturer and internal details of the computer or machine.
  • the JAVA Virtual Machine Specification 2 nd Edition by T. Lindholm and F. Yellin of Sun Microsystems Inc of the USA which is incorporated herein by reference.
  • Fig. IA This conventional art arrangement of Fig. IA is modified in accordance with embodiments of the present invention by the provision of an additional facility which is conveniently termed a “distributed run time” or a “distributed run time system” DRT 71 and as seen in Fig. IB.
  • the application code 50 is loaded onto the Java Virtual Machine(s) Ml, M2,...Mn in cooperation with the distributed runtime system 71, through the loading procedure indicated by arrow 75 or 75A or 75B.
  • distributed runtime and the “distributed run time system” are essentially synonymous, and by means of illustration but not limitation are generally understood to include library code and processes which support software written in a particular language running on a particular platform. Additionally, a distributed runtime system may also include library code and processes which support software written in a particular language running within a particular distributed computing environment.
  • a runtime system typically deals with the details of the interface between the program and the operating system such as system calls, program start-up and termination, and memory management.
  • a conventional Distributed Computing Environment (DCE) (that does not provide the capabilities of the inventive distributed run time or distributed run time system 71 used in the preferred embodiments of the present invention) is available from the Open Software Foundation.
  • This Distributed Computing Environment (DCE) performs a form of computer-to-computer communication for software running on the machines, but among its many limitations, it is not able to implement the desired modification or communication operations.
  • the preferred DRT 71 coordinates the particular communications between the plurality of machines Ml, M2,...Mn.
  • the preferred distributed runtime 71 comes into operation during the loading procedure indicated by arrow 75A or 75B of the JAVA application 50 on each JAVA virtual machine 72 or machines JVM#1, JVM#2,...JVM#n of Fig. 1C. It will be appreciated in light of the description provided herein that although many examples and descriptions are provided relative to the JAVA language and JAVA virtual machines so that the reader may get the benefit of specific examples, the invention is not restricted to either the JAVA language or JAVA virtual machines, or to any other language, virtual machine, machine or operating environment.
  • Fig. 1C shows in modified form the arrangement of the JAVA virtual machines, each as illustrated in Fig. IB.
  • the same application code 50 is loaded onto each machine Ml, M2...Mn.
  • the communications between each machine Ml, M2...Mn are as indicated by arrows 83, and although physically routed through the machine hardware, are advantageously controlled by the individual DRT's 71/1...71/n within each machine.
  • this may be conceptionalised as the DRT's 71/1, ...71/n communicating with each other via the network or other communications link 53 rather than the machines Ml, M2...Mn communicating directly themselves or with each other.
  • Contemplated and included are either this direct communication between machines Ml, M2...Mn or DRT's 71/1, 71/2...71/n or a combination of such communications.
  • the preferred DRT 71 provides communication that is transport, protocol, and link independent.
  • the one common application program or application code 50 and its executable version (with likely modification) is simultaneously or concurrently executing across the plurality of computers or machines Ml, M2...Mn.
  • the application program 50 is written to execute on a single machine or computer (or to operate on the multiple computer system of the abovementioned patent applications which emulate single computer operation).
  • the modified structure is to replicate an identical memory structure and contents on each of the individual machines.
  • common application program is to be understood to mean an application program or application program code written to operate on a single machine, and loaded and/or executed in whole or in part on each one of the plurality of computers or machines Ml, M2...Mn, or optionally on each one of some subset of the plurality of computers or machines Ml, M2...Mn.
  • application code 50 This is either a single copy or a plurality of identical copies each individually modified to generate a modified copy or version of the application program or program code. Each copy or instance is then prepared for execution on the corresponding machine. At the point after they are modified they are common in the sense that they perform similar operations and operate consistently and coherently with each other.
  • a plurality of computers, machines, information appliances, or the like implementing embodiments of the invention may optionally be connected to or coupled with other computers, machines, information appliances, or the like that do not implement embodiments of the invention.
  • the same application program 50 (such as for example a parallel merge sort, or a computational fluid dynamics application or a data mining application) is run on each machine, but the executable code of that application program is modified on each machine as necessary such that each executing instance (copy or replica) on each machine coordinates its local operations on that particular machine with the operations of the respective instances (or copies or replicas) on the other machines such that they function together in a consistent, coherent and coordinated manner and give the appearance of being one global instance of the application (i.e. a "meta- application").
  • the copies or replicas of the same or substantially the same application codes are each loaded onto a corresponding one of the interoperating and connected machines or computers.
  • the application code 50 may be modified before loading, or during the loading process, or with some disadvantages after the loading process, to provide a customization or modification of the application code on each machine.
  • Some dissimilarity between the programs or application codes on the different machines may be permitted so long as the other requirements for interoperability, consistency, and coherency as described herein can be maintained.
  • each of the machines Ml, M2...Mn and thus all of the machines Ml, M2...Mn have the same or substantially the same application code 50, usually with a modification that may be machine specific.
  • each application code 50 is modified by a corresponding modifier 51 according to the same rules (or substantially the same rules since minor optimizing changes are permitted within each modifier 51/1, 51/2...51/n).
  • Each of the machines Ml, M2...Mn operates with the same (or substantially the same or similar) modifier 51 (in some embodiments implemented as a distributed run time or DRT71 and in other embodiments implemented as an adjunct to the application code and data 50, and also able to be implemented within the JAVA virtual machine itself).
  • all of the machines Ml, M2...Mn have the same (or substantially the same or similar) modifier 51 for each modification required.
  • a different modification for example, may be required for memory management and replication, for initialization, for finalization, and/or for synchronization (though not all of these modification types may be required for all embodiments).
  • the modifier 51 may be implemented as a component of or within the distributed run time 71, and therefore the DRT 71 may implement the functions and operations of the modifier 51.
  • the function and operation of the modifier 51 may be implemented outside of the structure, software, firmware, or other means used to implement the DRT 71 such as within the code and data 50, or within the JAVA virtual machine itself.
  • both the modifier 51 and DRT 71 are implemented or written in a single piece of computer program code that provides the functions of the DRT and modifier. In this case the modifier function and structure is, in practice, subsumed into the DRT.
  • the modifier function and structure is responsible for modifying the executable code of the application code program
  • the distributed run time function and structure is responsible for implementing communications between and among the computers or machines.
  • the communications functionality in one embodiment is implemented via an intermediary protocol layer within the computer program code of the DRT on each machine.
  • the DRT can, for example, implement a communications stack in the JAVA language and use the Transmission Control Protocol/Internet Protocol (TCP/IP) to provide for communications or talking between the machines.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • a plurality of individual computers or machines Ml, M2...Mn are provided, each of which are interconnected via a communications network 53 or other communications link.
  • Each individual computer or machine is provided with a corresponding modifier 51.
  • Each individual computer is also provided with a communications port which connects to the communications network.
  • the communications network 53 or path can be any electronic signalling, data, or digital communications network or path and is preferably a slow speed, and thus low cost, communications path, such as a network connection over the Internet or any common networking configurations including ETHERNET or INFINIBAND and extensions and improvements, thereto.
  • the computers are provided with one or more known communications ports (such as CISCO Power Connect 5224 Switches) which connect with the communications network 53.
  • the size of the smallest memory of any of the machines may be used as the maximum memory capacity of the machines when such memory (or a portion thereof) is to be treated as 'common' memory (i.e. similar equivalent memory on each of the machines Ml ...Mn) or otherwise used to execute the common application code.
  • each machine Ml, M2...Mn has a private (i.e. 'non-common') internal memory capability.
  • the private internal memory capability of the machines Ml, M2, ..., Mn are normally approximately equal but need not be.
  • each machine or computer is preferably selected to have an identical internal memory capability, but this need not be so.
  • the independent local memory of each machine represents only that part of the machine's total memory which is allocated to that portion of the application program running on that machine. Thus, other memory will be occupied by the machine's operating system and other computational tasks unrelated to the application program 50.
  • Non-commercial operation of a prototype multiple computer system indicates that not every machine or computer in the system utilises or needs to refer to (e.g. have a local replica of) every possible memory location.
  • some or all of the plurality of individual computers or machines can be contained within a single housing or chassis (such as so-called “blade servers” manufactured by Hewlett-Packard Development Company, Intel Corporation, IBM Corporation and others) or the multiple processors (eg symmetric multiple processors or SMPs) or multiple core processors (eg dual core processors and chip multithreading processors) manufactured by Intel, AMD, or others, or implemented on a single printed circuit board or even within a single chip or chip set.
  • blade servers manufactured by Hewlett-Packard Development Company, Intel Corporation, IBM Corporation and others
  • the multiple processors eg symmetric multiple processors or SMPs
  • multiple core processors eg dual core processors and chip multithreading processors
  • computers or machines having multiple cores, multiple CPU's or other processing logic.
  • the generalized platform, and/or virtual machine and/or machine and/or runtime system is able to operate application code 50 in the language(s) (possibly including for example, but not limited to any one or more of source-code languages, intermediate-code languages, object-code languages, machine-code languages, and any other code languages) of that platform and/or virtual machine and/or machine and/or runtime system environment, and utilize the platform, and/or virtual machine and/or machine and/or runtime system and/or language architecture irrespective of the machine or processor manufacturer and the internal details of the machine.
  • the platform and/or runtime system can include virtual machine and non-virtual machine software and/or firmware architectures, as well as hardware and direct hardware coded applications and implementations.
  • computers and/or computing machines and/or information appliances or processing systems are still applicable.
  • computers and/or computing machines that do not utilize either classes and/or objects include for example, the x86 computer architecture manufactured by Intel Corporation and others, the SPARC computer architecture manufactured by Sun Microsystems, Inc and others, the Power PC computer architecture manufactured by International Business Machines Corporation and others, and the personal computer products made by Apple Computer, Inc., and others.
  • primitive data types such as integer data types, floating point data types, long data types, double data types, string data types, character data types and Boolean data types
  • structured data types such as arrays and records
  • derived types or other code or data structures of procedural languages or other languages and environments such as functions, pointers, components, modules, structures, reference and unions.
  • This analysis or scrutiny of the application code 50 can take place either prior to loading the application program code 50, or during the application program code 50 loading procedure, or even after the application program code 50 loading procedure (or some combination of these). It may be likened to an instrumentation, program transformation, translation, or compilation procedure in that the application code can be instrumented with additional instructions, and/or otherwise modified by meaning- preserving program manipulations, and/or optionally translated from an input code language to a different code language (such as for example from source-code language or intermediate-code language to object-code language or machine-code language).
  • compilation normally or conventionally involves a change in code or language, for example, from source code to object code or from one language to another language.
  • compilation and its grammatical equivalents
  • the term "compilation” is not so restricted and can also include or embrace modifications within the same code or language.
  • the compilation and its equivalents are understood to encompass both ordinary compilation (such as for example by way of illustration but not limitation, from source-code to object code), and compilation from source-code to source-code, as well as compilation from object-code to object code, and any altered combinations therein. It is also inclusive of so-called “intermediary-code languages” which are a form of "pseudo object-code”.
  • the analysis or scrutiny of the application code 50 takes place during the loading of the application program code such as by the operating system reading the application code 50 from the hard disk or other storage device, medium or source and copying it into memory and preparing to begin execution of the application program code.
  • the analysis or scrutiny may take place during the class loading procedure of the java.lang.ClassLoader.loadClass method (e.g. "java.lang.ClassLoader.loadClass()").
  • the analysis or scrutiny of the application code 50 may take place even after the application program code loading procedure, such as after the operating system has loaded the application code into memory, or optionally even after execution of the relevant corresponding portion of the application program code has started, such as for example after the JAVA virtual machine has loaded the application code into the virtual machine via the "java.lang.ClassLoader.loadClass()" method and optionally commenced execution.
  • One such technique is to make the modification(s) to the application code, without a preceding or consequential change of the language of the application code.
  • Another such technique is to convert the original code (for example, JAVA language source-code) into an intermediate representation (or intermediate-code language, or pseudo code), such as JAVA byte code. Once this conversion takes place the modification is made to the byte code and then the conversion may be reversed. This gives the desired result of modified JAVA code.
  • a further possible technique is to convert the application program to machine code, either directly from source-code or via the abovementioned intermediate language or through some other intermediate means. Then the machine code is modified before being loaded and executed.
  • a still further such technique is to convert the original code to an intermediate representation, which is thus modified and subsequently converted into machine code.
  • the present invention encompasses all such modification routes and also a combination of two, three or even more, of such routes.
  • the DRT 71 or other code modifying means is responsible for creating or replicating a memory structure and contents on each of the individual machines Ml, M2...Mn that permits the plurality of machines to interoperate.
  • this replicated memory structure will be identical. Whilst in other embodiments this memory structure will have portions that are identical and other portions that are not. In still other embodiments the memory structures are different only in format or storage conventions such as Big Endian or Little Endian formats or conventions.
  • the terminology “one”, “single”, and “common” application code or program includes the situation where all machines Ml, M2...Mn are operating or executing the same program or code and not different (and unrelated) programs, in other words copies or replicas of same or substantially the same application code are loaded onto each of the interoperating and connected machines or computers.
  • memory access from one machine's software to memory physically located on another machine typically takes place via the network interconnecting the machines.
  • the local memory of each machine is able to be accessed by any other machine and can therefore cannot be said to be independent.
  • Such local memory read and write processing operation can typically be satisfied within 10 2 - 10 3 cycles of the central processing unit. Thus, in practice there is substantially less waiting for memory accesses which involves and/or writes. Also, the local memory of each machine is not able to be accessed by any other machine and can therefore be said to be independent.
  • the invention is transport, network, and communications path independent, and does not depend on how the communication between machines or DRTs takes place. In one embodiment, even electronic mail (email) exchanges between machines or DRTs may suffice for the communications.
  • Fig. 2 it will be seen from Fig. 2 that there are a number of machines Ml, M2, .... Mn, "n" being an integer greater than or equal to two, on which the application program 50 of Fig. 1 is being run substantially simultaneously. These machines are allocated a number 1, 2, 3, ... etc. in a hierarchical order. This order is normally looped or closed so that whilst machines 2 and 3 are hierarchically adjacent, so too are machines "n" and 1.
  • a further machine X which is provided to enable various housekeeping functions to be carried out, such as acting as a lock server.
  • the further machine X can be a low value machine, and much less expensive than the other machines which can have desirable attributes such as processor speed.
  • an additional low value machine (X+ 1) is preferably available to provide redundancy in case machine X should fail.
  • server machines X and X+l are provided, they are preferably, for reasons of simplicity, operated as dual machines in a cluster configuration.
  • Machines X and X+l could be operated as a multiple computer system in accordance with the present invention, if desired. However this would result in generally undesirable complexity. If the machine X is not provided then its functions, such as housekeeping functions, are provided by one, or some, or all of the other machines.
  • Fig. 3 the operation of one of the machines Ml-Mn on acquiring a lock is illustrated.
  • the acquiring machine say M5 which is to acquire the lock looks up a global name for the object, asset or resource to be locked.
  • the object asset or resource is an object.
  • the global name of the object is looked up, bearing in mind that each of the machines Ml-Mn has a local object which corresponds to the same object in each machine, but which will have the same global name, but possibly a different local name depending upon the organisation of the local memory of each machine.
  • the global names and the corresponding local memory names or addresses are preferably stored in a table or similar data structure.
  • the table can be presented in each of the "n" machines or in server machine X only.
  • the data structure can take the form of a tag which accompanies each local memory location and which identifies or points to, or refers to the global name.
  • the global name can identify, point to, or refer to the local memory location, or object, asset, etc.
  • machine M5 then sends an "acquire lock" request to the machine X, which functions as the lock server. This is indicated in step 23. As indicated in step 24, machine M5 then awaits a reply from the lock server, which confirms the acquisition of the lock.
  • Fig. 3 can be modified slightly due to possible delays in transmission within the communications network 53. This can result in the confirmation of "acquisition of lock" of step 26 being received before the table of memory location/value pairs of step 25. In these circumstances normal code execution resumes after the receipt of the table of step 25.
  • the relinquishing machine, M5 preferably determines the global name of the object to be unlocked. This is indicated at step 32.
  • the relinquishing machine, M5 sends a "release lock" request to the lock server machine X and this is indicated at step 33.
  • the lock server machine X sends to the requesting machine, not only the lock authorization, but also propagates the previously generated table contents (ie memory location/value pairs) created whilst the lock was held by machine M5.
  • the machine M5 awaits a reply from a lock server, which confirms the release of the lock.
  • This step 35 like step 32, is a preferable one, but not essential and thus is indicated in broken lines in Fig. 4.
  • the machine M5 resumes normal code execution.
  • the abovementioned procedure for lock acquisition and release can be modified so as to reduce the volume of data contained within the table to be propagated from one machine to the other.
  • the abovementioned procedure suffers from the disadvantage that where a specific memory location is written to on many occasions, each of the successive values is stored within the table, but it is only the final value which is of interest to the next machine to receive the lock.
  • the above-mentioned procedure can be modified by noting only the names of the various locations, which had been written to, during the duration of the lock. Only at the relinquishing of the lock, is the current value of each memory location read and then inserted into the table or then used to form a new table.
  • the lock authorization and its accompanying table of memory locations/content pairs are preferably given top priority for transmission via the communications network 53.
  • the machine in the queue of waiting machines which receives the lock receives not only the lock authorization, but also the global names of the relevant written to memory locations, together with their up-to-date values or content.
  • step 42 is carried out so as to create a list of memory locations to be utilised by the application program.
  • step 43 a search of the program is conducted in order to detect synchronisation routines.
  • step 44 for each detected synchronisation routine, a search is made to detect any listed memory locations which are to be written to.
  • step 45 a table is created (either during the search or during execution of the application program) in which is recorded the identity and value (if all changes to each memory location are to be propagated) or just the identity of each memory location (if the final value of each memory location is to be propagated).
  • Fig. 6 the procedure of acquiring and relinquishing a lock, where the above-mentioned modification of the program has been carried out at loading, is illustrated.
  • the machine acquiring the (subsequent) lock also receives the propagated table of memory location/value pairs.
  • the machine acquiring the lock updates its local memory. The machine which has acquired the lock is thus in a position to begin execution of the application code with a local memory which is in the condition applying when the previous lock was released. This is indicated at step 53.
  • step 54 During the execution of the application code, as indicated by steps 54 and 55, if any write to memory is to take place, then the location and value of each memory location written to, is recorded in a table. This cycle repeats as necessary, also utilizing steps 56 and 57. After this has been carried out, as indicated at step 56, if there is no further code to be executed within the synchronization routine, then the lock is released as indicated at step 58. As indicated by step 59, at the release of the lock a table is propagated to the machine to next receive the lock in any queue of waiting machines, the table containing all recorded memory location/value pairs where any writing to memory occurred whilst the lock was held by the releasing machine.
  • the tabulation or recording of memory location/value pairs can be accomplished in various ways. In one form a single table is used for all purposes. In another form one table is used to record the newly written values and a record table is used to record the memory location/value pairs. This second table is transmitted when the lock is released.
  • the table in steps 52 and 55 and 59 can be same table or different tables can be used. Alternatively, the table of steps 52 and 59 can be the same table and the table of step 55 can be a different table.
  • Many tabulation formats will be apparent to those skilled in the computing arts. What is important is the nature and content of the tabulated or recorded data, not the tabulation format.
  • JAVA includes both the JAVA language and also JAVA platform and architecture.
  • the unmodified application code may either be replaced with the modified application code in whole, corresponding to the modifications being performed, or alternatively, the unmodified application code may be replaced in part or incrementally as the modifications are performed incrementally on the executing unmodified application code. Regardless of which such modification routes are used, the modifications subsequent to being performed execute in place of the unmodified application code. It is advantageous to use a global identifier is as a form of 'meta-name' or 'meta-identity' for all the similar equivalent local objects (or classes, or assets or resources or the like) on each one of the plurality of machines Ml, M2...Mn.
  • each machine may instead define or use a global name corresponding to the plurality of similar equivalent objects on each machine (e.g. "globalname7787"), and with the understanding that each machine relates the global name to a specific local name or object (e.g. "globalname7787” corresponds to object "Iocalobject456" on machine Ml, and "globalname7787” corresponds to object "Iocalobject885" on machine M2, and "globalname7787”corresponds to object "localobjectl 11" on machine M3, and so forth).
  • a global name corresponding to the plurality of similar equivalent objects on each machine e.g. "globalname7787”
  • each DRT 71 when initially recording or creating the list of all, or some subset of all objects (e.g. memory locations or fields), for each such recorded object on each machine Ml, M2...Mn there is a name or identity which is common or similar on each of the machines Ml, M2...Mn.
  • the local object corresponding to a given name or identity will or may vary over time since each machine may, and generally will, store memory values or contents at different memory locations according to its own internal processes.
  • each of the DRTs will have, in general, different local memory locations corresponding to a single memory name or identity, but each global "memory name" or identity will have the same "memory value or content" stored in the different local memory locations. So for each global name there will be a family of corresponding independent local memory locations with one family member in each of the computers. Although the local memory name may differ, the asset, object, location etc has essentially the same content or value. So the family is coherent.
  • tablette or “tabulation” as used herein is intended to embrace any list or organised data structure of whatever format and within which data can be stored and read out in an ordered fashion. It will also be apparent to those skilled in the art in light of the description provided herein that the abovementioned modification of the application program code 50 during loading can be accomplished in many ways or by a variety of means. These ways or means include, but are not limited to at least the following five ways and variations or combinations of these five, including by:
  • a particular machine say machine M2 loads the asset (such as class or object) inclusive of memory manipulation operation(s), modifies it, and then loads each of the other machines Ml, M3...Mn (either sequentially or simultaneously or according to any other order, routine or procedure) with the modified object (or class or other assert or resource) inclusive of the new modified memory manipulation operation.
  • asset such as class or object
  • M3...Mn either sequentially or simultaneously or according to any other order, routine or procedure
  • the modified object or class or other assert or resource
  • the memory manipulation operation(s) that is (are) loaded is executable intermediary code.
  • each of the slave (or secondary) machines Ml, M3...Mn loads the modified object (or class), and inclusive of the new modified memory manipulation operation(s), that was sent to it over the computer communications network or other communications link or path by the master (or primary) machine, such as machine M2, or some other machine as a machine X.
  • the computer communications network can be replaced by a shared storage device such as a shared file system, or a shared document/ file repository such as a shared database.
  • each machine Ml, M2...Mn receives the unmodified asset (such as class or object) inclusive of one or more memory manipulation operation(s), but modifies the operations and then loads the asset (such as class or object) consisting of the now modified operations.
  • one machine such as the master or primary machine may customize or perform a different modification to the memory manipulation operation(s) sent to each machine, this embodiment more readily enables the modification carried out by each machine to be slightly different. It can thereby be enhanced, customized, and/or optimized based upon its particular machine architecture, hardware processor, memory, configuration, operating system, or other factors yet still be similar, coherent and consistent with the other machines and with all other similar modifications.
  • the supply or the communication of the asset code (such as class code or object code) to the machines Ml, M2...Mn and optionally inclusive of a machine X can be branched, distributed or communication among and between the different machines in any combination or permutation; such as by providing direct machine to machine communication (for example, M2 supplies each of Ml, M3, M4 etc. directly), or by providing or using cascaded or sequential communication (for example, M2 supplies Ml which then supplies M3 which then supplies M4, and so on) or a combination of the direct and cascaded and/or sequential.
  • direct machine to machine communication for example, M2 supplies each of Ml, M3, M4 etc. directly
  • cascaded or sequential communication for example, M2 supplies Ml which then supplies M3 which then supplies M4, and so on
  • machine M2 loads the asset (such as class or object) inclusive of a cleanup routine in unmodified form on machine M2, and then (for example, M2 or each local machine) deletes the unmodified cleanup routine that had been present on the machine in whole or part from the asset (such as class or object) and loads by means of the computer communications network the modified code for the asset with the now modified or deleted cleanup routine on the other machines.
  • the modification is not a transformation, instrumentation, translation or compilation of the asset cleanup routine but a deletion of the cleanup routine on all machines except one.
  • the actual code-block of the finalization or cleanup routine is deleted on all machines except one, and this last machine therefore is the only machine that can execute the finalization routine because all other machines have deleted the finalization routine.
  • One benefit of this approach is that no conflict arises between multiple machines executing the same finalization routine because only one machine has the routine.
  • the process of deleting the cleanup routine in its entirety can either be performed by the "master” machine (such as for example machine M2 or some other machine such as machine X) or alternatively by each other machine Ml, M3...Mn upon receipt of the unmodified asset.
  • An additional variation of this "master/slave" or “primary/secondary” arrangement is to use a shared storage device such as a shared file system, or a shared document/file repository such as a shared database as means of exchanging the code for the asset, class or object between machines Ml, M2...Mn and optionally the server machine X.
  • a particular machine say for example machine Ml, loads the unmodified asset (such as class or object) inclusive of a finalization or cleanup routine and all the other machines M2, M3...Mn perform a modification to delete the cleanup routine of the asset (such as class or object) and load the modified version.
  • the machines Ml, M2...Mn may send some or all load requests to the additional server machine X , which performs the modification to the application program code 50 (including or consisting of assets, and/or classes, and/or objects) and inclusive of finalization or cleanup routine(s), via any of the abovementioned methods, and returns in the modified application program code inclusive of the now modified finalization or cleanup routine(s) to each of the machines Ml to Mn, and these machines in turn load the modified application program code inclusive of the modified routine(s) locally.
  • machines Ml to Mn forward all load requests to machine X, which returns a modified application program code inclusive of modified finalization or cleanup routine(s) to each machine.
  • the modifications performed by machine X can include any of the modifications described. This arrangement may of course be applied to some only of the machines whilst other arrangements described herein are applied to others of the machines.
  • the present invention is equally applicable to similar programming languages (including procedural, declarative and object orientated languages) to JAVA including Microsoft.NET platform and architecture (Visual Basic, Visual C/C ++ , and C#) FORTRAN, CVC 4+ , COBOL, BASIC etc.
  • object and class used herein are derived from the JAVA environment and are intended to embrace similar terms derived from different environments such as dynamically linked libraries (DLL), or object code packages, or function unit or memory locations.
  • DLL dynamically linked libraries
  • any one or each of these various means may be implemented by computer program code statements or instructions (possibly including by a plurality of computer program code statements or instructions) that execute within computer logic circuits, processors, ASICs, logic or electronic circuit hardware, microprocessors, microcontrollers or other logic to modify the operation of such logic or circuits to accomplish the recited operation or function.
  • any one or each of these various means may be implemented in firmware and in other embodiments such may be implemented in hardware.
  • any one or each of these various means may be implemented by a combination of computer program software, firmware, and/or hardware.
  • any and each of the abovedescribed methods, procedures, and/or routines may advantageously be implemented as a computer program and/or computer program product stored on any tangible media or existing in electronic, signal, or digital form.
  • Such computer program or computer program products comprising instructions separately and/or organized as modules, programs, subroutines, or in any other way for execution in processing logic such as in a processor or microprocessor of a computer, computing machine, or information appliance; the computer program or computer program products modifying the operation of the computer in which it executes or on a computer coupled with, connected to, or otherwise in signal communications with the computer on which the computer program or computer program product is present or executing.
  • Such a computer program or computer program product modifies the operation and architectural structure of the computer, computing machine, and/or information appliance to alter the technical operation of the computer and realize the technical effects described herein.
  • the invention may therefore include a computer program product comprising a set of program instructions stored in a storage medium or existing electronically in any form and operable to permit a plurality of computers to carry out any of the methods, procedures, routines, or the like as described herein including in any of the claims.
  • the invention includes (but is not limited to) a plurality of computers, or a single computer adapted to interact with a plurality of computers, interconnected via a communication network or other communications link or path and each operable to substantially simultaneously or concurrently execute the same or a different portion of an application code written to operate on only a single computer on a corresponding different one of computers.
  • the computers are programmed to carry out any of the methods, procedures, or routines described in the specification or set forth in any of the claims, on being loaded with a computer program product or upon subsequent instruction.
  • the invention also includes within its scope a single computer arranged to co-operate with like, or substantially similar, computers to form a multiple computer system
  • an improved method used in a multiple computer environment in which different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of a plurality of computers, each having a local memory and each being interconnected via a communications network, and in which at least one memory location is replicated in the memory of each the plurality of computers, and after each occasion at which each the memory location has its contents written to, or re-written, with a new content, all the corresponding memory locations of the computers are in due course updated via the communications network with the new content, the improved method comprising the steps of:
  • each the computer has an independent local memory accessible only by the corresponding portion of the application program.
  • the object, asset or resource locked is the object, asset or resource to which the new content is to be written.
  • the method includes the further step of:
  • step (v) transmitting in step (iv) all memory locations and contents updated in step (ii).
  • the method includes the further step of:
  • step (vi) transmitting in step (iv) all memory locations and only their final contents as updated in step (ii).
  • the method includes the further steps of:
  • the recording of the name of the listed memory locations takes place either at the time of detection or at the time of execution of an detected program step.
  • the method includes the further step of:
  • the method includes the further step of:
  • a computer system comprising a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of the plurality of computers, at least one memory location is replicated in the local memory of each the computer, the system further comprising updating means associated with each the computer to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content, and lock means associated with each the computer to acquire a lock on an object, asset or resource, the lock means including a recording means in which is recorded the name and updated content of all the local memory locations written to prior to releasing the lock, and the lock means after releasing the lock and prior to permitting the acquisition of the same lock by another one of the computers transmitting the updated memory location(s) and updated content(s) to the another one computer, whereby any the computer on acquiring the lock has acquired the previously updated contents without need
  • the object, asset or resource locked is the object asset or resource to which the new content is written.
  • the lock means comprises a lock server computer in addition to the plurality of computers, and also connected to the plurality of computers via the communications network.
  • the recording means comprises a look up table.
  • the look up table includes all contents updated for each recorded memory location.
  • the look up table includes only the final content of each updated content for each recorded memory location.
  • the contents of the look up table comprises the address of a memory location at which the updated content is stored.
  • a plurality of computers interconnected via a communications network and operable to ensure carrying out of the above method(s).
  • a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a plurality of computers to carry out the any of the above method(s).
  • a single computer intended to operate in a multiple computer system which comprises a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of the plurality of computers, and at least one memory location is replicated in the local memory of each the computer, the system further comprising updating means associated with each the computer to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content
  • the single computer comprising: a local memory having at least one memory location intended to be updated via a communications port connectable to the communications network, updating means to in due course update the memory locations of other substantially similar computers via the communications port; lock means associated with the local memory to acquire a lock on an object, asset or resource of the local memory, the lock means including a recording means in which is recorded the name and updated content of the local memory locations written to prior to releasing
  • the local memory is an independent local memory accessible only by the corresponding portion of the application program executing on the computer.
  • the object, asset or resource locked is the object, asset or resource to which the new content is written.
  • the lock means further includes a lock server computer connectable to the single computer via the communications network.
  • the recording means comprises a look up table.
  • the look up table includes all contents updated for each recorded memory location.
  • the look up table includes only the final content of each updated content for each recorded memory location.
  • the contents of the look up table comprises the address of a memory location at which the updated content is stored.
  • a single computer adapted to interoperate with a plurality of other external computers as a multiple computer system
  • the computer has a local processor and a local memory coupled to the local processor and the computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on the single computer and the plurality of computers, and wherein at least one memory location is replicated in the local memory of each the computer, each the computer including memory location updating means to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content; a method comprising: acquiring a lock on an object, asset, or resource of the local memory of the single computer prior to initially writing the new content; recording the name and updated content of the at least one local memory location of the single computer written to prior to releasing the lock; releasing the lock on the object, asset, or resource of the local memory of the single computer;
  • the method further comprises : permitting but not requiring the acquisition of a new lock on the same object, asset, or resource by another one of the computers; wherein any the another one of the plurality of computers on acquiring the new lock has acquired the previously updated memory location contents without needing to wait for the in due course updating of the updated contents of all the plurality of computers.
  • the method further comprises: updating the local memory locations of other of the plurality of computers via the communications network in due course.
  • the method further comprises: generating a memory update message that includes the updated memory locations(s) and updated content(s) that are to be updated in due course in other of the computers, prior to sending the communication and sending the generated memory update message with the communication.
  • Also provided is a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a computer to carry out the above method(s).
  • a single computer adapted to interoperate with a plurality of other external computers as a multiple computer system
  • the computer has a local processor and a local memory coupled to the local processor and the computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on the single computer and the plurality of computers, and wherein at least one memory location is replicated in the local memory of each the computer, each the computer including memory location updating means to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content; a method comprising: receiving a communication of updated memory location(s) and updated content(s) to send by a different one of the plurality of computers by the single computer over the communications network; and updating the local memory locations of the single computer in response to the received communication.
  • the communication received includes a memory update message that includes the updated memory locations(s) and
  • a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a computer to carry out the last mentioned method.
  • Convience class for representing attribute_info structures within ClassFiles import java.lang. *; import java.io.*;
  • This class represents an unknown attribute_info that
  • ByteArrayOutputStream baos new ByteArrayOutputStream( ) ; super. serialize (out) ; out. write (info, 0, attribute_length) ; ⁇ ⁇
  • Convience class for representing ClassFile structures import java.lang. *; import java.io.*; import java.util.*;
  • ClassFile follows verbatim from the JVM specification.
  • */ public final class ClassFile ⁇ public int magic; public int minor_version; public int major_version; public int constant_pool_count; public cp_info[] constant_pool; public int access_flags; public int this_class; public int super_class; public int interfaces_count; public int[] interfaces; public int fields_count; public field_info [ ] fields; public int methods_count; public method_info [ ] methods; public int attributes_count; public attribute_info[] attributes;
  • Convience class for representing Code_attribute structures within ClassFiles import java.util.*; import java.lang.*; import java.io.*;
  • code[] is stored as a 2D array.
  • code_attribute extends attribute_info ⁇ public int max_stack; public int max_locals; public int code_length; public byte[][] code; public int exception_table_length; public exception_table [ ] exception_table; public int attributes_count; public attribute_info [ ] attributes;
  • Convience class for representing CONSTANT_Class_info structures within ClassFiles import java.lang.*; import java.io.*;
  • Convience class for representing CONSTANT_Double_info structures within ClassFiles import java.lang.*; import java.io.*;
  • Convience class for representing CONSTANT_Float_info structures within ClassFiles import Java. lang. *; import j ava . io . * ;
  • Convience class for representing CONST ANT_Integer_info structures within ClassFiles import java.lang.*; import java.io.*;
  • CONSTANT_InterfaceMethodref_info extends cp_info ⁇ /** The index to the class that this field is referencing to. */ public int class_index;
  • Convience class for representing CONST ANT_Long_info structures within ClassFiles import java.lang.*; import java.io.*;
  • Convience class for representing CONST ANT_NameAndType_info structures within ClassFiles import j ava . io . *; import j ava . lang. * ; /** NameAndType subtype of a constant pool entry.
  • Convience class for representing CONSTANT_String_info structures within ClassFiles import java.lang.*; import java.io.*;
  • Convience class for representing CONSTANT_Utf8_info structures within ClassFiles import java.io.*; import java. lang. *;
  • Convience class for representing ConstantValue_attribute structures within ClassFiles import Java. lang. *; import java.io.*;
  • Convience class for representing cp_info structures within ClassFiles import Java. lang.*; import java.io.*;
  • Convience class for representing Deprecated_attribute structures within ClassFiles import Java. lang.*; import j ava . io . * ;
  • Convience class for representing field_info structures within ClassFiles import java.lang.*; import java.io.*;
  • Convience class for representing InnerClasses_attribute structures within ClassFiles import java.lang.*; import java.io.*;
  • variable length structure that contains information about an
  • Convience class for representing method_info structures within ClassFiles import Java. lang. *; import java.io.*;
  • Convience class for representing SourceFile_attribute structures within ClassFiles import java.lang.*; import java.io.*;
  • a SourceFile attribute is an optional fixed_length attribute in
  • Convience class for representing Synthetic_attribute structures within ClassFiles import Java. lang. *; import java . io . * ;
  • * attribute can appear in the classfile, method_info or field_info.
  • Example method using synchronization This method serves to illustrate the use of synchronization to implement thread-safe modification of a shared memory location by potentially multiple threads. */ public void run ( ) ⁇
  • Hashtable hashCodeToGlobalID new Hashtable
  • int globalID ((Integer) hashCodeToGlobalID. get (o) ) .intValue ();
  • DataOutputStream(socket.getOutputStream() ) ;
  • DatalnputStream in new DatalnputStream(socket . getInputStream( ));
  • fields LockLoader.loadClass (name) .getDeclaredFields () ;
  • int globalID ((Integer) hashCodeToGlobalID. get (o) ). intValue ();
  • LockTable table LockTable . getCurrentLockTable () ;
  • int globalID ( (Integer) objectToGloballD. get ( reference) ) . intValue ( ) ;
  • This excerpt is the source code of the lock server which implements the lock mechanism on the server computer.
  • the lock server communicates with the lock client code of each application program running machine. import java.lang.*; import java.util.*; import java.net.*; import java.io.*;
  • ServerSocket serverSocket new ServerSocket (serverPort) ;
  • Socket socket serverSocket. accept (); // Create a new instance of LockServer to manage this lock
  • LockServer lock (LockServer) locks .get (new Integer (globallD) ) ;
  • LockServer lock (LockServer) locks . get (new Integer (globallD) ) ;
  • This excerpt is the source-code of LockLoader, which modifies an application as it is being loaded.
  • CONSTANT_Fieldref_info fi (CONSTANT_Fieldref_info) cf . constant_pool [
  • CONSTANT_Class_info ci (CONSTANT_Class_info) cf . constant_pool [ fi . class_index] ;
  • String className cf . constant_pool [ci . name_index] . toString O ; if (!name. equals (className) ) ⁇ throw new AssertionError ("This code only supports” + " fields local to this class");
  • CONSTANT_NameAndType_info ni (CONSTANT_NameAndType_info) cf. constant_j?ool [fi.name_and_type_index] ;
  • ca.code[z+3] new byte [3];
  • ca.code[z+3] [0] (byte) 184;
  • ca.code[z+3] [1] (byte) ((alertindex » 8) & Oxf£) ;
  • ca.code[z+3] [2] (byte) (alertindex & Oxff) ;
  • This excerpt is the source-code of LockTable, which implements the tables for recording writes made during the ownership of a lock.
  • HashMap entries new HashMap ( ) ;
  • HashMap tables new HashMap ();

Abstract

A multiple computer environment is disclosed in which an application program executes simultaneously on a plurality of computers (Ml, M2, ....Mn) interconnected by a communications network (53) and in which the local memory of each computer is maintained substantially the same by updating in due course. A lock mechanism is provided to permit exclusive access to an asset, object, or structure (ie memory location) by acquisition and release of the lock. In particular, before a new lock can be acquired by any other computer on a memory location previously locked by one computer, any re- written content(s) for the previously locked memory location are transmitted to all the other computers and their corresponding memory locations (before the in due course updating). Thus when the new lock is acquired all the corresponding memory locations of all computers have been updated.

Description

MODIFIED MACHINE ARCHITECTURE WITH ADVANCED SYNCHRONIZATION
FIELD OF THE INVENTION
The present invention relates to computing and, in particular, to the simultaneous operation of a plurality of computers interconnected via a communications network.
BACKGROUND ART
International Patent Application No. PCT/AU2005/000580 (Attorney Ref 5027F-WO) published under WO 2005/103926 (to which US Patent Application No. 11/111,946 and published under No. 2005-0262313 corresponds) in the name of the present applicant, discloses how different portions of an application program written to execute on only a single computer can be operated substantially simultaneously on a corresponding different one of a plurality of computers. That simultaneous operation has not been commercially used as of the priority date of the present application. International Patent Application Nos. PCT/AU2005/001641 (Attorney Ref 5027F-D1-WO) to which US Patent Application No. 11/259885 entitled: "Computer Architecture Method of Operation for Multi -Computer Distributed Processing and Co-ordinated Memory and Asset Handling" corresponds and PCT/AU2006/000532 (Attorney Ref: 5027F-D2-WO) in the name of the present applicant and unpublished as at the priority date of the present application, also disclose further details. The contents of the specification of each of the abovementioned prior application(s) are hereby incorporated into the present specification by cross reference for all purposes.
Briefly stated, the abovementioned patent specifications disclose that at least one application program written to be operated on only a single computer can be simultaneously operated on a number of computers each with independent local memory. The memory locations required for the operation of that program are replicated in the independent local memory of each computer. On each occasion on which the application program writes new data to any replicated memory location, that new data is transmitted and stored at each corresponding memory location of each computer. Thus apart from the possibility of transmission delays, each computer has a local memory the contents of which are substantially identical to the local memory of each other computer and are updated to remain so. Since all application programs, in general, read data much more frequently than they cause new data to be written, the abovementioned arrangement enables very substantial advantages in computing speed to be achieved. In particular, the stratagem enables two or more commodity computers interconnected by a commodity communications network to be operated simultaneously running under the application program written to be executed on only a single computer.
In many situations, the above-mentioned arrangements work satisfactorily. This applies particularly where the programmer is aware that there may be updating delays and so can adjust the flow of the program to account for this. However, there are situations in which the use of stale contents or values instead of the latest content can create problems.
The genesis of the present invention is a desire to at least partially overcome the abovementioned difficulty.
SUMMARY OF THE INVENTION
In accordance with a first aspect of the present invention there is disclosed in a multiple computer environment in which different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of a plurality of computers, each having a local memory and each being interconnected via a communications network, and in which at least one memory location is replicated in the memory of each said plurality of computers, and after each occasion at which each said memory location has its contents written to, or re-written, with a new content, all said corresponding memory locations of said computers are in due course updated via said communications network with said new content, the further improvement comprising the steps of:
(i) prior to initially writing said new content, acquiring a lock on an object, asset or resource,
(ii) recording the name and updated content of said local memory locations written to prior to releasing said lock,
(iii) releasing said lock, and
(iv) prior to permitting the acquisition of the same lock by another one of said computers, transmitting said updated memory location(s) and updated content(s) to said another one computer, whereby any said computer on acquiring said lock has acquired said previously updated contents without needing to wait for said in due course updating of all said computers.
In accordance with a second aspect of the present invention there is disclosed a computer system comprising a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of said plurality of computers, at least one memory location is replicated in the local memory of each said computer, said system further comprising updating means associated with each said computer to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content, and lock means associated with each said computer to acquire a lock on an object, asset or resource, said lock means including a recording means in which is recorded the name and updated content of all said local memory locations written to prior to releasing said lock, and said lock means after releasing said lock and prior to permitting the acquisition of the same lock by another one of said computers transmitting said updated memory location(s) and updated content(s) to said another one computer, whereby any said computer on acquiring said lock has acquired said previously updated contents without needing to wait for said in due course updating of all said computers.
In accordance with a third aspect of the present invention there is disclosed a single computer intended to operate in a multiple computer system which comprises a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of said plurality of computers, and at least one memory location is replicated in the local memory of each said computer, said system further comprising updating means associated with each said computer to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content, said single computer comprising: a local memory having at least one memory location intended to be updated via a communications port connectable to said communications network, updating means to in due course update the memory locations of other substantially similar computers via said communications port; lock means associated with said local memory to acquire a lock on an object, asset or resource of said local memory, said lock means including a recording means in which is recorded the name and updated content of said local memory locations written to prior to releasing said lock, and said lock means after releasing said lock and prior to permitting the acquisition of the same lock by another one of said computers, transferring said updated memory location(s) and updated content(s) to said communications port for transmittal to said another one computer whereby any said another one computer on acquiring said lock has acquired said previously updated contents without needing to wait for said in due course updating of all said computers.
In accordance with a fourth aspect of the present invention there is disclosed in a single computer, adapted to interoperate with a plurality of other external computers as a multiple computer system wherein said computer has a local processor and a local memory coupled to the local processor and said computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on said single computer and said plurality of computers, and wherein at least one memory location is replicated in the local memory of each said computer, each said computer including memory location updating means to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content; a method comprising: acquiring a lock on an object, asset, or resource of said local memory of said single computer prior to initially writing said new content; recording the name and updated content of said at least one local memory location of said single computer written to prior to releasing said lock; releasing said lock on said object, asset, or resource of said local memory of said single computer; and sending a communication of said updated memory location(s) and updated content(s) to other of said plurality of computers by said single computer over said communications network.
In accordance with a fifth aspect of the present invention there is disclosed in a single computer, adapted to interoperate with a plurality of other external computers as a multiple computer system wherein said computer has a local processor and a local memory coupled to the local processor and said computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on said single computer and said plurality of computers, and wherein at least one memory location is replicated in the local memory of each said computer, each said computer including memory location updating means to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content; a method comprising: receiving a communication of updated memory location(s) and updated content(s) to send by a different one of said plurality of computers by said single computer over said communications network; and updating the local memory locations of said single computer in response to said received communication.
In accordance with a sixth aspect of the present invention there is disclosed a plurality of computers interconnected via a communications network and operable to ensure carrying out any of the above methods.
In accordance with a seventh aspect of the present invention there is disclosed a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a plurality of computers to carry out any of the above methods.
Brief Description of the Drawings A preferred embodiment of the present invention will now be described with reference to the drawings in which:
Fig. IA is a schematic illustration of a prior art computer arranged to operate JAVA code and thereby constitute a single JAVA virtual machine,
Fig. IB is a drawing similar to Fig. IA but illustrating the initial loading of code,
Fig. 1C illustrates the interconnection of a multiplicity of computers each being a JAVA virtual machine to form a multiple computer system,
Fig. 2 schematically illustrates "n" application running computers to which at least one additional server machine X is connected as a synchronizing lock server,
Figs. 3 and 4 are flowcharts respectively illustrating the acquire lock and release lock procedures of a first embodiment, and
Figs. 5 and 6 are flowcharts illustrating the respective procedures of a second embodiment.
Detailed Description
The embodiments will be described with reference to the JAVA language, however, it will be apparent to those skilled in the art that the invention is not limited to this language and, in particular can be used with other languages (including procedural, declarative and object oriented languages) including the MICROSOFT.NET platform and architecture (Visual Basic, Visual C, and Visual C++, and Visual C#), FORTRAN, C, C++, COBOL, BASIC and the like.
It is known in the prior art to provide a single computer or machine (produced by any one of various manufacturers and having an operating system (or equivalent control software or other mechanism) operating in any one of various different languages) utilizing the particular language of the application by creating a virtual machine as illustrated in Fig. IA.
The code and data and virtual machine configuration or arrangement of Fig IA takes the form of the application code 50 written in the JAVA language and executing within the JAVA virtual machine 61. Thus where the intended language of the application is the language JAVA, a JAVA virtual machine is used which is able to operate code in JAVA irrespective of the machine manufacturer and internal details of the computer or machine. For further details, see "The JAVA Virtual Machine Specification" 2nd Edition by T. Lindholm and F. Yellin of Sun Microsystems Inc of the USA which is incorporated herein by reference.
This conventional art arrangement of Fig. IA is modified in accordance with embodiments of the present invention by the provision of an additional facility which is conveniently termed a "distributed run time" or a "distributed run time system" DRT 71 and as seen in Fig. IB.
In Figs. IB and 1C, the application code 50 is loaded onto the Java Virtual Machine(s) Ml, M2,...Mn in cooperation with the distributed runtime system 71, through the loading procedure indicated by arrow 75 or 75A or 75B. As used herein the terms "distributed runtime" and the "distributed run time system" are essentially synonymous, and by means of illustration but not limitation are generally understood to include library code and processes which support software written in a particular language running on a particular platform. Additionally, a distributed runtime system may also include library code and processes which support software written in a particular language running within a particular distributed computing environment. A runtime system (whether a distributed runtime system or not) typically deals with the details of the interface between the program and the operating system such as system calls, program start-up and termination, and memory management. For purposes of background, a conventional Distributed Computing Environment (DCE) (that does not provide the capabilities of the inventive distributed run time or distributed run time system 71 used in the preferred embodiments of the present invention) is available from the Open Software Foundation. This Distributed Computing Environment (DCE) performs a form of computer-to-computer communication for software running on the machines, but among its many limitations, it is not able to implement the desired modification or communication operations. Among its functions and operations the preferred DRT 71 coordinates the particular communications between the plurality of machines Ml, M2,...Mn. Moreover, the preferred distributed runtime 71 comes into operation during the loading procedure indicated by arrow 75A or 75B of the JAVA application 50 on each JAVA virtual machine 72 or machines JVM#1, JVM#2,...JVM#n of Fig. 1C. It will be appreciated in light of the description provided herein that although many examples and descriptions are provided relative to the JAVA language and JAVA virtual machines so that the reader may get the benefit of specific examples, the invention is not restricted to either the JAVA language or JAVA virtual machines, or to any other language, virtual machine, machine or operating environment.
Fig. 1C shows in modified form the arrangement of the JAVA virtual machines, each as illustrated in Fig. IB. It will be apparent that again the same application code 50 is loaded onto each machine Ml, M2...Mn. However, the communications between each machine Ml, M2...Mn are as indicated by arrows 83, and although physically routed through the machine hardware, are advantageously controlled by the individual DRT's 71/1...71/n within each machine. Thus, in practice this may be conceptionalised as the DRT's 71/1, ...71/n communicating with each other via the network or other communications link 53 rather than the machines Ml, M2...Mn communicating directly themselves or with each other. Contemplated and included are either this direct communication between machines Ml, M2...Mn or DRT's 71/1, 71/2...71/n or a combination of such communications. The preferred DRT 71 provides communication that is transport, protocol, and link independent.
The one common application program or application code 50 and its executable version (with likely modification) is simultaneously or concurrently executing across the plurality of computers or machines Ml, M2...Mn. The application program 50 is written to execute on a single machine or computer (or to operate on the multiple computer system of the abovementioned patent applications which emulate single computer operation). Essentially the modified structure is to replicate an identical memory structure and contents on each of the individual machines.
The term "common application program" is to be understood to mean an application program or application program code written to operate on a single machine, and loaded and/or executed in whole or in part on each one of the plurality of computers or machines Ml, M2...Mn, or optionally on each one of some subset of the plurality of computers or machines Ml, M2...Mn. Put somewhat differently, there is a common application program represented in application code 50. This is either a single copy or a plurality of identical copies each individually modified to generate a modified copy or version of the application program or program code. Each copy or instance is then prepared for execution on the corresponding machine. At the point after they are modified they are common in the sense that they perform similar operations and operate consistently and coherently with each other. It will be appreciated that a plurality of computers, machines, information appliances, or the like implementing embodiments of the invention may optionally be connected to or coupled with other computers, machines, information appliances, or the like that do not implement embodiments of the invention.
The same application program 50 (such as for example a parallel merge sort, or a computational fluid dynamics application or a data mining application) is run on each machine, but the executable code of that application program is modified on each machine as necessary such that each executing instance (copy or replica) on each machine coordinates its local operations on that particular machine with the operations of the respective instances (or copies or replicas) on the other machines such that they function together in a consistent, coherent and coordinated manner and give the appearance of being one global instance of the application (i.e. a "meta- application").
The copies or replicas of the same or substantially the same application codes, are each loaded onto a corresponding one of the interoperating and connected machines or computers. As the characteristics of each machine or computer may differ, the application code 50 may be modified before loading, or during the loading process, or with some disadvantages after the loading process, to provide a customization or modification of the application code on each machine. Some dissimilarity between the programs or application codes on the different machines may be permitted so long as the other requirements for interoperability, consistency, and coherency as described herein can be maintained. As it will become apparent hereafter, each of the machines Ml, M2...Mn and thus all of the machines Ml, M2...Mn have the same or substantially the same application code 50, usually with a modification that may be machine specific.
Before the loading of, or during the loading of, or at any time preceding the execution of, the application code 50 (or the relevant portion thereof) on each machine Ml, M2...Mn, each application code 50 is modified by a corresponding modifier 51 according to the same rules (or substantially the same rules since minor optimizing changes are permitted within each modifier 51/1, 51/2...51/n).
Each of the machines Ml, M2...Mn operates with the same (or substantially the same or similar) modifier 51 (in some embodiments implemented as a distributed run time or DRT71 and in other embodiments implemented as an adjunct to the application code and data 50, and also able to be implemented within the JAVA virtual machine itself). Thus all of the machines Ml, M2...Mn have the same (or substantially the same or similar) modifier 51 for each modification required. A different modification, for example, may be required for memory management and replication, for initialization, for finalization, and/or for synchronization (though not all of these modification types may be required for all embodiments).
There are alternative implementations of the modifier 51 and the distributed run time 71. For example, as indicated by broken lines in Fig. 1C, the modifier 51 may be implemented as a component of or within the distributed run time 71, and therefore the DRT 71 may implement the functions and operations of the modifier 51. Alternatively, the function and operation of the modifier 51 may be implemented outside of the structure, software, firmware, or other means used to implement the DRT 71 such as within the code and data 50, or within the JAVA virtual machine itself. In one embodiment, both the modifier 51 and DRT 71 are implemented or written in a single piece of computer program code that provides the functions of the DRT and modifier. In this case the modifier function and structure is, in practice, subsumed into the DRT. Independent of how it is implemented, the modifier function and structure is responsible for modifying the executable code of the application code program, and the distributed run time function and structure is responsible for implementing communications between and among the computers or machines. The communications functionality in one embodiment is implemented via an intermediary protocol layer within the computer program code of the DRT on each machine. The DRT can, for example, implement a communications stack in the JAVA language and use the Transmission Control Protocol/Internet Protocol (TCP/IP) to provide for communications or talking between the machines. These functions or operations may be implemented in a variety of ways, and it will be appreciated in light of the description provided herein that exactly how these functions or operations are implemented or divided between structural and/or procedural elements, or between computer program code or data structures, is not important or crucial to the invention.
However, in the arrangement illustrated in Fig. 1C, a plurality of individual computers or machines Ml, M2...Mn are provided, each of which are interconnected via a communications network 53 or other communications link. Each individual computer or machine is provided with a corresponding modifier 51. Each individual computer is also provided with a communications port which connects to the communications network. The communications network 53 or path can be any electronic signalling, data, or digital communications network or path and is preferably a slow speed, and thus low cost, communications path, such as a network connection over the Internet or any common networking configurations including ETHERNET or INFINIBAND and extensions and improvements, thereto. Preferably, the computers are provided with one or more known communications ports (such as CISCO Power Connect 5224 Switches) which connect with the communications network 53.
As a consequence of the above described arrangement, if each of the machines Ml, M2, ..., Mn has, say, an internal or local memory capability of 10MB, then the total memory available to the application code 50 in its entirety is not, as one might expect, the number of machines (n) times 10MB. Nor is it the additive combination of the internal memory capability of all n machines. Instead it is either 10MB, or some number greater than 10MB but less than n x 10MB. In the situation where the internal memory capacities of the machines are different, which is permissible, then in the case where the internal memory in one machine is smaller than the internal memory capability of at least one other of the machines, then the size of the smallest memory of any of the machines may be used as the maximum memory capacity of the machines when such memory (or a portion thereof) is to be treated as 'common' memory (i.e. similar equivalent memory on each of the machines Ml ...Mn) or otherwise used to execute the common application code.
However, even though the manner that the internal memory of each machine is treated may initially appear to be a possible constraint on performance, how this results in improved operation and performance will become apparent hereafter. Naturally, each machine Ml, M2...Mn has a private (i.e. 'non-common') internal memory capability. The private internal memory capability of the machines Ml, M2, ..., Mn are normally approximately equal but need not be. For example, when a multiple computer system is implemented or organized using existing computers, machines, or information appliances, owned or operated by different entities, the internal memory capabilities may be quite different. On the other hand, if a new multiple computer system is being implemented, each machine or computer is preferably selected to have an identical internal memory capability, but this need not be so.
It is to be understood that the independent local memory of each machine represents only that part of the machine's total memory which is allocated to that portion of the application program running on that machine. Thus, other memory will be occupied by the machine's operating system and other computational tasks unrelated to the application program 50.
Non-commercial operation of a prototype multiple computer system indicates that not every machine or computer in the system utilises or needs to refer to (e.g. have a local replica of) every possible memory location. As a consequence, it is possible to operate a multiple computer system without the local memory of each machine being identical to every other machine, so long as the local memory of each machine is sufficient for the operation of that machine. That is to say, provided a particular machine does not need to refer to (for example have a local replica of) some specific memory locations, then it does not matter that those specific memory locations are not replicated in that particular machine.
It may also be advantageous to select the amounts of internal memory in each machine to achieve a desired performance level in each machine and across a constellation or network of connected or coupled plurality of machines, computers, or information appliances Ml, M2, ..., Mn. Having described these internal and common memory considerations, it will be apparent in light of the description provided herein that the amount of memory that can be common between machines is not a limitation. In some embodiments, some or all of the plurality of individual computers or machines can be contained within a single housing or chassis (such as so-called "blade servers" manufactured by Hewlett-Packard Development Company, Intel Corporation, IBM Corporation and others) or the multiple processors (eg symmetric multiple processors or SMPs) or multiple core processors (eg dual core processors and chip multithreading processors) manufactured by Intel, AMD, or others, or implemented on a single printed circuit board or even within a single chip or chip set. Similarly, also included are computers or machines having multiple cores, multiple CPU's or other processing logic.
When implemented in a non-JAVA language or application code environment, the generalized platform, and/or virtual machine and/or machine and/or runtime system is able to operate application code 50 in the language(s) (possibly including for example, but not limited to any one or more of source-code languages, intermediate-code languages, object-code languages, machine-code languages, and any other code languages) of that platform and/or virtual machine and/or machine and/or runtime system environment, and utilize the platform, and/or virtual machine and/or machine and/or runtime system and/or language architecture irrespective of the machine or processor manufacturer and the internal details of the machine. It will also be appreciated that the platform and/or runtime system can include virtual machine and non-virtual machine software and/or firmware architectures, as well as hardware and direct hardware coded applications and implementations.
For a more general set of virtual machine or abstract machine environments, and for current and future computers and/or computing machines and/or information appliances or processing systems, and that may not utilize or require utilization of either classes and/or objects, the inventive structure, method and computer program and computer program product are still applicable. Examples of computers and/or computing machines that do not utilize either classes and/or objects include for example, the x86 computer architecture manufactured by Intel Corporation and others, the SPARC computer architecture manufactured by Sun Microsystems, Inc and others, the Power PC computer architecture manufactured by International Business Machines Corporation and others, and the personal computer products made by Apple Computer, Inc., and others.
For these types of computers, computing machines, information appliances, and the virtual machine or virtual computing environments implemented thereon that do not utilize the idea of classes or objects, may be generalized for example to include primitive data types (such as integer data types, floating point data types, long data types, double data types, string data types, character data types and Boolean data types), structured data types (such as arrays and records), derived types, or other code or data structures of procedural languages or other languages and environments such as functions, pointers, components, modules, structures, reference and unions. These structures and procedures when applied in combination when required, maintain a computing environment where memory locations, address ranges, objects, classes, assets, resources, or any other procedural or structural aspect of a computer or computing environment are where required created, maintained, operated, and deactivated or deleted in a coordinated, coherent, and consistent manner across the plurality of individual machines Ml, M2...Mn.
This analysis or scrutiny of the application code 50 can take place either prior to loading the application program code 50, or during the application program code 50 loading procedure, or even after the application program code 50 loading procedure (or some combination of these). It may be likened to an instrumentation, program transformation, translation, or compilation procedure in that the application code can be instrumented with additional instructions, and/or otherwise modified by meaning- preserving program manipulations, and/or optionally translated from an input code language to a different code language (such as for example from source-code language or intermediate-code language to object-code language or machine-code language). In this connection it is understood that the term compilation normally or conventionally involves a change in code or language, for example, from source code to object code or from one language to another language. However, in the present instance the term "compilation" (and its grammatical equivalents) is not so restricted and can also include or embrace modifications within the same code or language. For example, the compilation and its equivalents are understood to encompass both ordinary compilation (such as for example by way of illustration but not limitation, from source-code to object code), and compilation from source-code to source-code, as well as compilation from object-code to object code, and any altered combinations therein. It is also inclusive of so-called "intermediary-code languages" which are a form of "pseudo object-code".
By way of illustration and not limitation, in one embodiment, the analysis or scrutiny of the application code 50 takes place during the loading of the application program code such as by the operating system reading the application code 50 from the hard disk or other storage device, medium or source and copying it into memory and preparing to begin execution of the application program code. In another embodiment, in a JAVA virtual machine, the analysis or scrutiny may take place during the class loading procedure of the java.lang.ClassLoader.loadClass method (e.g. "java.lang.ClassLoader.loadClass()").
Alternatively, or additionally, the analysis or scrutiny of the application code 50 (or of a portion of the application code) may take place even after the application program code loading procedure, such as after the operating system has loaded the application code into memory, or optionally even after execution of the relevant corresponding portion of the application program code has started, such as for example after the JAVA virtual machine has loaded the application code into the virtual machine via the "java.lang.ClassLoader.loadClass()" method and optionally commenced execution.
Persons skilled in the computing arts will be aware of various possible techniques that may be used in the modification of computer code, including but not limited to instrumentation, program transformation, translation, or compilation means and/or methods.
One such technique is to make the modification(s) to the application code, without a preceding or consequential change of the language of the application code. Another such technique is to convert the original code (for example, JAVA language source-code) into an intermediate representation (or intermediate-code language, or pseudo code), such as JAVA byte code. Once this conversion takes place the modification is made to the byte code and then the conversion may be reversed. This gives the desired result of modified JAVA code.
A further possible technique is to convert the application program to machine code, either directly from source-code or via the abovementioned intermediate language or through some other intermediate means. Then the machine code is modified before being loaded and executed. A still further such technique is to convert the original code to an intermediate representation, which is thus modified and subsequently converted into machine code.
The present invention encompasses all such modification routes and also a combination of two, three or even more, of such routes.
The DRT 71 or other code modifying means is responsible for creating or replicating a memory structure and contents on each of the individual machines Ml, M2...Mn that permits the plurality of machines to interoperate. In some embodiments this replicated memory structure will be identical. Whilst in other embodiments this memory structure will have portions that are identical and other portions that are not. In still other embodiments the memory structures are different only in format or storage conventions such as Big Endian or Little Endian formats or conventions.
These structures and procedures when applied in combination when required, maintain a computing environment where the memory locations, address ranges, objects, classes, assets, resources, or any other procedural or structural aspect of a computer or computing environment are where required created, maintained, operated, and deactivated or deleted in a coordinated, coherent, and consistent manner across the plurality of individual machines Ml, M2...Mn.
Therefore the terminology "one", "single", and "common" application code or program includes the situation where all machines Ml, M2...Mn are operating or executing the same program or code and not different (and unrelated) programs, in other words copies or replicas of same or substantially the same application code are loaded onto each of the interoperating and connected machines or computers. In conventional arrangements utilising distributed software, memory access from one machine's software to memory physically located on another machine typically takes place via the network interconnecting the machines. Thus, the local memory of each machine is able to be accessed by any other machine and can therefore cannot be said to be independent. However, because the read and/or write memory access to memory physically located on another computer require the use of the slow network interconnecting the computers, in these configurations such memory accesses can result in substantial delays in memory read/write processing operations, potentially of the order of 106 - 107 cycles of the central processing unit of the machine (given contemporary processor speeds). Ultimately this delay is dependent upon numerous factors, such as for example, the speed, bandwidth, and/or latency of the communication network. This in large part accounts for the diminished performance of the multiple interconnected machines in the prior art arrangement.
However, in the present arrangement all reading of memory locations or data is satisfied locally because a current value of all (or some subset of all) memory locations is stored on the machine carrying out the processing which generates the demand to read memory.
Similarly, all writing of memory locations or data is satisfied locally because a current value of all (or some subset of all) memory locations is stored on the machine carrying out the processing which generates the demand to write to memory.
Such local memory read and write processing operation can typically be satisfied within 102 - 103 cycles of the central processing unit. Thus, in practice there is substantially less waiting for memory accesses which involves and/or writes. Also, the local memory of each machine is not able to be accessed by any other machine and can therefore be said to be independent.
The invention is transport, network, and communications path independent, and does not depend on how the communication between machines or DRTs takes place. In one embodiment, even electronic mail (email) exchanges between machines or DRTs may suffice for the communications. In connection with the above, it will be seen from Fig. 2 that there are a number of machines Ml, M2, .... Mn, "n" being an integer greater than or equal to two, on which the application program 50 of Fig. 1 is being run substantially simultaneously. These machines are allocated a number 1, 2, 3, ... etc. in a hierarchical order. This order is normally looped or closed so that whilst machines 2 and 3 are hierarchically adjacent, so too are machines "n" and 1. There is preferably a further machine X which is provided to enable various housekeeping functions to be carried out, such as acting as a lock server. In particular, the further machine X can be a low value machine, and much less expensive than the other machines which can have desirable attributes such as processor speed. Furthermore, an additional low value machine (X+ 1) is preferably available to provide redundancy in case machine X should fail. Where two such server machines X and X+l are provided, they are preferably, for reasons of simplicity, operated as dual machines in a cluster configuration. Machines X and X+l could be operated as a multiple computer system in accordance with the present invention, if desired. However this would result in generally undesirable complexity. If the machine X is not provided then its functions, such as housekeeping functions, are provided by one, or some, or all of the other machines.
Turning now to Fig. 3, the operation of one of the machines Ml-Mn on acquiring a lock is illustrated. During normal code execution, the need for a lock arises and thus upon entering the "acquire lock" operation, as indicated at step 21, the acquiring machine, say M5, which is to acquire the lock looks up a global name for the object, asset or resource to be locked. For the purposes of this example, it will be assumed that the object asset or resource is an object. Thus at step 22, the global name of the object is looked up, bearing in mind that each of the machines Ml-Mn has a local object which corresponds to the same object in each machine, but which will have the same global name, but possibly a different local name depending upon the organisation of the local memory of each machine.
The global names and the corresponding local memory names or addresses are preferably stored in a table or similar data structure. The table can be presented in each of the "n" machines or in server machine X only. The data structure can take the form of a tag which accompanies each local memory location and which identifies or points to, or refers to the global name. Conversely, the global name can identify, point to, or refer to the local memory location, or object, asset, etc.
Once this global name has been as ascertained by machine M5, machine M5 then sends an "acquire lock" request to the machine X, which functions as the lock server. This is indicated in step 23. As indicated in step 24, machine M5 then awaits a reply from the lock server, which confirms the acquisition of the lock.
For the purposes of explanation, it is convenient to assume that the lock thus acquired is the first lock on the object. As a consequence, machine M5 only carries out steps 21 - 24 and step 25 will result in receipt of a table with nil values. Machine M5 then proceeds to resume normal code execution. As indicated in step 27, each time a memory location is written to, an entry is made in a table with the name of the memory location and the amended value. As a consequence, when the lock is about to be relinquished, there is in existence a table, which lists the memory location(s) and value(s) of each memory location, where a value has been written to memory. Thus, when a lock acquired is not the first lock on an object, as indicated in step 25, on the acquisition of that subsequent lock, each machine receives a table with the updated memory values and global names to which the lock relates. This procedure is repeated for each lock.
The abovedescribed operation of Fig. 3 can be modified slightly due to possible delays in transmission within the communications network 53. This can result in the confirmation of "acquisition of lock" of step 26 being received before the table of memory location/value pairs of step 25. In these circumstances normal code execution resumes after the receipt of the table of step 25.
Similarly, as indicated in Fig. 4, where a lock is intended to be released or relinquished, as indicated at step 31 then the relinquishing machine, M5, preferably determines the global name of the object to be unlocked. This is indicated at step 32. Next the relinquishing machine, M5 sends a "release lock" request to the lock server machine X and this is indicated at step 33. The lock server machine X sends to the requesting machine, not only the lock authorization, but also propagates the previously generated table contents (ie memory location/value pairs) created whilst the lock was held by machine M5. Preferably as indicated at step 35, the machine M5 awaits a reply from a lock server, which confirms the release of the lock. This step 35, like step 32, is a preferable one, but not essential and thus is indicated in broken lines in Fig. 4. Next, as indicated at step 36, the machine M5 resumes normal code execution.
The abovementioned procedure for lock acquisition and release, can be modified so as to reduce the volume of data contained within the table to be propagated from one machine to the other. In particular, the abovementioned procedure suffers from the disadvantage that where a specific memory location is written to on many occasions, each of the successive values is stored within the table, but it is only the final value which is of interest to the next machine to receive the lock. In order to reduce the volume of data sent with each table, the above-mentioned procedure can be modified by noting only the names of the various locations, which had been written to, during the duration of the lock. Only at the relinquishing of the lock, is the current value of each memory location read and then inserted into the table or then used to form a new table.
Irrespective of which method is used, the lock authorization and its accompanying table of memory locations/content pairs are preferably given top priority for transmission via the communications network 53. As a consequence, the machine in the queue of waiting machines which receives the lock receives not only the lock authorization, but also the global names of the relevant written to memory locations, together with their up-to-date values or content.
An alternative arrangement is illustrated in Figs. 5 and 6. Here, during the initial loading of the application program, after commencing the loading procedure at step 41, step 42 is carried out so as to create a list of memory locations to be utilised by the application program. Next, as indicated in step 43, a search of the program is conducted in order to detect synchronisation routines. Then, as indicated in step 44, for each detected synchronisation routine, a search is made to detect any listed memory locations which are to be written to. In step 45, a table is created (either during the search or during execution of the application program) in which is recorded the identity and value (if all changes to each memory location are to be propagated) or just the identity of each memory location (if the final value of each memory location is to be propagated). Once this procedure has been completed in step 45, the loading procedure continues as indicated at step 46 and the modified application program is loaded.
In Fig. 6, the procedure of acquiring and relinquishing a lock, where the above-mentioned modification of the program has been carried out at loading, is illustrated. As indicated at step 52, once the lock is acquired, the machine acquiring the (subsequent) lock also receives the propagated table of memory location/value pairs. In order to ensure that the local memory location(s) corresponding to the global name(s) has the latest content or value, the machine acquiring the lock updates its local memory. The machine which has acquired the lock is thus in a position to begin execution of the application code with a local memory which is in the condition applying when the previous lock was released. This is indicated at step 53.
During the execution of the application code, as indicated by steps 54 and 55, if any write to memory is to take place, then the location and value of each memory location written to, is recorded in a table. This cycle repeats as necessary, also utilizing steps 56 and 57. After this has been carried out, as indicated at step 56, if there is no further code to be executed within the synchronization routine, then the lock is released as indicated at step 58. As indicated by step 59, at the release of the lock a table is propagated to the machine to next receive the lock in any queue of waiting machines, the table containing all recorded memory location/value pairs where any writing to memory occurred whilst the lock was held by the releasing machine.
The tabulation or recording of memory location/value pairs can be accomplished in various ways. In one form a single table is used for all purposes. In another form one table is used to record the newly written values and a record table is used to record the memory location/value pairs. This second table is transmitted when the lock is released. For example the table in steps 52 and 55 and 59 can be same table or different tables can be used. Alternatively, the table of steps 52 and 59 can be the same table and the table of step 55 can be a different table. Many tabulation formats will be apparent to those skilled in the computing arts. What is important is the nature and content of the tabulated or recorded data, not the tabulation format.
In connection with the foregoing, where reference is made to searching for synchronization routines and written to memory locations, it will be apparent to those skilled in the art that it is routines and locations within the application program 50 which are searched or detected. It is not the entirety of the memory of each machine (which includes an operating system, for example) which is searched.
Set out in an Annexure hereto are code fragments G1-G32 which exemplify the implementation of the above described techniques. Such code fragments are written in the JAVA language.
The foregoing describes only some embodiments of the present invention and modifications, obvious to those skilled in the art, can be made thereto without departing from the scope of the present invention. For example, reference to JAVA includes both the JAVA language and also JAVA platform and architecture.
In all described instances of modification, where the application code 50 is modified before, or during loading, or even after loading but before execution of the unmodified application code has commenced, it is to be understood that the modified application code is loaded in place of, and executed in place of, the unmodified application code subsequently to the modifications being performed.
Alternatively, in the instances where modification takes place after loading and after execution of the unmodified application code has commenced, it is to be understood that the unmodified application code may either be replaced with the modified application code in whole, corresponding to the modifications being performed, or alternatively, the unmodified application code may be replaced in part or incrementally as the modifications are performed incrementally on the executing unmodified application code. Regardless of which such modification routes are used, the modifications subsequent to being performed execute in place of the unmodified application code. It is advantageous to use a global identifier is as a form of 'meta-name' or 'meta-identity' for all the similar equivalent local objects (or classes, or assets or resources or the like) on each one of the plurality of machines Ml, M2...Mn. For example, rather than having to keep track of each unique local name or identity of each similar equivalent local object on each machine of the plurality of similar equivalent objects, one may instead define or use a global name corresponding to the plurality of similar equivalent objects on each machine (e.g. "globalname7787"), and with the understanding that each machine relates the global name to a specific local name or object (e.g. "globalname7787" corresponds to object "Iocalobject456" on machine Ml, and "globalname7787" corresponds to object "Iocalobject885" on machine M2, and "globalname7787"corresponds to object "localobjectl 11" on machine M3, and so forth).
It will also be apparent to those skilled in the art in light of the detailed description provided herein that in a table or list or other data structure created by each DRT 71 when initially recording or creating the list of all, or some subset of all objects (e.g. memory locations or fields), for each such recorded object on each machine Ml, M2...Mn there is a name or identity which is common or similar on each of the machines Ml, M2...Mn. However, in the individual machines the local object corresponding to a given name or identity will or may vary over time since each machine may, and generally will, store memory values or contents at different memory locations according to its own internal processes. Thus the table, or list, or other data structure in each of the DRTs will have, in general, different local memory locations corresponding to a single memory name or identity, but each global "memory name" or identity will have the same "memory value or content" stored in the different local memory locations. So for each global name there will be a family of corresponding independent local memory locations with one family member in each of the computers. Although the local memory name may differ, the asset, object, location etc has essentially the same content or value. So the family is coherent.
The term "table" or "tabulation" as used herein is intended to embrace any list or organised data structure of whatever format and within which data can be stored and read out in an ordered fashion. It will also be apparent to those skilled in the art in light of the description provided herein that the abovementioned modification of the application program code 50 during loading can be accomplished in many ways or by a variety of means. These ways or means include, but are not limited to at least the following five ways and variations or combinations of these five, including by:
(i) re-compilation at loading,
(ii) a pre-compilation procedure prior to loading,
(iii) compilation prior to loading,
(iv) "just-in-time" compilation(s), or
(v) re-compilation after loading (but, for example, before execution of the relevant or corresponding application code in a distributed environment).
Traditionally the term "compilation" implies a change in code or language, for example, from source to object code or one language to another. Clearly the use of the term "compilation" (and its grammatical equivalents) in the present specification is not so restricted and can also include or embrace modifications within the same code or language.
Given the fundamental concept of modifying memory manipulation operations to coordinate operation between and amongst a plurality of machines Ml, M2...Mn, there are several different ways or embodiments in which this coordinated, coherent and consistent memory state and manipulation operation concept, method, and procedure may be carried out or implemented.
In the first embodiment, a particular machine, say machine M2, loads the asset (such as class or object) inclusive of memory manipulation operation(s), modifies it, and then loads each of the other machines Ml, M3...Mn (either sequentially or simultaneously or according to any other order, routine or procedure) with the modified object (or class or other assert or resource) inclusive of the new modified memory manipulation operation. Note that there may be one or a plurality of memory manipulation operations corresponding to only one object in the application code, or there may be a plurality of memory manipulation operations corresponding to a plurality of objects in the application code. Note that in one embodiment, the memory manipulation operation(s) that is (are) loaded is executable intermediary code.
In this arrangement, which may be termed "master/slave" each of the slave (or secondary) machines Ml, M3...Mn loads the modified object (or class), and inclusive of the new modified memory manipulation operation(s), that was sent to it over the computer communications network or other communications link or path by the master (or primary) machine, such as machine M2, or some other machine as a machine X. In a slight variation of this "master/slave" or "primary/secondary" arrangement, the computer communications network can be replaced by a shared storage device such as a shared file system, or a shared document/ file repository such as a shared database.
It will be appreciated in the light of the detailed description provided herein that the modification performed on each machine or computer need not and frequently will not be the same or identical. What is required is that they are modified in a similar enough way that each of the plurality of machines behaves consistently and coherently relative to the other machines. Furthermore, it will be appreciated that there are a myriad of ways to implement the modifications that may for example depend on the particular hardware, architecture, operating system, application program code, or the like or different factors. It will also be appreciated that implementation can be within an operating system, outside of or without the benefit of any operating system, inside the virtual machine, in an EPROM, in software, in hardware, in firmware, or in any combination of these.
In a still further embodiment, each machine Ml, M2...Mn receives the unmodified asset (such as class or object) inclusive of one or more memory manipulation operation(s), but modifies the operations and then loads the asset (such as class or object) consisting of the now modified operations. Although one machine, such as the master or primary machine may customize or perform a different modification to the memory manipulation operation(s) sent to each machine, this embodiment more readily enables the modification carried out by each machine to be slightly different. It can thereby be enhanced, customized, and/or optimized based upon its particular machine architecture, hardware processor, memory, configuration, operating system, or other factors yet still be similar, coherent and consistent with the other machines and with all other similar modifications.
In all of the described instances or embodiments, the supply or the communication of the asset code (such as class code or object code) to the machines Ml, M2...Mn and optionally inclusive of a machine X, can be branched, distributed or communication among and between the different machines in any combination or permutation; such as by providing direct machine to machine communication (for example, M2 supplies each of Ml, M3, M4 etc. directly), or by providing or using cascaded or sequential communication (for example, M2 supplies Ml which then supplies M3 which then supplies M4, and so on) or a combination of the direct and cascaded and/or sequential.
The abovedescribed arrangement needs to be varied in the situation where the modification relates to a cleanup routine, finalization or similar, which is only to be carried out by one of the plurality of computers In this variation of this "master/slave" or "primary/secondary" arrangement, machine M2 loads the asset (such as class or object) inclusive of a cleanup routine in unmodified form on machine M2, and then (for example, M2 or each local machine) deletes the unmodified cleanup routine that had been present on the machine in whole or part from the asset (such as class or object) and loads by means of the computer communications network the modified code for the asset with the now modified or deleted cleanup routine on the other machines. Thus in this instance the modification is not a transformation, instrumentation, translation or compilation of the asset cleanup routine but a deletion of the cleanup routine on all machines except one. In one embodiment, the actual code-block of the finalization or cleanup routine is deleted on all machines except one, and this last machine therefore is the only machine that can execute the finalization routine because all other machines have deleted the finalization routine. One benefit of this approach is that no conflict arises between multiple machines executing the same finalization routine because only one machine has the routine.
The process of deleting the cleanup routine in its entirety can either be performed by the "master" machine (such as for example machine M2 or some other machine such as machine X) or alternatively by each other machine Ml, M3...Mn upon receipt of the unmodified asset. An additional variation of this "master/slave" or "primary/secondary" arrangement is to use a shared storage device such as a shared file system, or a shared document/file repository such as a shared database as means of exchanging the code for the asset, class or object between machines Ml, M2...Mn and optionally the server machine X.
In a further arrangement, a particular machine, say for example machine Ml, loads the unmodified asset (such as class or object) inclusive of a finalization or cleanup routine and all the other machines M2, M3...Mn perform a modification to delete the cleanup routine of the asset (such as class or object) and load the modified version.
In a still further arrangement, the machines Ml, M2...Mn, may send some or all load requests to the additional server machine X , which performs the modification to the application program code 50 (including or consisting of assets, and/or classes, and/or objects) and inclusive of finalization or cleanup routine(s), via any of the abovementioned methods, and returns in the modified application program code inclusive of the now modified finalization or cleanup routine(s) to each of the machines Ml to Mn, and these machines in turn load the modified application program code inclusive of the modified routine(s) locally. In this arrangement, machines Ml to Mn forward all load requests to machine X, which returns a modified application program code inclusive of modified finalization or cleanup routine(s) to each machine. The modifications performed by machine X can include any of the modifications described. This arrangement may of course be applied to some only of the machines whilst other arrangements described herein are applied to others of the machines.
Those skilled in the computer and/or programming arts will be aware that when additional code or instructions is/are inserted into an existing code or instruction set to modify same, the existing code or instruction set may well require further modification (such as for example, by re-numbering of sequential instructions) so that offsets, branching, attributes, mark up and the like are properly handled or catered for. Similarly, in the JAVA language memory locations include, for example, both fields and array types. The above description deals with fields and the changes required for array types are essentially the same mutatis mutandis. Also the present invention is equally applicable to similar programming languages (including procedural, declarative and object orientated languages) to JAVA including Microsoft.NET platform and architecture (Visual Basic, Visual C/C++, and C#) FORTRAN, CVC4+, COBOL, BASIC etc.
The terms object and class used herein are derived from the JAVA environment and are intended to embrace similar terms derived from different environments such as dynamically linked libraries (DLL), or object code packages, or function unit or memory locations.
Various means are described relative to embodiments of the invention, including for example but not limited to lock means, distributed run time means, modifier or modifying means, and the like. In at least one embodiment of the invention, any one or each of these various means may be implemented by computer program code statements or instructions (possibly including by a plurality of computer program code statements or instructions) that execute within computer logic circuits, processors, ASICs, logic or electronic circuit hardware, microprocessors, microcontrollers or other logic to modify the operation of such logic or circuits to accomplish the recited operation or function. In another embodiment, any one or each of these various means may be implemented in firmware and in other embodiments such may be implemented in hardware. Furthermore, in at least one embodiment of the invention, any one or each of these various means may be implemented by a combination of computer program software, firmware, and/or hardware.
Any and each of the abovedescribed methods, procedures, and/or routines may advantageously be implemented as a computer program and/or computer program product stored on any tangible media or existing in electronic, signal, or digital form. Such computer program or computer program products comprising instructions separately and/or organized as modules, programs, subroutines, or in any other way for execution in processing logic such as in a processor or microprocessor of a computer, computing machine, or information appliance; the computer program or computer program products modifying the operation of the computer in which it executes or on a computer coupled with, connected to, or otherwise in signal communications with the computer on which the computer program or computer program product is present or executing. Such a computer program or computer program product modifies the operation and architectural structure of the computer, computing machine, and/or information appliance to alter the technical operation of the computer and realize the technical effects described herein.
The invention may therefore include a computer program product comprising a set of program instructions stored in a storage medium or existing electronically in any form and operable to permit a plurality of computers to carry out any of the methods, procedures, routines, or the like as described herein including in any of the claims.
Furthermore, the invention includes (but is not limited to) a plurality of computers, or a single computer adapted to interact with a plurality of computers, interconnected via a communication network or other communications link or path and each operable to substantially simultaneously or concurrently execute the same or a different portion of an application code written to operate on only a single computer on a corresponding different one of computers. The computers are programmed to carry out any of the methods, procedures, or routines described in the specification or set forth in any of the claims, on being loaded with a computer program product or upon subsequent instruction. Similarly, the invention also includes within its scope a single computer arranged to co-operate with like, or substantially similar, computers to form a multiple computer system
The term "compromising" (and its grammatical variations) as used herein is used in the inclusive sense of "having" or "including" and not in the exclusive sense of "consisting only of.
To summarise, there is provided an improved method used in a multiple computer environment in which different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of a plurality of computers, each having a local memory and each being interconnected via a communications network, and in which at least one memory location is replicated in the memory of each the plurality of computers, and after each occasion at which each the memory location has its contents written to, or re-written, with a new content, all the corresponding memory locations of the computers are in due course updated via the communications network with the new content, the improved method comprising the steps of:
(i) prior to initially writing the new content, acquiring a lock on an object, asset or resource,
(ii) recording the name and updated content of the local memory locations written to prior to releasing the lock,
(iii) releasing the lock, and
(iv) prior to permitting the acquisition of the same lock by another one of the computers, transmitting the updated memory location(s) and updated content(s) to the another one computer, whereby any the computer on acquiring the lock has acquired the previously updated contents without needing to wait for the in due course updating of all the computers.
Preferably each the computer has an independent local memory accessible only by the corresponding portion of the application program.
Preferably the object, asset or resource locked is the object, asset or resource to which the new content is to be written.
Preferably the method includes the further step of:
(v) transmitting in step (iv) all memory locations and contents updated in step (ii). Alternatively the method includes the further step of:
(vi) transmitting in step (iv) all memory locations and only their final contents as updated in step (ii).
Preferably the method includes the further steps of:
(vii) prior to acquiring the lock, detecting all applications program steps which potentially write to listed memory location(s), and
(viii) recording the name of the listed memory location(s) prior to releasing the lock. Preferably the detecting all application program steps takes place either before loading, or during loading, or after loading but before execution of the relevant code.
Preferably the recording of the name of the listed memory locations takes place either at the time of detection or at the time of execution of an detected program step.
Preferably the method includes the further step of:
(ix) for each recorded memory location recording all contents updated in step (ii).
Alternatively the method includes the further step of:
(x) for each recorded memory location recording only the final contents as updated in step (ii).
Also provided is a computer system comprising a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of the plurality of computers, at least one memory location is replicated in the local memory of each the computer, the system further comprising updating means associated with each the computer to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content, and lock means associated with each the computer to acquire a lock on an object, asset or resource, the lock means including a recording means in which is recorded the name and updated content of all the local memory locations written to prior to releasing the lock, and the lock means after releasing the lock and prior to permitting the acquisition of the same lock by another one of the computers transmitting the updated memory location(s) and updated content(s) to the another one computer, whereby any the computer on acquiring the lock has acquired the previously updated contents without needing to wait for the in due course updating of all the computers. Preferably each the computer has an independent local memory accessible only by the corresponding portion of the application program.
Preferably the object, asset or resource locked is the object asset or resource to which the new content is written.
Preferably the lock means comprises a lock server computer in addition to the plurality of computers, and also connected to the plurality of computers via the communications network.
Preferably the recording means comprises a look up table.
Preferably the look up table includes all contents updated for each recorded memory location.
Preferably the look up table includes only the final content of each updated content for each recorded memory location.
Preferably the contents of the look up table comprises the address of a memory location at which the updated content is stored.
Further, also provided are a plurality of computers interconnected via a communications network and operable to ensure carrying out of the above method(s).
In addition, there is provided a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a plurality of computers to carry out the any of the above method(s).
Furthermore, there is also provided a single computer intended to operate in a multiple computer system which comprises a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of the plurality of computers, and at least one memory location is replicated in the local memory of each the computer, the system further comprising updating means associated with each the computer to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content, the single computer comprising: a local memory having at least one memory location intended to be updated via a communications port connectable to the communications network, updating means to in due course update the memory locations of other substantially similar computers via the communications port; lock means associated with the local memory to acquire a lock on an object, asset or resource of the local memory, the lock means including a recording means in which is recorded the name and updated content of the local memory locations written to prior to releasing the lock, and the lock means after releasing the lock and prior to permitting the acquisition of the same lock by another one of the computers, transferring the updated memory location(s) and updated content(s) to the communications port for transmittal to the another one computer whereby any the another one computer on acquiring the lock has acquired the previously updated contents without needing to wait for the in due course updating of all the computers.
Preferably the local memory is an independent local memory accessible only by the corresponding portion of the application program executing on the computer.
Preferably the object, asset or resource locked is the object, asset or resource to which the new content is written.
Preferably the lock means further includes a lock server computer connectable to the single computer via the communications network.
Preferably the recording means comprises a look up table.
Preferably the look up table includes all contents updated for each recorded memory location. Alternatively the look up table includes only the final content of each updated content for each recorded memory location.
Preferably the contents of the look up table comprises the address of a memory location at which the updated content is stored.
Still further, there is provided in a single computer, adapted to interoperate with a plurality of other external computers as a multiple computer system wherein the computer has a local processor and a local memory coupled to the local processor and the computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on the single computer and the plurality of computers, and wherein at least one memory location is replicated in the local memory of each the computer, each the computer including memory location updating means to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content; a method comprising: acquiring a lock on an object, asset, or resource of the local memory of the single computer prior to initially writing the new content; recording the name and updated content of the at least one local memory location of the single computer written to prior to releasing the lock; releasing the lock on the object, asset, or resource of the local memory of the single computer; and sending a communication of the updated memory location(s) and updated content(s) to other of the plurality of computers by the single computer over the communications network.
Preferably the method further comprises : permitting but not requiring the acquisition of a new lock on the same object, asset, or resource by another one of the computers; wherein any the another one of the plurality of computers on acquiring the new lock has acquired the previously updated memory location contents without needing to wait for the in due course updating of the updated contents of all the plurality of computers.
Preferably the method further comprises: updating the local memory locations of other of the plurality of computers via the communications network in due course.
Preferably the method further comprises: generating a memory update message that includes the updated memory locations(s) and updated content(s) that are to be updated in due course in other of the computers, prior to sending the communication and sending the generated memory update message with the communication.
Also provided is a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a computer to carry out the above method(s).
In addition there is provided in a single computer, adapted to interoperate with a plurality of other external computers as a multiple computer system wherein the computer has a local processor and a local memory coupled to the local processor and the computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on the single computer and the plurality of computers, and wherein at least one memory location is replicated in the local memory of each the computer, each the computer including memory location updating means to in due course update each the memory location via the communications network after each occasion at which each the memory location has its content written to, or re-written, with a new content; a method comprising: receiving a communication of updated memory location(s) and updated content(s) to send by a different one of the plurality of computers by the single computer over the communications network; and updating the local memory locations of the single computer in response to the received communication. Preferably the communication received includes a memory update message that includes the updated memory locations(s) and updated content(s) that are to be updated in due course in the receiving computer.
Still further, there is provided a computer program product comprising a set of program instructions stored in a storage medium and operable to permit a computer to carry out the last mentioned method.
Copyright Notice
This patent specification and the Annexures which form a part thereof contains material which is subject to copyright protection. The copyright owner (which is the applicant) has no objection to the reproduction of this patent specification or related materials from publicly available associated Patent Office files for the purposes of review, but otherwise reserves all copyright whatsoever. In particular, the various instructions are not to be entered into a computer without the specific prior written approval of the copyright owner.
ANNEXURE
Gl. Attribute_info.java
Convience class for representing attribute_info structures within ClassFiles. import java.lang. *; import java.io.*;
/** This abstract class represents all types of attribute_info
* that are used in the JVM specifications. *
* All new attribute_info subclasses are to always inherit from this
* class. */ public abstract class attribute_info{ public int attribute_name_index; public int attribute_length;
/** This is used by subclasses to register themselves
* to their parent classFile. */ attribute_info (ClassFile cf){}
/** Used during input serialization by ClassFile only. */ attribute_info (ClassFile cf, DatalnputStream in) throws IOException{ attribute_name_index = in . readChar ( ) ; attribute_length = in. readlnt () ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out .writeChar (attribute_name_index) ; out.writelnt (attribute_length) ; }
/** This class represents an unknown attribute_info that
* this current version of classfile specification does
* not understand. */ public final static class Unknown extends attribute_info{ byte[] info;
/** Used during input serialization by ClassFile only. */ Unknown (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; info = new byte [attribute_length] ; in.read(info, 0, attribute_length) ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{
ByteArrayOutputStream baos = new ByteArrayOutputStream( ) ; super. serialize (out) ; out. write (info, 0, attribute_length) ; } }
G2. ClassFile.java
Convience class for representing ClassFile structures. import java.lang. *; import java.io.*; import java.util.*;
/** The ClassFile follows verbatim from the JVM specification. */ public final class ClassFile { public int magic; public int minor_version; public int major_version; public int constant_pool_count; public cp_info[] constant_pool; public int access_flags; public int this_class; public int super_class; public int interfaces_count; public int[] interfaces; public int fields_count; public field_info [ ] fields; public int methods_count; public method_info [ ] methods; public int attributes_count; public attribute_info[] attributes;
/** Constructor. Takes in a byte stream representation and transforms
* each of the attributes in the ClassFile into objects to allow for
* easier manipulation.
*/ public ClassFile (InputStream ins) throws IOException{
DatalnputStream in = (ins instanceof DatalnputStream ? (DatalnputStream) ins : new DatalnputStream(ins) ) ; magic = in. readlnt () ; minor_version = in.readChar (); major_version = in. readChar () ; constant_pool_count = in.readChar (); constant_pool = new cp_info[constant_pool_count] ; for (int i=l; i<constant__pool_count; i++) { in.mark(l) ; int s = in. read () ; in. reset () ; switch (s) { case 1: constant_pool [i] = new CONSTANT_Utf8_info (this, in); break; case 3: constant_pool[i] = new CONSTANT_Integer_info (this, in); break; case 4: constantjpool [i] = new CONSTANT_Float_info (this, in); break; case 5: constant_pool [i] = new CONSTANT_Long_info (this, in); i++; break; case 6: constant_pool [i] = new CONSTANT_Double_info (this, in); i++; break; case 7 : constant_pool [i] = new CONSTANT_Class_info (this, in); break; case 8: constant_pool[i] = new CONSTANT__String_info (this, in) ; break; case 9: constant_j?ool [i] = new CONSTANT_Fieldref_info (this, in); break; case 10: constant_j?ool[i] = new CONSTANT_Methodref__info (this, in) ; break; case 11: constant_pool [i] = new CONSTANT_InterfaceMethodref_info (this, in) ; break; case 12: constant_pool [i] = new CONSTANT_NameAndType_info (this, in) ; break; default: throw new ClassFormatError ("Invalid ConstantPoolTag") ; 1 } access_flags = in.readChar () ; this_class = in.readChar (); super_class = in. readChar (); interfaces_count = in. readChar (); interfaces = new int [interfaces_count] ; for (int i=0; i<interfaces_count; i++) interfaces [i] = in. readChar (); fields_count = in.readChar (); fields = new field_info [fields_count] ; for (int i=0; i<fields_count; i++) { fields [i] = new field_info (this, in); } methods_count = in.readChar (); methods = new method_info[methods_count] ; for (int i=0; i<raethods_count; i++) { methods [i] = new method_info (this, in); } attributes_count = in.readChar (); attributes = new attribute_info[attributes_count] ; for (int i=0; i<attributes_count; i++) { in.mark(2) ;
String s = constant_pool [in.readChar ()] .toStringO ; in. reset () ; if (s. equals ("SourceFile") ) attributes [i] = new SourceFile_attribute (this, in); else if (s. equals ("Deprecated") ) attributes [i] = new Deprecated_attribute (this, in); else if (s. equals ("InnerClasses") ) attributes [i] = new InnerClasses_attribute (this, in); else attributes [i] = new attribute_info. Unknown (this, in); } }
/** Serializes the ClassFile object into a byte stream. */ public void serialize (OutputStream o) throws IOException{ DataOutputStream out = (o instanceof DataOutputStream ?
(DataOutputStream) o : new DataOutputStream (o) ); out .writelnt (magic) ; out . writeChar (minor_version) ; out.writeChar (major_version) ; out.writeChar (constant_pool_count) ; for (int i=l; i<constant_pool_count; i++) { constant_pool [i] . serialize (out) ; if (constant_pool [i] instanceof CONSTANT_Long_info || constant_j>ool [ i ] instanceof CONSTANT_Double_info) i++ ; } out.writeChar (access_flags) ; out.writeChar (this_class) ; out.writeChar (super_class) ; out . writeChar (interfaces_count) ; for (int i=0; i<interfaces_count; i++) out.writeChar (interfaces [i] ) ; out.writeChar (fields_count) ; for (int i=0; i<fields_count; i++) fields [i] . serialize (out) ; out .writeChar (methods_count) ; for (int i=0; i<methods_count; i++) methods [i] . serialize (out) ; out . writeChar (attributes_count) ; for (int i=0; i<attributes_count; i++) attributes [i] . serialize (out) ; // Flush the outputstream just to make sure, out. flush () ; }
G3. Code_attribute.java
Convience class for representing Code_attribute structures within ClassFiles. import java.util.*; import java.lang.*; import java.io.*;
/**
* The code[] is stored as a 2D array. */ public final class Code_attribute extends attribute_info{ public int max_stack; public int max_locals; public int code_length; public byte[][] code; public int exception_table_length; public exception_table [ ] exception_table; public int attributes_count; public attribute_info [ ] attributes;
/** Internal class that handles the exception table. */ public final static class exception_table{ public int start_pc; public int end_j?c; public int handler_pc; public int catch_type; } /** Constructor called only by method_info. */
Code_attribute (ClassFile cf, int ani, int al, int ms, int ml, int cl, byte[][] cd, int etl, exception_table [ ] et, int ac, attribute_info [ ] a) { super (cf) ; attribute_name_index = ani; attribute_length = al; max_stack = ms; max_locals = ml; code_length = cl; code = cd; exception_table_length = etl; exception_table = et; attributes_count = ac; attributes = a; }
/** Used during input serialization by ClassFile only. */ Code_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; max_stack = in. readChar ( ) ; max_locals = in. readChar (); code_length = in. readlnt ( ) ; code = new byte [code_length] []; int i = 0; for (int pos=0; pos<code_length; i++) { in.mark (1) ; int s = in. read () ; in. reset () ; switch (s) { case 16: case 18: case 21: case 22: case 23: case 24: case 25: case 54 : case 55: case 56: case 57 : case 58: case 169: case 188: case 196: code [iJ = new byte [2] ; break; case 17: case 19: case 20: case 132: case 153: case 154: case 155: case 156: case 157: case 158: case 159: case 160: case 161: case 162: case 163: case 164: case 165: case 166: case 167: case 168: case 178: case 179: case 180: case 181: case 182: case 183: case 184: case 187: case 189: case 192: case 193: case 198: case 199: case 209: code[i] = new byte [3] ; break; case 197: code[i] = new byte [4]; break; case 185: case 200: case 201: code[i] = new byte [5]; break; case 170: { int pad = 3 - (pos % 4) ; in.mark(pad+13) ; // highbyte in.skipBytes (pad+5) ; // lowbyte int low = in. readlnt (); code[i] = new byte[pad + 13 + ( (in. readlnt ( ) - low + 1) * 4)]; in. reset () ; break; }case 171: { int pad = 3 - (pos % 4); in.mark(pad+9) ; in. skipBytes (pad+5) ; code[i] = new byte [pad + 9 + (in. readlnt () * 8) ] ; in. reset () ; break; }default: code[i] = new byte [I]; } in. read (code [i] , 0, code [i] .length) ; pos += code [i] . length; }
// adjust the array to the new size and store the size byte[][] temp = new byte[i][]; System. arraycopy (code, 0, temp, 0, i) ; code = temp; exception_table_length = in.readChar () ; exception_table = new Code_attribute.exception_table[exception_table_length] ; for (i=0; i<exception_table_length; i++) { exception_table [i] = new exception_table ( ) ; exception_table [i ] . start_pc = in . readChar ( ) ; exception_table [ i ] . end_pc = in . readChar ( ) ; exception_table [ i ] . handler_pc = in . readChar ( ) ; exception_table [ i ] . catch_type = in . readChar ( ) ;
} attributes_count = in . readChar (); attributes = new attribute_info [attributes_count] ; for (i=0; i<attributes_count; i++) { in.mark (2) ;
String s = cf.constant_pool [in.readChar ()] .toStringO ; in. reset () ; if (s. equals ("LineNumberTable") ) attributes [i] = new LineNumberTable_attribute (cf, in); else if (s . equals ("LocalVariableTable") ) attributes [i] = new LocalVariableTable_attribute (cf, in) else attributes [i] = new attribute_info. Unknown (cf, in); } }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ attribute_length = 12 + code_length +
(exception_table_length * 8); for (int i=0; i<attributes_count; i++) attribute_length += attributes [i] .attribute_length + 6; super. serialize (out) ; out.writeChar (max_stack) ; out.writeChar (max_locals) ; out.writelnt (code_length) ; for (int i=0, pos=0; pos<code_length; i++) { out. write (code [i] , 0, code [i] . length) ; pos += code [i] . length; } out.writeChar (exception_table_length) ; for (int i=0; i<exception_table_length; i++) { out.writeChar (exception_table [i] .start_pc) ; out . writeChar (exception_table [i] .end_pc) ; out.writeChar (exception_table [i] .handler_pc) ; out.writeChar (exception_table[i] ,catch_type) ; } out.writeChar (attributes_count) ; for (int i=0; i<attributes_count; i++) attributes [i] . serialize (out) ; }
G4. CONSTANT_Class_info.java
Convience class for representing CONSTANT_Class_info structures within ClassFiles. import java.lang.*; import java.io.*;
/** Class subtype of a constant pool entry. */ public final class CONSTANT_Class_info extends cp_info{
/** The index to the name of this class. */ public int name_index = 0;
/** Convenience constructor. */ public CONSTANT_Class_info(int index) { tag = 7; name_index = index; )
/** Used during input serialization by ClassFile only. */ CONSTANT_Class_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 7) throw new ClassFormatError () ; name_index = in. readChar () ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out.writeChar (name_index) ; }
G5. CONST ANT_Double_info. Java
Convience class for representing CONSTANT_Double_info structures within ClassFiles. import java.lang.*; import java.io.*;
/** Double subtype of a constant pool entry. */ public final class CONSTANT_Double_info extends cp_info{
/** The actual value. */ public double bytes; public CONSTANT_Double_info (double d) { tag = 6; bytes = d; }
/** Used during input serialization by ClassFile only. */ CONSTANT_Double_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 6) throw new ClassFormatError (); bytes = in.readDouble () ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out .writeDouble (bytes) ; long 1 = Double. doubleToLongBits (bytes) ; } }
G6. CONSTANT JFieldrefJnfo.java Convience class for representing CONST ANTJFieldrefJnfo structures within ClassFiles. import Java. lang. *; import java.io.*;
/** Fieldref subtype of a constant pool entry. */ public final class CONSTANT_Fieldref_info extends cp_info{
/** The index to the class that this field is referencing to. */ public int class_index;
/** The name and type index this field if referencing to. */ public int name_and_type_index;
/** Convenience constructor. */ public CONSTANT_Fieldref_info (int class_index, int name_and_type_index) { tag = 9; this.class_index = class_index; this . name_and_type_index = name_and_type_index; }
/** Used during input serialization by ClassFile only. */ CONSTANT_Fieldref_info(ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 9) throw new ClassFormatError () ; class_index = in. readChar (); name_and_type_index = in. readChar (); }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out .writeChar (class_index) ; out .writeChar (name_and_type_index) ; }
G7. CONSTANT_Float_info.java
Convience class for representing CONSTANT_Float_info structures within ClassFiles. import Java. lang. *; import j ava . io . * ;
/** Float subtype of a constant pool entry. */ public final class CONSTANT_Float_info extends cp_info{
/** The actual value. */ public float bytes; public CONSTANT_Float_info(float f) { tag = 4; bytes = f; }
/** Used during input serialization by ClassFile only. */ CONSTANT_Float_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 4) throw new ClassFormatError () ; bytes = in. readFloat () ; }
/** Used during output serialization by ClassFile only. */ public void serialize (DataOutputStream out) throws IOException{ out . writeByte ( 4 ) ; out.writeFloat (bytes) ; }
G8. CONSTANT_Integer_info.java
Convience class for representing CONST ANT_Integer_info structures within ClassFiles. import java.lang.*; import java.io.*;
/** Integer subtype of a constant pool entry. */ public final class CONSTANT_Integer_info extends cp_info{
/** The actual value. */ public int bytes; public CONSTANT_Integer_info(int b) { tag = 3; bytes = b; }
/** Used during input serialization by ClassFile only. */ CONSTANT_Integer_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 3) throw new ClassFormatError (); bytes = in.readlnt () ; }
/** Used during output serialization by ClassFile only. */ public void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out.writelnt (bytes) ; }
}
G9. CONSTANT JnterfaceMethodrefJnfo.java
Convience class for representing CONST ANT_InterfaceMethodref_info structures within
ClassFiles. import java.lang.*; import j ava . io . * ;
/** InterfaceMethodref subtype of a constant pool entry.
*/ public final class CONSTANT_InterfaceMethodref_info extends cp_info{ /** The index to the class that this field is referencing to. */ public int class_index;
/** The name and type index this field if referencing to. */ public int name_and_type_index; public CONSTANT_InterfaceMethodref_info (int class_index, int name_and_type_index) { tag = 11; this.class_index = class_index; this.name_and_type_index = name_and_type_index; }
/** Used during input serialization by ClassFile only. */ CONSTANT_InterfaceMethodref_info(ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 11) throw new ClassFormatError () ; class_index = in. readChar (); name_and_type_index = in. readChar (); }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out.writeChar (class_index) ; out.writeChar (name_and_type_index) ; }
}
GlO. CONSTANT_Long_info.java
Convience class for representing CONST ANT_Long_info structures within ClassFiles. import java.lang.*; import java.io.*;
/** Long subtype of a constant pool entry. */ public final class CONSTANT_Long_info extends cp_info{
/** The actual value. */ public long bytes; public CONSTANT_Long_info(long b) { tag = 5; bytes = b; }
/** Used during input serialization by ClassFile only. */ CONSTANT_Long_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 5) throw new ClassFormatError (); bytes = in. readLongO ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOExceptionf out .writeByte (tag) ; out . writeLong (bytes ) ;
Gl 1. CONSTANT_Methodref_info.java
Convience class for representing CONST ANT_Methodref_info structures within
ClassFiles. import Java. lang. *; import java.io.*;
/** Methodref subtype of a constant pool entry.
*/ public final class CONSTANT_Methodref_info extends cp_info{
/** The index to the class that this field is referencing to. */ public int class_index;
/** The name and type index this field if referencing to. */ public int name_and_type_index; public CONSTANT_Methodref_info (int class_index, int name_and_type_index) { tag = 10; this . class_index = class_index; this.name_and_type__index = name_and_type_index; }
/** Used during input serialization by ClassFile only. */ CONSTANT_Methodref_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 10) throw new ClassFormatError ( ) ; class_index = in. readChar ( ) ; name_and_type_index = in. readChar () ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out. writeByte (tag) ; out.writeChar (class_index) ; out .writeChar (name_and_type_index) ; )
}
Gl 2. CONSTANT_NameAndType_info.java
Convience class for representing CONST ANT_NameAndType_info structures within ClassFiles. import j ava . io . *; import j ava . lang. * ; /** NameAndType subtype of a constant pool entry.
*/ public final class CONSTANT_NameAndType_info extends cp_info{
/** The index to the Utf8 that contains the name. */ public int name_index;
/** The index fo the Utf8 that constains the signature. */ public int descriptor_index; public CONSTANT_NameAndType_info (int name_index, int descriptor_index) { tag = 12; this . name_index = name_index; this.descriptor_index = descriptor_index; }
/** Used during input serialization by ClassFile only. */ CONSTANT_NameAndType_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 12) throw new ClassFormatError () ; name_index = in. readChar ( ) ; descriptor_index = in. readChar (); }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ out . writeByte (tag) ; out.writeChar (name_index) ; out.writeChar (descriptor_index) ; }
Gl 3. CONSTANT_Strmg_info.java
Convience class for representing CONSTANT_String_info structures within ClassFiles. import java.lang.*; import java.io.*;
/** String subtype of a constant pool entry.
*/ public final class CONSTANT_String_info extends cp_info{
/** The index to the actual value of the string. */ public int string_index; public CONSTANT_String_info(int value) { tag = 8; string_index = value; }
/** ONLY TO BE USED BY CLASSFILE! */ public CONSTANT_String_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 8) throw new ClassFormatError (); string_index = in. readChar (); } /** Output serialization, ONLY TO BE USED BY CLASSFILE! */ public void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out .writeChar (string_index) ; }
G14. CONSTANT_Utf8_info.java
Convience class for representing CONSTANT_Utf8_info structures within ClassFiles. import java.io.*; import java. lang. *;
/** Utf8 subtype of a constant pool entry.
* We internally represent the Utf8 info byte array
* as a String. */ public final class CONSTANT_Utf8_info extends cp_info{
/** Length of the byte array. */ public int length;
/** The actual bytes, represented by a String. */ public String bytes;
/** This constructor should be used for the purpose
* of part creation. It does not set the parent
* ClassFile reference. */ public CONSTANT_Utf8_info (String s) { tag = 1; length = s.length(); bytes = s; }
/** Used during input serialization by ClassFile only. */ public CONSTANT_Utf8_info (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; if (tag != 1) throw new ClassFormatError () ; length = in. readChar ( ) ; byte[] b = new byte [length] ; in.read(b, 0, length);
// WARNING: String constructor is deprecated, bytes = new String (b, 0, length); }
/** Used during output serialization by ClassFile only. */ public void serialize (DataOutputStream out) throws IOException{ out.writeByte (tag) ; out.writeChar (length) ;
// WARNING: Handling of String coversion here might be problematic. out.writeBytes (bytes) ; } public String toString ( ) { return bytes; }
}
Gl 5. ConstantValue_attribute.java
Convience class for representing ConstantValue_attribute structures within ClassFiles. import Java. lang. *; import java.io.*;
/** Attribute that allows for initialization of static variables in * classes. This attribute will only reside in a field_info struct. */ public final class ConstantValue_attribute extends attribute_info{ public int constantvalue_index; public ConstantValue_attribute (ClassFile cf, int ani, int al, int cvi) { super (cf) ; attribute_name_index = ani; attribute__length = al; constantvalue_index = cvi; } public ConstantValue_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; constantvalue_index = in. readChar () ; } public void serialize (DataOutputStream out) throws IOException{ attribute_length = 2 ; super. serialize (out) ; out .writeChar (constantvalue_index) ; }
Gl 6. cp_info.java
Convience class for representing cp_info structures within ClassFiles. import Java. lang.*; import java.io.*;
/** Represents the common interface of all constant pool parts * that all specific constant pool items must inherit from. *
*/ public abstract class cp_info{
/** The type tag that signifies what kind of constant pool
* item it is */ public int tag;
/** Used for serialization of the object back into a bytestream. */ abstract void serialize (DataOutputStream out) throws IOException; /** Default constructor. Simply does nothing. */ public cp_info() {}
/** Constructor simply takes in the ClassFile as a reference to
* it's parent
*/ public cp_info (ClassFile cf) {}
/** Used during input serialization by ClassFile only. */ cp_info (ClassFile cf, DatalnputStream in) throws IOException{ tag = in.readϋnsignedByte () ; }
Gl 7. Deprecated_attribute.java
Convience class for representing Deprecated_attribute structures within ClassFiles. import Java. lang.*; import j ava . io . * ;
/** A fix attributed that can be located either in the ClassFile,
* field_info or the method_info attribute. Mark deprecated to
* indicate that the method, class or field has been superceded. */ public final class Deprecated_attribute extends attribute_info{ public Deprecated_attribute (ClassFile cf, int ani, int al) { super (cf) ; attribute_name_index = ani; attribute_length = al; }
/** used during input serialization by ClassFile only. */ Deprecated_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; }
Gl 8. Exceptions_attribute.java
Convience class for representing Exceptions_attribute structures within ClassFiles. import Java. lang.*; import java.io.*;
/** This is the struct where the exceptions table are located.
* <brxbr>
* This attribute can only appear once in a method_info struct. */ public final class Exceptions_attribute extends attribute_info{ public int number_of_exceptions; public int [] exception_index_table; public Exceptions_attribute (ClassFile cf, int ani, int al, int noe, int [] eit) { super (cf) ; attribute name index = ani; attribute_length = al; number_of_exceptions = noe; exception_index_table = eit; }
/** Used during input serialization by ClassFile only. */ Exceptions_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; number_of_exceptions = in.readChar (); exception_index_table = new int [number_of_exceptions] ; for (int i=0; i<number_of_exceptions; i++) exception_index_table [i] = in.readChar (); }
/** Used during output serialization by ClassFile only. */ public void serialize (DataOutputStream out) throws IOException{ attribute_length = 2 + (number_of_exceptions*2) ; super . serialize (out) ; out.writeChar (number_of_exceptions) ; for (int i=0; i<number_of_exceptions; i++) out. writeChar (exception_index_table [i] ) ; }
G19. field_info.java
Convience class for representing field_info structures within ClassFiles. import java.lang.*; import java.io.*;
/** Represents the field_info structure as specified in the JVM specification.
*/ public final class field_info{ public int access_flags; public int name_index; public int descriptor_index; public int attributes_count; public attribute_info [ ] attributes;
/** Convenience constructor. */ public field_info (ClassFile cf, int flags, int ni, int di) { access_flags = flags; name_index = ni ; descriptor_index = di; attributes_count = 0; attributes = new attribute_info [0] ; }
/** Constructor called only during the serialization process.
* <brxbr>
* This is intentionally left as package protected as we
* should not normally call this constructor directly.
* <br><br>
* Warning: the handling of len is not correct (after String s */ field_info (ClassFile cf, DatalnputStream in) throws IOException{ access_flags = in. readChar () ; name_index = in . readChar ( ) ; descriptor_index = in. readChar (); attributes_count = in. readChar (); attributes = new attribute_info[attributes_count] ; for (int i=0; i<attributes_count; i++) { in.mark (2) ;
String s = cf.constant_pool [in. readChar ()] .toString (); in. reset () ; if (s. equals ("ConstantValue") ) attributes [i] = new ConstantValue_attribute (cf, in); else if (s . equals ("Synthetic") ) attributes [i] = new Synthetic_attribute (cf, in); else if (s. equals ("Deprecated") ) attributes [i] = new Deprecated_attribute (cf, in); else attributes [i] = new attribute_info. Unknown (cf, in); } }
/** To serialize the contents into the output format.
*/ public void serialize (DataOutputStream out) throws IOException{ out. writeChar (access_flags) ; out.writeChar (name_index) ; out. writeChar (descriptor_index) ; out . writeChar (attributes_count) ; for (int i=0; i<attributes_count; i++) attributes [i] . serialize (out) ; }
G20. InnerClasses_attribute.java
Convience class for representing InnerClasses_attribute structures within ClassFiles. import java.lang.*; import java.io.*;
/** A variable length structure that contains information about an
* inner class of this class.
*/ public final class InnerClasses_attribute extends attribute_info{ public int number_of_classes; public classes [] classes; public final static class classes { int inner_class_info_index; int outer_class_info_index; int inner_name_index; int inner_class_access_flags; } public InnerClasses_attribute (ClassFile cf, int ani, int al, int noc, classes [] c) { super (cf) ; attribute_name_index = ani; attribute_length = al; number_of_classes = noc; classes = c; } /** used during input serialization by ClassFile only. */ InnerClasses_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; number_of_classes = in. readChar () ; classes = new InnerClasses_attribute. classes [number_of_classes] ; for (int i=0; i<number_of_classes; i++) { classes [i] = new classes (); classes [i] .inner_class_info_index = in. readChar (); classes [i] .outer_class_info_index = in. readChar (); classes [i] . inner_name_index = in. readChar (); classes [i] .inner_class_access_flags = in. readChar (); } }
/** Used during output serialization by ClassFile only. */ public void serialize (DataOutputStream out) throws IOException{ attribute_length = 2 + (number_of_classes * 8) ; super. serialize (out) ; out.writeChar (number_of_classes) ; for (int i=0; i<nuπiber_of_classes; i++) { out.writeChar (classes [i] .inner_class_info_index) ; out.writeChar (classes [i] .outer_class_info_index) ; out.writeChar (classes [i] . inner_name__index) ; out.writeChar (classes [i] .inner__class_access_flags) ; } }
G21. LineNumberTable attribute.java
Convience class for representing LineNumberTable_attribute structures within
ClassFiles. import java.lang.*; import java.io.*;
/** Determines which line of the binary code relates to the
* corresponding source code.
*/ public final class LineNumberTable_attribute extends attribute_info{ public int line_number_table__length; public line_number_table [ ] line_number_table; public final static class line_number_table{ int start_pc; int line_number; } public LineNumberTable_attribute (ClassFile cf, int ani, int al, int lntl, line_number_table [] Int) { super (cf) ; attribute_name_index = ani; attribute_length = al; line_number_table_length = lntl; line_number_table = Int; }
/** Used during input serialization by ClassFile only. */ LineNumberTable_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; line_number_table_length = in. readChar (); line_number_table = new
LineNumberTable_attribute . line_number_table [line_number_table_length] ; for (int i=0; i<line_number_table_length; i++) { line_number_table [i ] = new line_number_table ( ) ; line_number_table [i] . start_j?c = in . readChar ( ) ; line_number_table [ i] . line_number = in . readChar ( ) ; } }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ attribute_length = 2 + (line_number_table_length * 4) ; super. serialize (out) ; out.writeChar (line_number_table_length) ; for (int i=0; i<line_number_table_length; i++) { out .writeChar (line_number_table [i] .start_pc) ; out.writeChar (line_number_table [i] . line_nuinber) ;
} }
G22. LocalVariableTabIe_attribute.java
Convience class for representing LocalVariableTable_attribute structures within
ClassFiles. import java.lang.*; import j ava . io . * ;
/** Used by debugger to find out how the source file line number is linked
* to the binary code. It has many to one correspondence and is found in
* the Code_attribute. */ public final class LocalVariableTable_attribute extends attribute_info{ public int local_variable_table_length; public local_variable_table [ ] local_variable_table; public final static class local_variable_table{ int start_pc; int length; int name_index; int descriptor_index; int index; } public LocalVariableTable__attribute (ClassFile cf, int ani, int al, int lvtl, local_variable_table [] lvt) { super (cf) ; attribute__name_index = ani; attribute_length = al; local_variable_table_length = lvtl; local_variable_table = lvt; }
/** Used during input serialization by ClassFile only. */ LocalVariableTable_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; local_variable_table_length = in. readChar (); local_variable_table = new
LocalVariableTable_attribute. local_variable_table [local_variable_table_length] ; for (int i=0; i<local_variable_table_length; i++) { local_variable_table [i] = new local_variable_table () ; local_variable_table [i] .start_pc = in. readChar (); local_variable_table [i] .length = in. readChar (); local variable_table [i] .name index = in. readChar (); local_variable_table [i] .descriptor_index = in. readChar (); local variable table [i] . index = in. readChar ();
}
/** Used during output serialization by ClassFile only, void serialize (DataOutputStream out) throws IOException{ attribute_length = 2 + (local_variable_table__length 10); super . serialize (out) ; out.writeChar (local_variable_table_length) ; for (int i=0; i<local_variable_table_length; i++) { out.writeChar (local_variable_table [i] .start_pc) ; out.writeChar (local_variable_table [i] length) ; out . writeChar (local_variable_table [i] name_index) ; out.writeChar (local_variable_table [i] descriptor_index) out . writeChar (local_variable_table [i] index) ; } }
G23. method_info.java
Convience class for representing method_info structures within ClassFiles. import Java. lang. *; import java.io.*;
/** This follows the method_info in the JVM specification.
*/ public final class method_info { public int access_flags; public int name_index; public int descriptor_index; public int attributes_count; public attribute_info [] attributes;
/** Constructor. Creates a method_info, initializes it with
* the flags set, and the name and descriptor indexes given.
* A new uninitialized code attribute is also created, and stored
* in the <i>code</i> variable.*/ public method_info (ClassFile cf, int flags, int ni, int di, int ac, attribute_info [ ] a) { access_flags = flags; name_index = ni; descriptor_index = di; attributes_count = ac; attributes = a; }
/** This method creates a method_info from the current pointer in the * data stream. Only called by during the serialization of a complete
* ClassFile from a bytestream, not normally invoked directly. */ method_info (ClassFile cf, DatalnputStream in) throws IOException{ access_flags = in.readChar (); name_index = in.readChar (); descriptor_index = in.readChar (); attributes_count = in.readChar (); attributes = new attribute_info [attributes_count] ; for (int i=0; i<attributes_count; i++) { in.mark(2) ;
String s = cf.constantjpool [in.readChar ()] .toString (); in. reset () ; if (s. equals ("Code") ) attributes [i] = new Code_attribute (cf, in); else if (s. equals ("Exceptions") ) attributes [i] = new Exceptions_attribute (cf, in); else if (s. equals ("Synthetic") ) attributes [i] = new Synthetic_attribute (cf, in); else if (s. equals ("Deprecated") ) attributes [i] = new Deprecated_attribute (cf, in); else attributes [i] = new attribute_info. Unknown (cf, in); } }
/** Output serialization of the method_info to a byte array.
* Not normally invoked directly. */ public void serialize (DataOutputStream out) throws IOException{ out.writeChar (access_flags) ; out.writeChar (name_index) ; out . writeChar (descriptor_index) ; out.writeChar (attributes_count) ; for (int i=0; i<attributes__count; i++) attributes [i] . serialize (out) ; }
G24. SourceFiIe_attribute.java
Convience class for representing SourceFile_attribute structures within ClassFiles. import java.lang.*; import java.io.*;
/** A SourceFile attribute is an optional fixed_length attribute in
* the attributes table. Only located in the ClassFile struct only
* once . */ public final class SourceFile_attribute extends attribute_info{ public int sourcefile_index; public SourceFile_attribute (ClassFile cf, int ani, int al, int sfi) { super (cf) ; attribute_name__index = ani; attribute_length = al; sourcefile_index = sfi; } /** Used during input serialization by ClassFile only. */ SourceFile_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; sourcefile_index = in.readChar () ; }
/** Used during output serialization by ClassFile only. */ void serialize (DataOutputStream out) throws IOException{ attribute_length = 2; super . serialize (out) ; out.writeChar (sourcefile_index) ; )
G25. Synthetic_attribute.java
Convience class for representing Synthetic_attribute structures within ClassFiles. import Java. lang. *; import java . io . * ;
/** A synthetic attribute indicates that this class does not have
* a generated code source. It is likely to imply that the code
* is generated by machine means rather than coded directly. This
* attribute can appear in the classfile, method_info or field_info.
* It is fixed length. */ public final class Synthetic_attribute extends attribute_info{ public Synthetic_attribute (ClassFile cf, int ani, int al) { super (cf) ; attribute_name_index = ani; attribute_length = al; }
/** Used during output serialization by ClassFile only. */ Synthetic_attribute (ClassFile cf, DatalnputStream in) throws IOException{ super (cf, in) ; }
G26. A compiled portion of an example application before modification
Method void run()
0 getstatic #2 <Field java.lang.Object LOCK> 3 duρ 4 astore 1 5 monitorenter
6 getstatic #3 <Field int counter>
9 iconst_l lO iadd
11 putstatic #3 <Field int counter> 14 aload_l 15 monitorexit 16 return
G27. The compiled portion of G26 after modification. The modifications are highlighted in bold.
Method void run() 0 getstatic #2 <Field java.lang.Object LOCK>
3 dup
4 astore_l
5 dup
6 monitorenter
7 invokestatic #23 <Method void acquireLock(java.lang.Object)>
10 getstatic #3 <Field int counter>
13 iconst_l
14 iadd
15 putstatic #3 <Field int counter> 18 Idc_w #26 <example>
21 sipush 1
24 invokestatic #32 <LockTable.record(java.lang.Object, int)>
27 aload_l
28 dup
29 invokestatic #24 <Method void releaseLock(java.lang.Object)>
32 monitorexit
33 return
G28 The uncompiled source code of the code of G26 import java.lang. *;
public class example {
/** Shared static field. */ public final static Object LOCK = new Object ();
/** Shared static field. */ public static int counter = 0;
/** Example method using synchronization. This method serves to illustrate the use of synchronization to implement thread-safe modification of a shared memory location by potentially multiple threads. */ public void run ( ) {
// First acquire the lock, otherwise any memory writes we do will be // prone to race-conditions, synchronized (LOCK) {
// Now that we have acquired the lock, we can safely modify memory
// in a thread-safe manner. counter++;
G29. This excerpt is the source code of the lock client which implements the communication between the distributed run time of each computer.
import java.lang.*; import java.util . *; import java.net.*; import java.io.*;
public class LockClient{
/** Protocol specific values. */ public final static int CLOSE = -1; public final static int NACK = 0; public final static int ACK = 1; public final static int ACQUIRE_LOCK = 10; public final static int RELEASE_LOCK = 20; public final static int CLASS_TYPE = 30; public final static int OBJECT TYPE = 40;
/** LockServer network values. */ public final static String serverAddress =
System. getProperty ("LockServer_network_address") ; public final static int serverPort =
Integer. parselnt (System. getProperty ("LockServer_network_port") ) ;
/** Table of global ID'S for local objects. (hashcode-to-globalID mappings) */ public final static Hashtable hashCodeToGlobalID = new Hashtable ();
/** Called when an application is to acquire a lock. */ public static void acquireLock (Object o) {
// First of all, we need to resolve the globalID for object O'.
// To do this we use the hashCodeToGlobalID table. int globalID = ((Integer) hashCodeToGlobalID. get (o) ) .intValue ();
try{
// Next, we want to connect to the LockServer, which will grant us // the global lock.
Socket socket = new Socket (serverAddress, serverPort); DataOutputStream out = new
DataOutputStream(socket.getOutputStream() ) ; DatalnputStream in = new DatalnputStream(socket . getInputStream( ));
// Ok, now send the serialized request to the lock server, out.writelnt (ACQUIRE_LOCK) ; out.writelnt (globalID) ; out . flush ( ) ;
// Now wait for the reply. int status = in. readlnt () ; // This is a blocking call. So we
// will wait until the remote side // sends something.
if (status == NACK) { throw new AssertionError ("Negative acknowledgement. Request"
+ " failed.") ; }else if (status != ACK) { throw new AssertionError ("Unknown acknowledgement: " + status + + " . Request failed. ") ;
}
int count = in. readlnt () ; for {int i=0; i<count; i++) {
// Decode the command. int command = in. readByte () ; // Tells whether its
// classtype or objecttype.
Object reference = null;
Field [] fields; if (command == OBJECT TYPE) { // This entry in the table is // an object entry
// Decode global id. int globalID = in. readlnt ();
// Now, need to resolve the object in question, reference = globallDToObject .get (new Integer (globalID) );
// Next, get the array of fields for this object, fields = reference. getClass () .getDeclaredFields () ;
}else if (command == CLASS_TYPE) { // This entry in the table
// is a class entry
// Decode the classname. int nameLength = in. readlnt (); byte[] buffer = new byte [nameLength] ; in. read (buffer, 0, nameLength);
String name = new String (buffer, 0, nameLength);
// Forcibly assign the reference to null, reference = null;
// Next, get the array of fields for this class. fields = LockLoader.loadClass (name) .getDeclaredFields () ;
// Decode the field id. int fieldID = in. readlnt ( ) ;
// Determine value length based on corresponding field type. Field field = fields [fieldID] ; Class type = field. getType (); if (type == Boolean. TYPE) { boolean v = (in.readO == 1 ? true : false); field. setBoolean (reference, v) ; }else if (type == Byte. TYPE) { byte v = in. readByte () ; field. setByte (reference, v) ; }else if (type == Short. TYPE){ short v = in.readShort () ; field. setShort (reference, v) ; }else if (type == Character. TYPE) { char v = in.readChar () ; field. setChar (reference, v) ; }else if (type == Integer. TYPE) { int v = in. readlnt () ; field. setlnt (reference, v) ; }else if (type == Float. TYPE){ float v = in. readFloat () ; field. setFloat (reference, v) ; }else if (type == Long. TYPE) { long v = in. readLongt) ; field. setLong (reference, v) ; }else if (type == Double. TYPE) { double v = in. readDouble ( ) ; field. setDouble (reference, v) ; }else{ throw new AssertionError ("Unsupported type."); }
// Lastly, initialise the locktable. LockTable . init ( ) ;
// Close down the connection, out. writelnt (CLOSE) ; out . flush ( ) ; out. close () ; in. close ( ) ;
socket. close () ; // Make sure to close the socket.
// This is a good acknowledgement, thus we can return now because
// global lock is now acquired. return;
} catch (IOException e) { throw new AssertionError ("Exception: " + e.toString () ) ; }
/** Called when an application is to release a lock. */ public static void releaseLock (Object o) {
// First of all, we need to resolve the globalID for object O'.
// To do this we use the hashCodeToGlobalID table. int globalID = ((Integer) hashCodeToGlobalID. get (o) ). intValue ();
try{
// Next, we want to connect to the LockServer, which records us as // the owner of the global lock for object O1. Socket socket = new Socket (serverAddress, serverPort) ; DataOutputStream out = new
DataOutputStream (socket. getOutputStream () ) ; DatalnputStream in = new DataInputStream(socket.getInputStream() ) ;
// Ok, now send the serialized request to the lock server, out.writelnt (RELEASE_LOCK) ; out.writelnt (globalID) ;
LockTable table = LockTable . getCurrentLockTable () ;
// Write the count to the outputstream. out . writelnt (table . getCount ( ) ) ;
// Now we need to record each entry in the table. Object [] references = table. getReferences ();
for (int i=0; Preferences. length; i++) {
boolean!] entry = LockTable.getEntry (reference) ; for (int j=0; j<entry. length; j++) {
if (! entry [J]) continue;
Object reference = references [i] ; Field [] fields;
boolean[] entry = table. getEntry (reference) ;
if (reference instanceof String) { // Propagate_class
// field operation.
out. write (CLASSJTYPE) ;
String name = (String) reference; int length = name . length ( ) ; out. writelnt (length) ;
byte[] bytes = name. getBytes ( ) ; out. write (bytes, 0, length);
fields = LockLoader.loadClass (
(String) reference) . getDeclaredFields ( ) ; reference = null;
}else{ // Propagate_object field operation,
out. write (OBJECTJTYPE) ;
int globalID = ( (Integer) objectToGloballD. get ( reference) ) . intValue ( ) ;
out. writelnt (globalID) ;
fields = reference. getClass () .getDeclaredFields () ; // Encode value.
Class type = fields [j] .getType (); if (type == Boolean. TYPE) { out. write (fields [j ] .getBoolean (reference) ? 1 : 0) ; }else if (type == Byte. TYPE) { out . writeByte (fields [j ] . getByte (reference) ) ; }else if (type == Short. TYPE){ out.writeShort (fields [j ] .getShort (reference) ) ; }else if (type == Character. TYPE) { out. writeChar (fields [j] .getChar (reference) ) ; Jelse if (type == Integer. TYPE){ out.writelnt (fields [j ] .getlnt (reference) ) ; }else if (type == Float. TYPE){ out.writeFloat (fields [j ] .getFloat (reference) ) ; }else if (type == Long.TYPE) { out. writeLong(fields [j ] . getLong (reference) ) ; }else if (type == Double. TYPE) { out.writeDouble (fields [j ] .getDouble (reference) ) ; }else{ throw new AssertionError ("Unsupported type."); }
// Lastly, remove the LockTable. LockTable . clear ( ) ;
// Flush the outputstream. out . flush ( ) ;
// Now wait for the reply. int status = in.readlnt () ; // This is a blocking call. So we
// will wait until the remote side // sends something.
if (status == NACK) { throw new AssertionError ("Negative acknowledgement. Request " + "failed.") ; }else if (status != ACK) { throw new AssertionError ("Unknown acknowledgement: " + status +
". Request failed."); }
// Close down the connection, out. writelnt (CLOSE) ; out. flush () ; out. close ( ) ; in. close () ;
socket. close () ; // Make sure to close the socket.
// This is a good acknowledgement, return because global lock is
// now released. return;
} catch (IOException e) { throw new AssertionError ("Exception: " + e. toString ( ) ) ; }
G30. This excerpt is the source code of the lock server which implements the lock mechanism on the server computer. The lock server communicates with the lock client code of each application program running machine. import java.lang.*; import java.util.*; import java.net.*; import java.io.*;
public class LockServer implements Runnable{
/** Protocol specific values */ public final static int CLOSE = -1; public final static int NACK = 0; public final static int ACK = 1; public final static int ACQUIRE_LOCK = 10; public final static int RELEASE_LOCK = 20; public final static int CLASS_TYPE = 30; public final static int OBJECT TYPE = 40;
/** LockServer network values. */ public final static int serverPort = 20001;
/** Table of lock records. */ public final static Hashtable locks = new HashtableO;
/** Linked list of waiting LockManager objects. */ public LockServer next = null;
/** Address of remote LockClient. */ public final String address;
/** Private input/output objects. */ private Socket socket = null; private DataOutputStrearα outputStream; private DatalnputStream inputStream;
public static void main (String [] s) throws Exception{
System. out . println ("LockServer_network_address=" +
InetAddress . getLocalHost ( ) . getHostAddress ( ) ) ; System. out .println ("LockServer_network_port=" + serverPort);
// Create a serversocket to accept incoming lock operation
// connections.
ServerSocket serverSocket = new ServerSocket (serverPort) ;
while (! Thread. interrupted () ){
// Block until an incoming lock operation connection. Socket socket = serverSocket. accept (); // Create a new instance of LockServer to manage this lock
// operation connection. new Thread(new LockServer (socket) ). start ();
/** Constructor. Initialise this new LockServer instance with necessary resources for operation. */ public LockServer (Socket s) { socket = s; try{ outputStream = new DataOutputStream(s.getOutputStream() ) ; inputstream = new DataInputStream(s.getInputStream() ) ; address = s . getlnetAddress ( ) . getHostAddress ( ) ; } catch (IOException e) { throw new AssertionError ("Exception: " + e.toStringO ) ; } }
/** Main code body. Decode incoming lock operation requests and execute accordingly. */ public void run ( ) {
try{
// All commands are implemented as 32bit integers.
// Legal commands are listed in the "protocol specific values"
// fields above. int command = inputstream. readlnt ();
// Single command socket only.
if (command == ACQUIRE_LOCK) { // This is an ACQUIRE_LOCK
// operation.
// Read in the globalID of the object to be locked, int globalID = inputstream. readlnt (); // Synchronize on the locks table in order to ensure thread- // safety, synchronized (locks) {
// Check for an existing owner of this lock. LockServer lock = (LockServer) locks .get (new Integer (globallD) ) ;
if (lock == null) { // No-one presently owns this lock, so // acquire it.
locks. put (new Integer (globallD) , this);
acquireLock() ; // Signal to the client the successful // acquisition of this lock.
}else{ // Already owned. Append ourselves
// to end of queue.
// Search for the end of the queue. (Implemented as
// linked-list) while (lock. next != null) { lock = lock. next; }
lock. next = this; // Append this lock request at end. }
}
Jelse if (command — RELEASE_LOCK) { // This is a RELEASE_LOCK
// operation.
// Read in the globallD of the object to be locked, int globallD = inputStream. readlnt ( ) ;
// Synchronize on the locks table in order to ensure thread- // safety, synchronized (locks) {
// Check to make sure we are the owner of this lock. LockServer lock = (LockServer) locks . get (new Integer (globallD) ) ;
if (lock == null) { throw new AssertionError ("Unlocked. Release failed."); }else if (lock. address != this. address ){ throw new AssertionError ("Trying to release a lock which"
+ "this client doesn't own. Release failed."); }
// Next we need to read in the locktables sent with the // release lock operation. byte[] buffer = new byte [10240]; // What length? int off = 0, len = 0; while ((len = in. read (buffer, off, buffer. length-off) ) != -1) { off += len; if (buffer. length == off) { byte[] b2 = new byte [buffer. length*2] ; System. arraycopy (buffer, 0, b2, 0, buffer. length) ; buffer = b2; } }
// Now check that the last 4 bytes are CLOSE. int cmd = (( (buffer [off-4] & Oxff) « 24) | ( (buffer [off-3] &
Oxff) « 16) I
( (buffer [off-2] & Oxff) « 8) | (buffer [off-1] & Oxff)); if (cmd != CLOSE) { throw new AssertionError ("End Of InputStream reached
+ "without a CLOSE message."); }
lock = lock. next; if (lock != null) {
lock. acquireLock (buffer, 0, off); // Signal to the client
// the successful // acquisition of this // lock.
// Shift the linked list of pending acquisitions forward // by one. locks.put (new Integer (globallD) , lock); }
// Clear stale reference, next = null; }
releaseLockO ; // Signal to the client the successful release of // this lock.
}else{ // Unknown command. throw new AssertionError ("Unknown command. Operation failed."); }
}catch (Exception e) { throw new AssertionError ("Exception: " + e.toStringO ) ; } finally{ try{
// Closing down. Cleanup this connection. outputStream. flush ( ) ; outputStream. close ( ) ; inputStream. close ( ) ; socket .close () ; }catch (Throwable t) { t . printStackTrace ( ) ; }
// Garbage these references. outputStream = null; inputStream = null; socket = null; }
/** Send a positive acknowledgement of an ACQUIRE_LOCK operation, (with the supplied table) */ public void acquireLock (byte [] b, int off, int len) throws IOException{ outputStream.writelnt (ACK) ; outputStream.write (b, off, len) ; outputStream. flush ( ) ; } /** Send a positive acknowledgement of an ACQUIRE_LOCK operation, (without a table) */ public void acquireLockO throws IOExceptionf outputStream.writelnt (ACK) ; outputStream.writelnt (0) ; outputStream. flush ( ) ; }
/** Send a positive acknowledgement of a RELEASE_LOCK operation. */ public void releaseLock ( ) throws IOException{ outputStream.writelnt (ACK) ; outputStream. flush ( ) ; }
G31. LockLoader.java
This excerpt is the source-code of LockLoader, which modifies an application as it is being loaded.
import java.lang.*; import java.io.*; import j ava . net . * ; public class LockLoader extends URLClassLoader{
public LockLoader (URL [] urls) { super (urls) ; }
protected Class findClass (String name) throws ClassNotFoundException{
ClassFile cf = null; try{
BufferedlnputStream in = new
BufferedInputStream(findResource (name. replace (' . ', '/' ) .concat (" .class") ) .openStream() ) ; cf = new ClassFile (in) ; }catch (Exception e) {throw new ClassNotFoundException(e.toString() ) ; } // Class-wide pointers to the enterindex and exitindex. int enterindex = -1; int exitindex = -1; int alertindex = -1; int ldcindex = -1;
for (int i=0; i<cf.methods_count; i++) { for (int j=0; j<cf .methods [i] . attributes_count; j++) { if (! (cf.methods [i] .attributes [j ] instanceof Code_attribute) ) continue;
Code_attribute ca = (Code_attribute) cf .methods [i] .attributes [j] ; boolean changed = false, acquiredLock = false; for (int z=0; z<ca. code. length; z++) { if ( (ca. code [Z] [0] & Oxff) == 194) { // Opcode for a // MONITORENTER // instruction. changed = true; acquiredLock = true; // This indicates that a lock is
// acquired and until released,
// memory writes
// must be recorded.
// Next, realign the code array, making room for the
// insertions. byte[] [] code2 = new byte [ca. code. length+2] [];
System. arraycopy (ca. code, 0, code2, 0, z) ; code2 [ z+l ] = ca . code [ z ] ;
System. arraycopy (ca. code, z+1, code2, z+3, ca . code . length- (z+1) ) ; ca.code = code2;
// Next, insert the DuP instruction. ca.code[z] = new byte [I]; ca.code[z] [0] = (byte) 89;
// Finally, insert the INVOKESTATIC instruction, if (enterindex == -1) {
// This is the first time this class is encourtering
// the acquirelock
// instruction, so have to add it to the constant pool. cp_info[] cpi = new cp_info[cf .constant_pool. length+6] ;
System. arraycopy (cf.constant_pool, 0, cpi, 0, cf . constant_pool . length) ; cf. constant_pool = cpi; cf . constant_pool_count += 6;
CONSTANTJJtf8_info ul = new
CONSTANT_Utf8_info ("LockClient") ; cf . constant_pool [cf .constant_pool. length-6] = ul;
CONSTANT_Class_info cl = new CONSTANT_Class_info ( cf .constant_pool_count-6) ; cf . constant_jpool [cf . constant_pool. length-5] = cl; ul = new CONSTANT_Utf8_info("acquireLock") ; cf.constant_pool [cf .constant_pool.length-4] = ul; ul = new CONSTANT_Utf8_info(" (Ljava/lang/Object; ) V") ; cf . constant_j?ool [cf .constant_pool.length-3] = ul;
CONSTANT_NameAndType_info nl = new
CONSTANT_NameAndType_info ( cf . constant_pool . length-4 , cf . constant_pool . length-3 ) ; cf .constant_pool [cf .constant_pool. length-2] = nl;
CONSTANT_Methodref_info ml = new CONSTANT_Methodref_info ( cf. constant_pool . length-5, cf . constant_pool . length-2 ) ; cf . constant_pool [cf .constant_pool . length-1] = ml; enterindex = cf . constant_pool.length-l; } ca.code[z+2] = new byte [3]; ca.code[z+2] [0] = (byte) 184; ca.code[z+2] [1] = (byte) ((enterindex » 8) & Oxff); ca.code [z+2] [2] = (byte) (enterindex & Oxff);
// And lastly, increase the CODE_LENGTH and
// ATTRIBUTE_LENGTH values. ca . code_length += 4 ; ca. attribute_length += 4; z += 1;
}else if ( (ca.code [z] [0] & Oxff) == 195) { // Opcode for a
// MONITOREXIT // instruction, changed = true; acquiredLock = false; // This indicates that the lock is
// now released and so memory // writes no longer // require recording.
// Next, realign the code array, making room for the
// insertions. byte [] [] code2 = new byte [ca.code. length+2] [];
System. arraycopy (ca. code, 0, code2, 0, z) ; code2[z+l] = ca. code [z];
System. arraycopy (ca.code, z+1, code2, z+3, ca . code . length- (z+1 ) ) ; ca.code = code2;
// Next, insert the DUP instruction. ca.code[z] = new byte [I]; ca.code[z] [0] = (byte) 89;
// Finally, insert the INVOKESTATIC instruction, if (exitindex == -1) {
// This is the first time this class is encourtering
// the acquirelock // instruction, so have to add it to the constant pool. cp_info[] cpi = new cp_info[cf .constant_pool.length+6] ; System. arraycopy(cf.constant_pool, 0, cpi, 0, cf . constant_pool . length) ; cf . constant_pool = cpi; cf . constant_pool_count += 6;
CONSTANT_Utf8_info ul = new CONSTANT_ϋtf8_info("LockClient") ; cf. constant_pool [cf. constant_pool . length-6] = ul;
CONSTANT_Class_info cl = new CONSTANT_Class_info ( cf . constant_pool_count-6) ; cf . constant_pool [cf ,constant_pool . length-5] = cl; ul = new CONSTANT_Utf8_info("releaseLock") ; cf. constant_pool [cf. constant_pool. length-4] = ul; ul = new CONSTANT_Utf8_info(" (Ljava/lang/Object; )V") ; cf . constant_j?ool [cf.constant_pool. length-3] = ul;
CONSTANT_NameAndType_info nl = new CONSTANT_NameAndType_info ( cf . constant_pool . length-4 , cf. constant_pool . length-3) ; cf . constant_pool [cf . constant_pool . length-2] = nl;
CONSTANT_Methodref_info ml = new CONSTANT_Methodref_info ( cf . constant_pool . length-5, cf . constant_pool . length-2 ) ; cf . constant_pool [cf.constant_pool . length-1] = ml; exitindex = cf. constant_pool. length-1; } ca.code[z+2] = new byte [3]; ca.code[z+2] [0] = (byte) 184; ca.code[z+2] [1] = (byte) ((exitindex » 8) & Oxff); ca.code[z+2] [2] = (byte) (exitindex & Oxff);
// And lastly, increase the CODE_LENGTH and // ATTRIBUTE_LENGTH values. ca.code_length += 4; ca . attribute_length += 4 ; z += 1;
}else if ( (ca.code [z] [0] & Oxff) == 179 && acquiredLock) { PUTSTATIC instruction. changed = true;
// The code below only supports fields in this class.
// Thus, first off, check that this field is local to this
// class.
CONSTANT_Fieldref_info fi = (CONSTANT_Fieldref_info) cf . constant_pool [
( int) ( ( ( ca . code [ z ] [ 1 ] & Oxff ) « 8 ) | ( ca . code [ z ] [ 2 ] &
Oxff) ) ] ; CONSTANT_Class_info ci = (CONSTANT_Class_info) cf . constant_pool [ fi . class_index] ; String className = cf . constant_pool [ci . name_index] . toString O ; if (!name. equals (className) ){ throw new AssertionError ("This code only supports" + " fields local to this class");
// Ok, now search for the fields name and index. int index = 0;
CONSTANT_NameAndType_info ni = (CONSTANT_NameAndType_info) cf. constant_j?ool [fi.name_and_type_index] ; String fieldName = cf. constant_pool [ni.name_index] .toString() ; for (int a=0; a<cf. fields__count; a++) {
String fn = cf. constant_pool [cf. fields [a] .name_index] . toStringO ; if (fieldName. equals (fn) ){ index = a; break;
} }
// Next, realign the code array, making room for the
// insertions. byte[] [] code2 = new byte [ca. code. length+3] [];
System. arraycopy (ca. code, 0, code2, 0, z+1) ;
System. arraycopy (ca. code, z+1, code2, z+4, ca.code.length-
(z+D); ca . code = code2;
// Next, insert the LDC_W instruction, if (ldcindex == -1) {
CONSTANT_String_info csi = new
CONSTANT_String_info (ci . name_index) ; cp_info[] cpi = new cp_info [cf.constant_pool.length+l] ;
System. arraycopy (cf. constant_pool, 0, cpi, 0, cf. constant_pool . length) ; cpi [cpi. length - 1] = csi; ldcindex = cpi . length-1; cf.constant_pool = cpi; cf. constant_pool_count++; } ca. code [z+1] = new byte [3]; ca.code[z+l] [0] = (byte) 19; ca.code[z+l] [1] = (byte) ((ldcindex » 8) & Oxff); ca.code[z+l] [2] = (byte) (ldcindex & Oxff);
// Next, insert the SIPUSH instruction. ca.code[z+2] = new byte [3]; ca.code[z+2] [0] = (byte) 17; ca.code[z+2] [1] = (byte) ((index » 8) & Oxff); ca.code[z+2] [2] = (byte) (index & Oxff);
// Finally, insert the INVOKESTATIC instruction, if (alertindex == -1) {
// This is the first time this class is encourtering
// the alert
// instruction, so have to add it to the constant pool. cp_info[] cpi = new cp__info [cf. constant_pool . length+6] ;
System. arraycopy (cf. constant_pool, 0, cpi, 0, cf. constantjpool . length) ; cf. constant_pool = cpi; cf . constant_pool_count += 6;
CONSTANT_Utf8_info ul = new
CONSTANT_Utf8_info ("LockTable") ; cf. constant_pool [cf. constant_pool. length-6] = ul;
CONSTANT_Class_info cl = new CONSTANT_Class_info ( cf .constant_pool_count-6) ; cf .constant_pool [cf .constant_pool. length-5] = cl; ul = new CONSTANTJJtf8_info ( "record" ); cf . constant_j?ool [cf . constant_pool . length-4 ] = ul; ul = new CONSTANT_Utf8_info("(Ljava/lang/Object;I)V"); cf . constant_pool [cf ,constant_pool.length-3] = ul;
CONSTANT_NameAndType_info nl = new
CONSTANT_NameAndType_info ( cf . constant_pool . length-4 , cf. constant_pool . length-3) ; cf. constant_pool [cf.constant_pool.length-2] = nl;
CONSTANT_Methodref_info ml = new CONSTANT_Methodref_info ( cf . constant_pool . length-5, cf. constant_pool . length-2) ; cf . constant_pool [cf . constant_pool . length-1] = ml; alertindex = cf.constant_pool. length-1; } ca.code[z+3] = new byte [3]; ca.code[z+3] [0] = (byte) 184; ca.code[z+3] [1] = (byte) ((alertindex » 8) & Oxf£) ; ca.code[z+3] [2] = (byte) (alertindex & Oxff) ;
// And lastly, increase the CODE_LENGTH and
// ATTRIBUTE_LENGTH values. ca . code_length += 9; ca. attribute_length += 9;
}
// If we changed this method, then increase the stack size by
// one. if (changed) { ca.max_stack++; // Just to make sure. } } }
try{
ByteArrayOutputStream out = new ByteArrayOutputStream( ) ; cf . serialize (out) ; byte[] b = out.toByteArray () ; return defineClass (name, b, 0, b. length); } catch (Exception e) { throw new ClassNotFoundException (name) }
G32. LockTable.java
This excerpt is the source-code of LockTable, which implements the tables for recording writes made during the ownership of a lock.
import java.lang.*; import java.util. *; import java.io.*; import j ava . net . * ; public class LockTable {
/** Entries within this table. */ public HashMap entries = new HashMap ( ) ;
/** Count of the number of entries in this locktable. */ public int count = 0;
/** Table of all LockTables. */ public static HashMap tables = new HashMap ();
/** Return the count field. */ public int getCount ( ) { return count; }
/** Add a locktable to the set of tables. */ public static void init(){ tables. put (Thread. currentThreadO , new LockTable ()); }
/** Remove a locktable from the set of tables. */ public static void clear (){ tables . remove (Thread. currentThread ( ) ) ; }
/** Record a write to this field/object pair */ public static void record(Object reference, int fid) {
LockTable table = tables .get (Thread. currentThread ()); if (table == null) { throw new AssertionKrror ("Table cannot be null."); } table. record (reference, fid); }
/** Return the locktable for this current thread. */ public static LockTable getCurrentLockTable () { return (LockTable) tables. get (Thread. currentThreadO ); }
/** Return all the references for this table. */ public Object! ] getReferences () { return getCurrentLockTable ( ) . entries . keySet ( ) . toArray ( ) ; }
/** Record a write in this table. */ public void record (Object reference, int fid) { boolean [] entry = entries . get (reference) ; if (entry == null) { // This is the first write to this object, if (reference instanceof String) { entry = new boolean [LockLoader. loadClass (
(String) reference) . getDeclaredFields ( ) . length] ; }else{ entry = new boolean! reference . getClass ( ) . getDeclaredFields ( ) . length] ; } } if (! entry [fid]) count++; entry [fid] = true; }

Claims

1. In a multiple computer environment in which different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of a plurality of computers, each having a local memory and each being interconnected via a communications network, and in which at least one memory location is replicated in the memory of each said plurality of computers, and after each occasion at which each said memory location has its contents written to, or re-written, with a new content, all said corresponding memory locations of said computers are in due course updated via said communications network with said new content, the further improvement comprising the steps of:
(i) prior to initially writing said new content, acquiring a lock on an object, asset or resource,
(ii) recording the name and updated content of said local memory locations written to prior to releasing said lock,
(iii) releasing said lock, and
(iv) prior to permitting the acquisition of the same lock by another one of said computers, transmitting said updated memory location(s) and updated content(s) to said another one computer, whereby any said computer on acquiring said lock has acquired said previously updated contents without needing to wait for said in due course updating of all said computers.
2. The improved method as claimed in claim 1 in which each said computer has an independent local memory accessible only by the corresponding portion of said application program.
3. The improved method as claimed in claim 1 or 2 in which the object, asset or resource locked is the object, asset or resource to which said new content is to be written.
4. The improved method as claimed in claim 3 including the further step of:
(v) transmitting in step (iv) all memory locations and contents updated in step (ii).
5. The improved method as claimed in claim 3 including the further step of:
(vi) transmitting in step (iv) all memory locations and only their final contents as updated in step (ii).
6. The improved method as claimed in claim 3 including the further steps of:
(vii) prior to acquiring said lock, detecting all applications program steps which potentially write to listed memory location(s), and
(viii) recording the name of said listed memory location(s) prior to releasing said lock.
7. The improved method as claimed claim 6 wherein said detecting all application program steps takes place either before loading, or during loading, or after loading but before execution of the relevant code.
8. The improved method as claimed in claim 6 or 7 wherein said recording of the name of said listed memory locations takes place either at the time of detection or at the time of execution of an detected program step.
9. The improved method as claimed in claim 6 including the further step of:
(ix) for each recorded memory location recording all contents updated in step (ii).
10. The improved method as claimed in claim 6 including the further step of:
(x) for each recorded memory location recording only the final contents as updated in step (ii).
11. A computer system comprising a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of said plurality of computers, at least one memory location is replicated in the local memory of each said computer, said system further comprising updating means associated with each said computer to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or rewritten, with a new content, and lock means associated with each said computer to acquire a lock on an object, asset or resource, said lock means including a recording means in which is recorded the name and updated content of all said local memory locations written to prior to releasing said lock, and said lock means after releasing said lock and prior to permitting the acquisition of the same lock by another one of said computers transmitting said updated memory location(s) and updated content(s) to said another one computer, whereby any said computer on acquiring said lock has acquired said previously updated contents without needing to wait for said in due course updating of all said computers.
12. The computer system as claimed in claim 11 wherein each said computer has an independent local memory accessible only by the corresponding portion of said application program.
13. The system as claimed in claim 11 wherein the object, asset or resource locked is the object asset or resource to which said new content is written.
14. The computer system as claimed in claim 11 or 12 wherein said lock means comprises a lock server computer in addition to said plurality of computers, and also connected to said plurality of computers via said communications network.
15. The computer system as claimed in any one of claim 11-13 wherein said recording means comprises a look up table.
16. The computer system as claimed in claim 14 wherein said look up table includes all contents updated for each recorded memory location.
17. The computer system as claimed in claim 14 wherein said look up table includes only the final content of each updated content for each recorded memory location.
18. The computer system as claimed in any one of claims 14-16 wherein the contents of said look up table comprises the address of a memory location at which said updated content is stored.
19. A plurality of computers interconnected via a communications network and operable to ensure carrying out of the method as claimed in any one of claims 1- 10.
20. A computer program product comprising a set of program instructions stored in a storage medium and operable to permit a plurality of computers to carry out the method as claimed in any one of claims 1-10.
21. A single computer intended to operate in a multiple computer system which comprises a plurality of computers each having a local memory and each being interconnected via a communications network wherein different portions of at least one application program each written to execute on only a single computer, each execute substantially simultaneously on a corresponding one of said plurality of computers, and at least one memory location is replicated in the local memory of each said computer, said system further comprising updating means associated with each said computer to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content, said single computer comprising: a local memory having at least one memory location intended to be updated via a communications port connectable to said communications network, updating means to in due course update the memory locations of other substantially similar computers via said communications port; lock means associated with said local memory to acquire a lock on an object, asset or resource of said local memory, said lock means including a recording means in which is recorded the name and updated content of said local memory locations written to prior to releasing said lock, and said lock means after releasing said lock and prior to permitting the acquisition of the same lock by another one of said computers, transferring said updated memory location(s) and updated content(s) to said communications port for transmittal to said another one computer whereby any said another one computer on acquiring said lock has acquired said previously updated contents without needing to wait for said in due course updating of all said computers.
22. The computer as claimed in claim 21 wherein said local memory is an independent local memory accessible only by the corresponding portion of said application program executing on said computer.
23. The computer as claimed in claim 21 or 22 wherein the object, asset or resource locked is the object, asset or resource to which said new content is written.
24. The computer as claimed in any one of claims 21 - 23 wherein said lock means further includes a lock server computer connectable to said single computer via said communications network.
25. The computer as claimed in any one of claims 21 - 24 wherein said recording means comprises a look up table.
26. The computer as defined in claim 25 wherein said look up table includes all contents updated for each recorded memory location.
27. The computer as claimed in claim 25 wherein said look up table includes only the final content of each updated content for each recorded memory location.
28. The computer as claimed in any one of claims 25 - 27 wherein the contents of said look up table comprises the address of a memory location at which said updated content is stored.
29. In a single computer, adapted to interoperate with a plurality of other external computers as a multiple computer system wherein said computer has a local processor and a local memory coupled to the local processor and said computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on said single computer and said plurality of computers, and wherein at least one memory location is replicated in the local memory of each said computer, each said computer including memory location updating means to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re-written, with a new content; a method comprising: acquiring a lock on an object, asset, or resource of said local memory of said single computer prior to initially writing said new content; recording the name and updated content of said at least one local memory location of said single computer written to prior to releasing said lock; releasing said lock on said object, asset, or resource of said local memory of said single computer; and sending a communication of said updated memory location(s) and updated content(s) to other of said plurality of computers by said single computer over said Communications network.
30. The method as claimed in claim 29, further comprising: permitting but not requiring the acquisition of a new lock on the same object, asset, or resource by another one of said computers; wherein any said another one of said plurality of computers on acquiring said new lock has acquired said previously updated memory location contents without needing to wait for said in due course updating of the updated contents of all said plurality of computers.
31. The method as claimed in claim 30, further comprising: updating the local memory locations of other of the plurality of computers via said communications network in due course.
32. The method as claimed in claim 29, further comprising: generating a memory update message that includes said updated memory locations(s) and updated content(s) that are to be updated in due course in other of the computers, prior to sending said communication and sending said generated memory update message with said communication.
33. A computer program product comprising a set of program instructions stored in a storage medium and operable to permit a computer to carry out the method as claimed in any one of claims 29 to 32.
34. In a single computer, adapted to interoperate with a plurality of other external computers as a multiple computer system wherein said computer has a local processor and a local memory coupled to the local processor and said computers are at least intermittently interconnected via a communications network, and wherein different portions of an application program written to execute on only a one computer are modified to execute substantially simultaneously on said single computer and said plurality of computers, and wherein at least one memory location is replicated in the local memory of each said computer, each said computer including memory location updating means to in due course update each said memory location via said communications network after each occasion at which each said memory location has its content written to, or re- written, with a new content; a method comprising: receiving a communication of updated memory location(s) and updated content(s) to send by a different one of said plurality of computers by said single computer over said communications network; and updating the local memory locations of said single computer in response to said received communication.
35. The method of claim 34, wherein the communication received includes a memory update message that includes said updated memory locations(s) and updated content(s) that are to be updated in due course in the receiving computer.
36. A computer program product comprising a set of program instructions stored in a storage medium and operable to permit a computer to carry out the method as claimed in any one of claims 34 or 35.
PCT/AU2006/001445 2005-10-10 2006-10-05 Modified machine architecture with advanced synchronization WO2007041760A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2006301907A AU2006301907A1 (en) 2005-10-10 2006-10-05 Modified machine architecture with advanced synchronization

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
AU2005905579A AU2005905579A0 (en) 2005-10-10 Modified Machine Architecture with Advanced Synchronization
AU2005905579 2005-10-10

Publications (1)

Publication Number Publication Date
WO2007041760A1 true WO2007041760A1 (en) 2007-04-19

Family

ID=37942198

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/AU2006/001445 WO2007041760A1 (en) 2005-10-10 2006-10-05 Modified machine architecture with advanced synchronization

Country Status (1)

Country Link
WO (1) WO2007041760A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008040068A1 (en) * 2006-10-05 2008-04-10 Waratek Pty Limited Advanced synchronization and contention resolution

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998058330A2 (en) * 1997-06-16 1998-12-23 Telefonaktiebolaget Lm Ericsson Lingering locks for replicated data objects
WO2005103925A1 (en) * 2004-04-22 2005-11-03 Waratek Pty Limited Multiple computer architecture with synchronization

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998058330A2 (en) * 1997-06-16 1998-12-23 Telefonaktiebolaget Lm Ericsson Lingering locks for replicated data objects
WO2005103925A1 (en) * 2004-04-22 2005-11-03 Waratek Pty Limited Multiple computer architecture with synchronization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHAPIRO M. ET AL.: "Larchant-RDOSS: a Distributed Shared Persistent Memory and its Garbage Collector", LECTURE NOTES IN COMPUTER SCIENCE: PROCEEDINGS OF THE 9TH INTERNATIONAL WORKSHOP ON DISTRIBUTED ALGORITHMS, vol. 972, 1995, pages 198 - 214, XP003011818 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008040068A1 (en) * 2006-10-05 2008-04-10 Waratek Pty Limited Advanced synchronization and contention resolution

Similar Documents

Publication Publication Date Title
US20060265704A1 (en) Computer architecture and method of operation for multi-computer distributed processing with synchronization
US7761670B2 (en) Modified machine architecture with advanced synchronization
IL178527A (en) Modified computer architecture with coordinated objects
US20080195617A1 (en) Modified machine architecture with machine redundancy
US7739349B2 (en) Synchronization with partial memory replication
US7996627B2 (en) Replication of object graphs
US20080120478A1 (en) Advanced synchronization and contention resolution
US8122198B2 (en) Modified machine architecture with partial memory updating
US20080140970A1 (en) Advanced synchronization and contention resolution
WO2007041760A1 (en) Modified machine architecture with advanced synchronization
AU2006301908B2 (en) Modified machine architecture with machine redundancy
AU2006301907A1 (en) Modified machine architecture with advanced synchronization
EP1934776A1 (en) Replication of object graphs
AU2006301909B2 (en) Modified machine architecture with partial memory updating
WO2007041762A1 (en) Modified machine architecture with partial memory updating
WO2007041761A1 (en) Modified machine architecture with machine redundancy
AU2006238334A1 (en) Modified computer architecture for a computer to operate in a multiple computer system
AU2006301912A1 (en) Replication of object graphs
JP2009512081A (en) Multi-machine architecture with reduced overhead

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2006301907

Country of ref document: AU

ENP Entry into the national phase

Ref document number: 2006301907

Country of ref document: AU

Date of ref document: 20061005

Kind code of ref document: A

WWP Wipo information: published in national office

Ref document number: 2006301907

Country of ref document: AU

122 Ep: pct application non-entry in european phase

Ref document number: 06790315

Country of ref document: EP

Kind code of ref document: A1