TWI467491B - Method, system, and computer program product for modified computer architecture with coordinated objects - Google Patents
Method, system, and computer program product for modified computer architecture with coordinated objects Download PDFInfo
- Publication number
- TWI467491B TWI467491B TW95102934A TW95102934A TWI467491B TW I467491 B TWI467491 B TW I467491B TW 95102934 A TW95102934 A TW 95102934A TW 95102934 A TW95102934 A TW 95102934A TW I467491 B TWI467491 B TW I467491B
- Authority
- TW
- Taiwan
- Prior art keywords
- memory
- computers
- machine
- computer
- application
- Prior art date
Links
Landscapes
- Stored Programmes (AREA)
- Multi Processors (AREA)
Description
本發明係關於電腦及其它運算機器及資訊家電,尤指一種修正的電腦架構及程式結構,其使得一應用程式之作業透過使用一分散式執行時間(run time)的通信鏈結所互連的複數電腦可以同步或同時地進行,並可以達到改善效能。The present invention relates to computers and other computing machines and information appliances, and more particularly to a modified computer architecture and program structure that enables an application to be interconnected by using a decentralized run time communication link. Multiple computers can be synchronized or simultaneously and can achieve improved performance.
自從電腦及運算的出現,電腦之軟體皆是寫入一單一機器上運作。如第1圖所示,該先前技術之單一機器1係由一中央處理單元或CPU2所構成,其透過一匯流排4連接到記憶體3。同時連接到該匯流排4者為該單一機器1之多種其它功能性單元,像是螢幕5、鍵盤6及滑鼠7。Since the advent of computers and computing, the software of computers has been written to work on a single machine. As shown in Fig. 1, the prior art single machine 1 is constituted by a central processing unit or CPU 2, which is connected to the memory 3 through a bus bar 4. At the same time, the busbar 4 is connected to a plurality of other functional units of the single machine 1, such as a screen 5, a keyboard 6, and a mouse 7.
該機器1之效能的功能性限制為要由CPU 2操縱的資料及那些操縱的結果必須由該匯流排4所移動。該匯流排4會遭遇一些問題,包括所謂的匯流排「佇列」,其由想要取得存取到該匯流排之單元所形成,爭奪問題及類似者。這些問題某種程度上可由多種策略來消除,包括快取記憶體,但是這些策略總是會增加該機器1之管理負荷。The functionality of the performance of the machine 1 is limited to the data to be manipulated by the CPU 2 and the results of those manipulations must be moved by the busbar 4. The busbar 4 encounters some problems, including the so-called busbar "column", which is formed by the unit that wants to gain access to the busbar, competing for problems and the like. These problems can be eliminated to some extent by a variety of strategies, including cache memory, but these strategies always increase the management load of the machine 1.
自然地這些年來已有許多的嘗試要增加機器效能。一種方式係使用對稱性多處理器。此先前技術方式已經用於所謂的「超級」電腦,其架構示於第2圖。其中複數CPU 12係連接到一共通記憶體13。再次地,於該CPU 12與該記憶體13之間的通信會造成瓶頸。此僅有一種應用程式及該應用程式之記憶體之整個複本可分散在整個共通記憶體上。該單一應用程式可完全透通地由任何記憶體位置讀取以及寫入(即共享之意)。Naturally, there have been many attempts over the years to increase machine performance. One way is to use a symmetric multiprocessor. This prior art approach has been used for so-called "super" computers, the architecture of which is shown in Figure 2. The plurality of CPUs 12 are connected to a common memory 13. Again, communication between the CPU 12 and the memory 13 can cause a bottleneck. Only one application and the entire copy of the application's memory can be spread across the common memory. The single application can be read and written (ie shared) by any memory location in a completely transparent manner.
當有一些這種機器透過一網路互連時,此可藉由採用為一單一機器撰寫的單一應用程式,並將所需要的記憶體資源分成許多部份來達到。然後這些部份即分散在一些電腦之間以形成可由所有CPU 12存取的該共通記憶體13。此程序要依賴將該記憶體區格隔離或隱藏於該單一執行中應用程式。該效能在當一部機器上一CPU必須存取(透過一網路)實際上位在一不同機器上的一記憶體位置時即會降低。When some of these machines are interconnected through a network, this can be achieved by using a single application written for a single machine and dividing the required memory resources into many parts. These portions are then scattered between some computers to form the common memory 13 accessible by all CPUs 12. This program relies on isolating or hiding the memory cell from the single execution application. This performance is reduced when a CPU on a machine has to access (through a network) a memory location that is actually on a different machine.
雖然超級電腦已經在技術上成功地達到高運算速率,它們無法在商業應用上成功,因為它們本身的複雜性使得它們非常昂貴,不僅在於製造,同是也在於管理。特別是,該單一系統影像觀念從未能夠在大小尺寸上達到在商品化(或大量生產)之電腦及網路上運作。特別是,該單一系統影像觀念僅能夠在非常快速(且因此非常昂貴)的電腦上以非常快速(且同樣昂貴)的網路互連時才有實際的應用。Although supercomputers have been technically successful at achieving high computational speeds, they are not successful in commercial applications because their inherent complexity makes them very expensive, not only in manufacturing, but also in management. In particular, this single system imaging concept has never been able to operate on commercial (or mass-produced) computers and networks in size. In particular, this single system imaging concept can only be practically applied when it is interconnected on a very fast (and therefore very expensive) computer with very fast (and equally expensive) networks.
另一種增加電腦能力之可能性係透過使用複數部機器,其係由先前技術之分散式運算觀念中產生,其架構示於第3圖。在此已知配置中,一單一應用程式(Ap)係由其作者(或由熟悉該應用程式之其它程式師)畫分成多個分散的工作,藉此在例如三部機器上執行,第3圖中的例子n為整數3。此目的在於每部機器M1,...,M3會執行整個應用程式不同的三分之一,且目的是在於施加到不同機器之負荷大約相等。該等機器透過一網路14通信,其可用多種形式來提供,例如一通信鏈結、區域內部網路、區域外部網路及區域網路類似者。基本上這種網路14之作業速度大小會比在每部個別機器M1,M2,...,Mn中匯流排4之作業速度會慢一個等級。Another possibility to increase computer power is through the use of complex machines, which are derived from the prior art concept of decentralized computing, the architecture of which is shown in Figure 3. In this known configuration, a single application (Ap) is drawn into multiple distributed jobs by its author (or by other programmers familiar with the application), thereby executing on, for example, three machines, the third The example n in the figure is an integer 3. The purpose is that each machine M1,..., M3 will perform a different one-third of the entire application, and the purpose is that the loads applied to different machines are approximately equal. The machines communicate over a network 14, which can be provided in a variety of forms, such as a communications link, an intra-area network, an area external network, and a regional network. Basically, the operating speed of such a network 14 will be slower than that of the bus 4 in each individual machine M1, M2, ..., Mn.
分散式運算會遇到一些缺點。首先,要畫分該應用程式是很困難的工作,且必須人工進行。第二,在該網路14上傳遞資料、部份結果、結果及類似者為一項管理性負荷。第三,有需要畫分使其非常困難藉由使用更多的機器而可以更加擴大,因為已經被畫分成例如三份之應用程式無法在四部機器上良好此運作。第四,如果該等機器中的一部必須除能,整個系統之整體效能則會實質地降低。Decentralized operations encounter some drawbacks. First of all, it is very difficult to draw the application and it must be done manually. Second, the transfer of data, partial results, results, and the like on the network 14 is a management load. Third, there is a need to draw points to make it very difficult to use more machines to expand, because applications that have been drawn into three, for example, cannot work well on four machines. Fourth, if one of these machines must be de-energized, the overall performance of the overall system will be substantially reduced.
另一種先前技術的配置為透過「叢集」(clusters)做網路運算,其架構示於第4圖。在此方式中,整個應用程式被載入到每部機器上M1,M2,...,Mn。每部機器與一共用資料庫連繫,但不直接與其它機器通信。雖然每部機器執行相同的應用程式,每部機器係進行不同的工作,並僅使用其本身的記憶體。此即類似於一些窗口,其每一個會銷售火車票給公眾。此方式可以作業,並可擴大,其主要的缺點是其很難管理該網路。Another prior art configuration is to perform network operations through "clusters", the architecture of which is shown in Figure 4. In this way, the entire application is loaded onto each machine M1, M2,..., Mn. Each machine is associated with a shared repository but does not communicate directly with other machines. Although each machine executes the same application, each machine performs a different job and uses only its own memory. This is similar to some windows, each of which sells train tickets to the public. This method can be operated and expanded, and its main disadvantage is that it is difficult to manage the network.
在例如像是JAVA及MICROSOFT.NET之電腦語言中,程式師會使用到兩種主要型態的結構。在JAVA語言中,其已知為物件(objects)及類別(classes)。更概括而言,它們可稱之為資產。每次產生一物件(或其它資產),有一初始化例式(routine),其執行為一物件初始化(例如"<init>")例式。類似地,每此一類別被載入時,有一類別初始化例式,稱之為"<clinit>"。其它語言使用不同的用語,但利用一類似的觀念。但是在任一例中,沒有一種相等的「清除」或刪除例式,以在當一物件或類別(或其它資產)不再需要時即要刪除。反而此「清除」係在一背景模式中不引人注意地發生。In computer languages such as JAVA and MICROSOFT.NET, programmers use two main types of structures. In the JAVA language, it is known as objects and classes. More generally, they can be called assets. Each time an object (or other asset) is generated, there is an initialization routine that is initialized to an object (eg, "<init>"). Similarly, each time this category is loaded, there is a category initialization routine called "<clinit>". Other languages use different terms, but use a similar concept. In either case, however, there is no equivalent "clear" or delete instance to delete when an object or category (or other asset) is no longer needed. Instead, this "clearing" occurs unobtrusively in a background mode.
再者,於任何電腦環境中,其有需要取得及釋放一鎖定,以進行使用這種物件、類別、資產、資源或結構,用於避免該應用程式之不同部份嘗試在同時間使用相同的物件、類別、資產、資源或結構。在JAVA環境中,此即為同步化。同步化更通常稱之為專門使用一物件、類別、資源、結構或其它資產,以避免電腦或機器之間的爭奪。在JAVA中,此係藉由「監視進入」及「監試離開」指令或例式來達到。其它語言使用不同的用語,但利用一類似的觀念。Furthermore, in any computer environment, it is necessary to obtain and release a lock to use such an object, category, asset, resource or structure to prevent different parts of the application from attempting to use the same at the same time. Object, category, asset, resource, or structure. In the JAVA environment, this is synchronization. Synchronization is more commonly referred to as the exclusive use of an object, category, resource, structure, or other asset to avoid contention between computers or machines. In JAVA, this is achieved by the "monitor entry" and "monitoring leave" commands or examples. Other languages use different terms, but use a similar concept.
不幸地是習用的電腦系統、架構及操作方案並未提供運算環境及方法,其中一應用程式可以同時在任意複數部電腦上運作,其中該環境及操作方案可保證上述的記憶體管理、初始化、清除及同步化例式可在所有該等運算機器上以一致及協同的方式來作業。Unfortunately, the computer system, architecture and operation schemes that are not used do not provide a computing environment and method. One application can operate on any number of computers at the same time. The environment and operation scheme can ensure the above-mentioned memory management and initialization. The cleanup and synchronization routines work in a consistent and coordinated manner on all of these computing machines.
本發明揭示一種運算環境,其中一應用程式可在複數部電腦上同時作業。在這種環境中,其有利的是可保證上述的資產初始化、清除及同步化例式在所有該等機器上以一致及協同的方式作業。The present invention discloses a computing environment in which an application can simultaneously work on a plurality of computers. In such an environment, it is advantageous to ensure that the asset initialization, cleanup, and synchronization scenarios described above operate in a consistent and coordinated manner across all of the machines.
根據本發明第一態樣,其揭示一種多重電腦系統,其具有至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,但在由一通信網路互連的複數部電腦上同時執行,其中該應用程式之不同部份實質上在該電腦之不同部份上同時執行,且對於每個部份會產生類似的複數個實質相同的物件,其每個在該相對應的電腦中,且每個具有一實質上相同的名稱,其中每個該相同名稱的物件之初始內容實質上相同,其中所有該等相同的物件在當該等複數部電腦之每一個不再需要參照到它們相對應的物件時即會共同被刪除,且其中該系統包括一鎖定手段,其可應用到所有該等電腦,其中任何想要利用其中一有名稱之物件之電腦係由該等鎖定手段取得一授權鎖定,其可允許該使用,且其可防止所有其它電腦使用到它們相對應名稱之物件,直到該授權鎖定被放棄。In accordance with a first aspect of the present invention, a multiple computer system is disclosed having at least one application, each of which is programmed to operate on only a single computer, but on a plurality of computers interconnected by a communication network Simultaneous execution, wherein different parts of the application are executed substantially simultaneously on different parts of the computer, and for each part a similar plurality of substantially identical objects are generated, each of which is in the corresponding computer And each having a substantially identical name, wherein the initial content of each of the objects of the same name is substantially the same, wherein all of the same objects are no longer required to be referenced by each of the plurality of computers The corresponding objects are deleted together, and the system includes a locking means that can be applied to all of the computers, and any computer that wants to utilize one of the named objects is obtained by the locking means. An authorization lock, which allows the use, and it prevents all other computers from using the object of their corresponding name until the authorization lock is abandoned.
根據本發明第二態樣,其揭示一種方法在複數部電腦上同時執行至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,該等電腦藉由一通信網路互連,該方法包含以下步驟:(i)在該等電腦之不同電腦上執行該應用程式之不同部份,且對每個該部份產生類似的複數個實質上相同的物件,其每個在該相對應電腦上,且每個具有一實質上相同的名稱,(ii)產生每個該相同名稱物件之實質上相同的初始內容,(iii)當所有該複數部電腦不再需要參照到它們相對應的物件時,共同刪除所有該等相同的物件,且(iv)需要任何想要利用其中一有名稱物件之該等電腦來取得一授權鎖定,其可允許該使用,且其可防止所有其它電腦利用它們相對應之有名稱物件,直到該授權鎖定被放棄。According to a second aspect of the present invention, a method is disclosed for simultaneously executing at least one application on a plurality of computers, each of which is programmed to operate on only a single computer, the computers being interconnected by a communication network, The method comprises the steps of: (i) executing different portions of the application on different computers of the computers, and generating a plurality of substantially identical objects for each of the portions, each of the phases being Corresponding to the computer, each having a substantially identical name, (ii) generating substantially the same initial content for each of the same named objects, (iii) when all of the plurality of computers no longer need to refer to them correspondingly All of the same items are deleted together, and (iv) any such computer that wants to utilize one of the named items is required to obtain an authorized lock, which allows for use and which prevents all other computers Use them to have named objects until the authorization lock is abandoned.
根據本發明第三態樣,其揭示一種多重電腦系統,其具有至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,但同時在由一通信網路互連的複數部電腦上執行,其中該應用程式之不同部份在該等電腦中不同電腦上實質上同時執行,其中每部電腦具有一獨立的本地記憶體,其僅可由該應用程式之相對應部份所存取,且其中對於每個該部份產生複數個實質上相同物件,其每個在該相對應電腦上。In accordance with a third aspect of the present invention, a multiple computer system is disclosed having at least one application, each of which is programmed to operate on only a single computer, but at the same time in a plurality of computers interconnected by a communication network Executing, wherein different parts of the application are executed substantially simultaneously on different computers in the computers, wherein each computer has a separate local memory that can only be accessed by corresponding portions of the application And wherein a plurality of substantially identical objects are generated for each of the portions, each of which is on the corresponding computer.
根據本發明第四態樣,其揭示了透過一通信鏈結互連的複數部電腦,且每個具有一獨立的本地記憶體,且實質上同時操作至少一應用程式之不同部份,其每個被寫入僅在一單一電腦上作業,每個本地記憶體僅由該應用程式之相對應部份所存取。According to a fourth aspect of the present invention, there is disclosed a plurality of computers interconnected by a communication link, each having a separate local memory and substantially simultaneously operating at least one different portion of the application, each of which Each is written to work on a single computer, and each local memory is accessed only by the corresponding portion of the application.
根據本發明第五態樣,其揭示一種方法在複數部電腦上同時執行至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,該等電腦藉由一通信網路互連,且每個具有一獨立的本地記憶體,該方法包含以下步驟:(i)在該等電腦中不同電腦上執行該應用程式之不同部份,且對於每個該部份產生複數個實質上相同物件,其每個在該相對應電腦上,且每個僅可由該應用程式之相對應部份所存取。According to a fifth aspect of the present invention, a method is disclosed for simultaneously executing at least one application on a plurality of computers, each of which is programmed to operate on only a single computer, the computers being interconnected by a communication network, And each having a separate local memory, the method comprising the steps of: (i) executing different portions of the application on different computers in the computers, and generating substantially the same plurality for each of the portions Objects, each on the corresponding computer, and each of which can only be accessed by a corresponding portion of the application.
根據本發明第六態樣,其揭示一種方法,其載入要被寫入僅在一單一電腦上作業之應用程式到每個該等電腦上,該等電腦係透過一通信鏈結互連,且該等應用程式之不同部份實質上同時可在不同電腦上執行,其每部電腦具有一獨立的本地記憶體,其僅可由該應用程式之相對應部份所存取,該方法包含於該應用程式之相關部份被載入之前、載入期間或載入之後,及在被執行之前來修正該應用程式之步驟。In accordance with a sixth aspect of the present invention, a method is disclosed for loading an application to be written to a single computer to each of the computers, the computers being interconnected by a communication link, And different parts of the applications can be executed substantially simultaneously on different computers, each computer having a separate local memory that can only be accessed by a corresponding portion of the application, the method being included The relevant part of the application is loaded before, during or after the loading, and the steps to fix the application before being executed.
根據本發明第七態樣,其揭示一種方法,可在所有經由一通信鏈結互連之複數部電腦上同時操作至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,每個該等電腦皆具有至少一最小預定本地記憶體容量,該應用程式的不同部份係在該等電腦中不同電腦上實質地同時執行,而每部電腦之本地記憶體僅可由該應用程式之相對應部份所存取,該方法包含以下步驟:(i)初始時在實質上相同的條件下提供每個本地記憶體,(ii)滿足自該相對應本地記憶體每個該應用程式部份所產生的所有記憶體讀取及寫入,及(iii)經由該等通信鏈結傳遞所有該等記憶體寫入在每部該電腦,其係發生在該複數部電腦中所有其餘電腦的本地之上,藉此由每部該電腦所利用之本地記憶體之內容當中接受到一更新資料傳輸延遲者,即保持實質上相同。According to a seventh aspect of the present invention, a method is disclosed for simultaneously operating at least one application on all of a plurality of computers interconnected via a communication link, each of which is programmed to operate on only a single computer, each Each of the computers has at least one minimum predetermined local memory capacity. The different parts of the application are executed substantially simultaneously on different computers in the computers, and the local memory of each computer can only be used by the application. Accessed by the corresponding portion, the method comprises the steps of: (i) initially providing each local memory under substantially the same conditions, and (ii) satisfying each of the application portions from the corresponding local memory All memory generated and written by the copies, and (iii) all of the memory is transferred to each of the computers via the communication links, which occurs in all of the remaining computers in the plurality of computers Above the local, by which an update data transmission delay is received by the content of the local memory used by each computer, that is, it remains substantially the same.
根據本發明第八態樣,其揭示一種方法,以編譯或修正一應用程式,其被寫入到僅在一單一電腦上作業,但可在透過一通信鏈結互連的複數部電腦上同時執行,將該應用程式的不同部份實質上在該等電腦中不同電腦上同時執行,其每個具有一獨立本地記憶體,其僅可由該應用程式之相對應部份所存取,該方法包含以下步驟:(i)偵測共用利用了該等電腦中一部的記憶體記錄之指令,(ii)列出所有這些共用的記憶體記錄,並提供每個列出之記憶體記錄的一有名稱標籤,(iii)偵測那些寫入到任何的該等列出記憶體記錄中的指令,或是操縱其內容,及(iv)在每個該偵測的寫入或操縱指令之後啟動一更新傳遞例式,該更新傳遞例式傳送每個該重新寫入或操縱的表列記憶體記錄之重新寫入或操縱的內容及名稱標籤到其餘的該等電腦。According to an eighth aspect of the present invention, a method is disclosed for compiling or modifying an application that is written to work on only a single computer, but simultaneously on a plurality of computers interconnected by a communication link Executing, the different parts of the application are executed simultaneously on different computers in the computer, each having a separate local memory, which can only be accessed by the corresponding part of the application, the method The method comprises the steps of: (i) detecting a shared memory record using one of the computers, (ii) listing all of the shared memory records, and providing one of each listed memory record. Name tags, (iii) detect those instructions written to any of the listed memory records, or manipulate their contents, and (iv) start after each detected write or manipulate command An update delivery modality that conveys the rewritten or manipulated content and name tags of each of the rewritten or manipulated table column memory records to the remaining computers.
根據本發明第九態樣,其揭示一種多執行緒處理電腦作業,其中被撰寫成在僅一單一電腦上作業之單一應用程式之個別執行緒係在複數部電腦中不同對應的電腦上同時地處理,其每個具有僅由該相對應執行緒存取之一獨立本地記憶體,且每個透過一通信鏈結互連,該改善包含透過該通信鏈結傳送本地記憶體之內容的改變,其實體上關連於該電腦,並處理每個其它電腦之本地記憶體的每個執行緒。According to a ninth aspect of the present invention, a multi-thread processing computer operation is disclosed in which an individual thread written as a single application operating on only a single computer is simultaneously on a different computer in a plurality of computers Processing, each having only one independent local memory accessed by the corresponding thread, and each interconnected by a communication link, the improvement comprising transmitting a change in the content of the local memory through the communication link, It is physically associated with the computer and processes each thread of the local memory of each other computer.
本發明另揭示一種運算環境,其中一應用程式可在複數部電腦上同時作業。在這種環境中,其優點在於可保證上述的初始化例式在所有機器上係以一致性的方式作業。The invention further discloses a computing environment in which an application can simultaneously work on a plurality of computers. In this environment, it is advantageous in that the above-described initialization example can be operated in a consistent manner on all machines.
根據本發明第十態樣,其揭示一種多重電腦系統,其具有至少一應用程式,每個係被撰寫成僅在一單一電腦上作業,但同時在由一通信網路互連的複數部電腦上執行,其中該等應用程式之不同部份實質上在該等電腦中不同的電腦上同時執行,且對於每個該部份產生複數個實質上相同的物件,其每個在該相對應電腦上,且每個具有實質上相同的名稱,且其中每個該等相同名稱的物件之初始內容實質上相同。According to a tenth aspect of the present invention, a multiple computer system is disclosed having at least one application, each of which is programmed to operate on only a single computer, but at the same time in a plurality of computers interconnected by a communication network Executing, wherein different portions of the applications are executed substantially simultaneously on different computers in the computers, and for each of the portions, a plurality of substantially identical objects are generated, each of which is in the corresponding computer Up, and each having substantially the same name, and the initial content of each of the objects of the same name is substantially the same.
根據本發明第十一態樣,其揭示經由一通信鏈結互連的複數部電腦,且同時操作至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,其中每個該電腦實質上同時執行該應用程式的一不同部份,每個該電腦在操作其應用程式部份時僅在實體上位在每部該電腦中的本地記憶體中產生物件,由每部該電腦所使用之本地記憶體的內容基本上類似,但在每個實例中並不相同,且該等電腦中每一部具有分散式更新手段,以分散到由該部電腦產生的所有其它該等電腦物件。According to an eleventh aspect of the present invention, a plurality of computers interconnected via a communication link are disclosed, and at least one application is simultaneously operated, each of which is written to operate only on a single computer, wherein each of the computers Essentially executing a different part of the application at the same time, each of the computers operating on the application portion only generates objects in the local memory of each of the computers, which are used by each of the computers. The contents of the local memory are substantially similar, but are not the same in each instance, and each of the computers has a decentralized update means to be distributed to all other such computer objects produced by the computer.
根據本發明第十二態樣,其揭示一種方法在複數部電腦上同時執行至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,該等電腦藉由一通信網路互連,該方法包含以下步驟:(i)在該等電腦中不同電腦上執行該應用程式之不同部份,且對於每個該部份產生複數個實質上相同物件,其每個在該相對應電腦上,且每個具有一實質上相同的名稱,且(ii)產生該等相同名稱物件之實質上相同的初始內容。According to a twelfth aspect of the present invention, a method is disclosed for simultaneously executing at least one application on a plurality of computers, each of which is programmed to operate on only a single computer, the computers being interconnected by a communication network The method comprises the steps of: (i) executing different portions of the application on different computers in the computers, and generating a plurality of substantially identical objects for each of the portions, each of the corresponding computers And each has a substantially identical name, and (ii) produces substantially the same initial content of the same named object.
根據本發明第十三態樣,其揭示一種編譯或修正一應用程式之方法,其被寫入僅在一單一電腦上作業,以在透過一通信鏈結互連的複數部電腦中不同的電腦上之不同部分實質上同時執行,該方法包含以下步驟:(i)偵測指令,其利用該等電腦之一產生物件,(ii)在每個該偵測到的物件產生指令之後啟動一初始化例式,該初始化例式傳送每個產生的物件到其餘的該等電腦。According to a thirteenth aspect of the present invention, there is disclosed a method of compiling or modifying an application which is written to operate on only a single computer for different computers in a plurality of computers interconnected by a communication link The different portions are executed substantially simultaneously, the method comprising the steps of: (i) detecting an instruction to generate an object using one of the computers, and (ii) initiating an initialization after each of the detected objects generates an instruction. For example, the initialization example transfers each generated object to the remaining computers.
根據本發明第十四態樣,其揭示一種多執行緒處理電腦作業,其中被撰寫成在僅一單一電腦上作業之單一應用程式之個別執行緒係在複數部電腦中不同對應的電腦上同時地處理,其每個具有僅由該相對應執行緒存取之一獨立記憶體,且每個透過一通信鏈結互連,該改善包含透過該通信鏈結傳送在本地記憶體中產生的物件,其實體上關連於該電腦,並處理每部其它電腦之本地記憶體的每個執行緒。According to a fourteenth aspect of the present invention, there is disclosed a multi-thread processing computer operation in which individual threads of a single application written to work on only a single computer are simultaneously on different computers in a plurality of computers Ground processing, each having one independent memory accessed by only the corresponding thread, and each interconnected by a communication link, the improvement comprising transmitting the object generated in the local memory through the communication link It is physically connected to the computer and processes each thread of the local memory of each other computer.
根據本發明第十五態樣,其揭示一種方法,以保證一應用程式的一致性初始化,其被寫入僅在一單一電腦上作業,但其不同的部份係要在透過一通信網路互連的複數部電腦中不同的電腦上同時執行,該方法包含以下步驟:(i)在載入當中、在之前或之後詳查或分析該應用程式,以偵測定義一初始化例式的每個程式步驟,及(ii)修正該初始化例式以保證所有該等電腦之一致作業。According to a fifteenth aspect of the present invention, a method is disclosed to ensure consistency initialization of an application, which is written to work on only a single computer, but the different parts thereof are transmitted through a communication network. Executing simultaneously on different computers in the interconnected plurality of computers, the method comprises the steps of: (i) scrutinizing or analyzing the application during loading, before or after, to detect each of the definitions of an initialization instance The program steps, and (ii) correct the initialization routine to ensure consistent operation of all of the computers.
本發明另揭示一種運算環境,其中一應用程式可在複數部電腦上同時作業。在這種環境中,其優點在於可保證該「清除」(或刪除或最終化)在所有機器上係以一致性的方式作業。一致性的最終化的目的為本發明之緣起。The invention further discloses a computing environment in which an application can simultaneously work on a plurality of computers. In this environment, the advantage is that it ensures that the "cleanup" (or deletion or finalization) works in a consistent manner across all machines. The purpose of the finalization of consistency is the origin of the invention.
根據本發明第十六態樣,其揭示一種多重電腦系統,其具有至少一應用程式,每個係被撰寫成僅在一單一電腦上作業,但同時在由一通信網路互連的複數部電腦上執行,其中該等應用程式之不同部份實質上在該等電腦中不同的電腦上同時執行,且對於每個該部份產生複數個實質上相同的物件,其每個在該相對應電腦上,且每個具有實質上相同的名稱,且其中每個該等相同的物件在當每部該等複數部電腦不再需要參照到它們相對應物件時即會共同地刪除。According to a sixteenth aspect of the present invention, there is disclosed a multiple computer system having at least one application, each of which is programmed to operate on only a single computer, but at the same time in a plurality of sections interconnected by a communication network Executed on a computer, wherein different portions of the applications are executed substantially simultaneously on different computers in the computer, and a plurality of substantially identical objects are generated for each of the portions, each of which corresponds to the corresponding On the computer, and each having substantially the same name, and each of the same items is collectively deleted when each of the plurality of computers no longer needs to refer to their corresponding objects.
根據本發明第十七態樣,其揭示經由一通信鏈結互連的複數部電腦,且同時操作至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,其中每個該電腦實質上同時執行該應用程式的一不同部份,每個該電腦在操作其應用程式部份時可需要或不再需要參照到僅在本地記憶體中的一物件,其實體係位在每部該電腦上,由每部該電腦所使用之本地記憶體的內容基本上類似,但在每個實例中並不相同,且該等電腦中每一部具有一最終化例式,其僅在當該複數部電腦中每一部不再需要參照到它們相對應之物件時即刪除一未參照的物件。According to a seventeenth aspect of the present invention, a plurality of computers interconnected via a communication link are disclosed, and at least one application is simultaneously operated, each of which is programmed to operate only on a single computer, wherein each of the computers Essentially executing a different part of the application at the same time, each of the computers may need or no longer need to refer to an object in the local memory only when operating the application portion thereof. On the computer, the content of the local memory used by each computer is basically similar, but it is not the same in each instance, and each part of the computers has a finalized example, which is only when When each of the plurality of computers no longer needs to refer to their corresponding objects, an unreferenced object is deleted.
根據本發明第十八態樣,其揭示一種方法在複數部電腦上同時執行至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,該等電腦藉由一通信網路互連,該方法包含以下步驟:(i)在該等電腦中不同電腦上執行該應用程式之不同部份,且對於每個該部份產生複數個實質上相同物件,其每個在該相對應電腦上,且每個具有一實質上相同的名稱,且(ii)當所有該複數部電腦不再需要參照到它們相對應物件時即會共同地刪除所有該等相同物件。According to an eighteenth aspect of the present invention, a method is disclosed for simultaneously executing at least one application on a plurality of computers, each of which is programmed to operate on only a single computer, the computers being interconnected by a communication network The method comprises the steps of: (i) executing different portions of the application on different computers in the computers, and generating a plurality of substantially identical objects for each of the portions, each of the corresponding computers Up, and each having a substantially identical name, and (ii) all of the same objects are collectively deleted when all of the plurality of computers no longer need to refer to their corresponding objects.
根據本發明第十九態樣,其揭示一種方法,以保證一應用程式的一致性最終化,其被寫入僅在一單一電腦上作業,但其不同的部份係要在透過一通信網路互連的複數部電腦中不同的電腦上同時執行,該方法包含以下步驟:(i)在載入當中、或之前或之後詳查該應用程式,以偵測定義一最終化例式之每個程式步驟,及(ii)修正該最終化例式,以保證僅有在當每部該等電腦不再需要參照到它們相對應的物件時共同刪除在所有該等電腦上相對應之物件。According to a nineteenth aspect of the present invention, a method is disclosed to ensure consistency of consistency of an application, which is written to work only on a single computer, but different parts thereof are transmitted through a communication network. Simultaneous execution of multiple computers in a plurality of computers interconnected, the method comprising the steps of: (i) scrutinizing the application during, during or after loading to detect a definition of a finalization The program steps, and (ii) correct the finalization to ensure that the objects corresponding to all of the computers are deleted together only when each of the computers no longer needs to refer to their corresponding objects.
根據本發明第二十態樣,其揭示一種多重執行緒處理電腦作業之方法,其中被撰寫成僅在一單一電腦上作業之一單一應用程式之個別執行緒係同時正在處理,其每個係在透過一通信鏈結互連的複數部電腦中一不同的相對應電腦上,且其中在實體上關連於該電腦的本地記憶體中的物件處理每個執行緒,其在每部其它電腦之本地記憶體中具有相對應的物件,該改善包含當該複數部電腦之每一部不再需要參照到它們相對應的物件時即共同地刪除所有該等相對應物件。According to a twentieth aspect of the present invention, a method for processing a computer job by a multi-thread is disclosed, wherein an individual thread system written as a single application on only a single computer is being processed at the same time, each of which is processed Each thread is processed on a different computer in a plurality of computers interconnected by a communication link, and the objects in the local memory physically associated with the computer are processed in each of the other computers. The local memory has corresponding objects, and the improvement includes collectively deleting all of the corresponding objects when each of the plurality of computers no longer needs to refer to their corresponding objects.
根據本發明第二十一態樣,其揭示一種多重電腦系統,其具有至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,但在由一通信網路互連的複數部電腦上同時執行,其中該應用程式之不同部份在該等電腦中不同的電腦上實質上同時執行,且對於每個部份產生複數個實質上相同的物件,其每個在該相對應電腦上,且每個具有一實質上相同的名稱,且該系統包括一鎖定機制或鎖定手段,其可應用到所有該等電腦,其中任何想要利用其中一有名稱物件的電腦可由該等鎖定機制取得一授權鎖定,其可允許該使用,並可防止所有其它電腦使用它們相對應之有名稱物件,直到該授權鎖定被放棄。According to a twenty first aspect of the present invention, there is disclosed a multiple computer system having at least one application, each of which is programmed to operate only on a single computer, but in a plurality of sections interconnected by a communication network Simultaneous execution on a computer, wherein different portions of the application are executed substantially simultaneously on different computers in the computers, and a plurality of substantially identical objects are generated for each portion, each of which is in the corresponding computer And each has a substantially identical name, and the system includes a locking mechanism or locking means that can be applied to all of the computers, wherein any computer that wants to utilize one of the named objects can be locked by the locking mechanism An authorization lock is obtained which allows the use and prevents all other computers from using their corresponding named objects until the authorization lock is abandoned.
根據本發明第二十二態樣,其揭示經由一通信鏈結互連的複數部電腦,且同時操作至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,其中每個該電腦實質上同時執行該應用程式的一不同部份,每個該電腦在操作其應用程式部份時利用到僅在本地記憶體中的一物件,且實體上位在每個該部電腦中,由每部該電腦所使用之本地記憶體的內容基本上類似,但在每個實例中並不相同,且該等電腦中每一部具有一取得鎖定例式及一釋放鎖定例式,其可允許僅由一部電腦使用該本地物件,且每個該其餘的該等複數部電腦被鎖定排除使用它們相對應物件。According to a twenty-second aspect of the present invention, a plurality of computers interconnected via a communication link are disclosed, and at least one application is simultaneously operated, each of which is written to operate only on a single computer, wherein each of the The computer essentially executes a different part of the application at the same time. Each computer uses an object in the local memory only when operating its application part, and the entity is located in each of the computers. The contents of the local memory used by each computer are substantially similar, but are not the same in each instance, and each of the computers has a lock-up instance and a release lock instance that allow The local object is used by only one computer, and each of the remaining plurality of computers is locked out of use of their corresponding objects.
根據本發明第二十三態樣,其揭示一種方法在複數部電腦上同時執行至少一應用程式,其每個被撰寫成僅在一單一電腦上作業,該等電腦藉由一通信網路互連,該方法包含以下步驟:(i)在該等電腦中不同的電腦上執行該應用程式之不同部份,且對於每個該部份產生複數個實質上相同的物件,其每個在該相對應電腦上,且每個具有一實質上相同的名稱,及(ii)任何想要利用其中一有名稱物件的該等電腦需要取得一授權鎖定,其可允許該使用,且可防止所有其它電腦使用它們相對應之有名稱物件,直到該授權鎖定被放棄。According to a twenty-third aspect of the present invention, a method is disclosed for simultaneously executing at least one application on a plurality of computers, each of which is written to operate only on a single computer, the computers being mutually connected by a communication network The method comprises the steps of: (i) executing different portions of the application on different computers in the computers, and generating a plurality of substantially identical objects for each of the portions, each of which is Corresponding to computers, each having a substantially identical name, and (ii) any such computer that wishes to utilize one of the named objects requires an authorization lock that allows for use and prevents all other The computer uses their corresponding name object until the authorization lock is abandoned.
根據本發明第二十四態樣,其揭示一種方法,以保證一應用程式的一致性同步化,其被寫入僅在一單一電腦上作業,但其不同的部份係要在透過一通信網路互連的複數部電腦中不同的電腦上同時執行,該方法包含以下步驟:(i)在被載入、在之前或在之後詳查該應用程式以偵測每個定義一同步化例式之程式步驟,及(ii)修正該同步化例式以保證一物件僅由一電腦使用,並防止所有其餘電腦同時利用它們相對應的物件。According to a twenty-fourth aspect of the present invention, a method is disclosed to ensure consistency synchronization of an application, which is written to work only on a single computer, but different parts of which are to be transmitted through a communication The network interconnects the plurality of computers simultaneously on different computers. The method includes the following steps: (i) scrutinizing the application after being loaded, before or after to detect each definition-synchronization example The program steps, and (ii) correct the synchronization example to ensure that an object is used by only one computer and that all other computers are simultaneously using their corresponding objects.
根據本發明第二十五態樣,其揭示一種多重執行緒處理電腦作業之方法,其中被撰寫成僅在一單一電腦上作業之一單一應用程式之個別執行緒係同時正在處理,其每個係在透過一通信鏈結互連的複數部電腦中一不同的相對應電腦上,且其中在實體上關連於該電腦的本地記憶體中的物件處理每個執行緒,其在每部其它電腦之本地記憶體中具有相對應的物件,該改善包含僅允許該等電腦中的一部使用一物件,並防止所有其餘電腦同時使用它們相對應的物件。According to a twenty-fifth aspect of the present invention, a method for processing a computer job by a multi-thread is disclosed, wherein an individual thread system written as a single application on only a single computer is being processed at the same time, each of which is Each thread is processed on a different computer in a plurality of computers interconnected by a communication link, and the object physically associated with the computer's local memory is processed in each of the other computers. The local memory has corresponding objects, and the improvement includes allowing only one of the computers to use one object and preventing all remaining computers from using their corresponding objects at the same time.
根據本發明第二十六態樣,其揭示一種電腦程式產品,其包含一組程式指令,其儲存在一儲存媒體中,並可用以允許複數部電腦執行上述的方法。According to a twenty-sixth aspect of the present invention, a computer program product is disclosed which includes a set of program instructions stored in a storage medium and operable to allow a plurality of computers to perform the above method.
根據本發明第二十七態樣,其揭示一分散式執行時間及分散式執行時間系統,用以構成複數電腦、運算機器或資訊家電之間的通信。According to a twenty-seventh aspect of the present invention, a decentralized execution time and a decentralized execution time system are disclosed for constructing communication between a plurality of computers, computing machines, or information appliances.
根據本發明第二十八態樣,其揭示一種修正器、修正器手段及修正器例式,以修正一應用程式,其被寫入一次在一單一電腦或運算機器上執行,以同時在複數個網路化電腦或運算機器上執行。分散式執行時間與分散式執行時間系統用以構成複數部電腦、運算機器或資訊家電之間的通信。According to a twenty-eighth aspect of the present invention, a modifier, a modifier, and a modifier are disclosed to modify an application that is written once on a single computer or computing machine to simultaneously Executed on a networked computer or computing machine. Decentralized execution time and decentralized execution time systems are used to form communication between a plurality of computers, computing machines, or information appliances.
根據本發明第二十九態樣,其揭示一種電腦程式及電腦程式產品,其被寫入僅在一單一電腦上作業,但產品包含一組程式指令,其儲存在一儲存媒體中,並可用以允許複數部電腦執行上述的例式、作業及方法。According to a twenty-ninth aspect of the present invention, a computer program and a computer program product are disclosed, which are written to work only on a single computer, but the product includes a set of program instructions stored in a storage medium and available To allow the plurality of computers to execute the above examples, operations, and methods.
雖然本說明書提供了本發明數個具體實施例之完整及詳細的說明,使得本發明可被瞭解,並可以不需要參照其它材料而實施,該說明書包括附錄A,B,C及D,其中提供範例性實際程式或程式碼片段,其可實施所描述之具體實施例的多個態樣。雖然本發明之各態樣在整個說明書中的說明包括附錄、圖面及申請專利範圍,其可瞭解到附錄A係主要關於欄位,附錄B主要關於初始化,附錄C主要關於最終化,而附錄D主要關於同步化。更特定而言,所附的附錄當中提供:附錄A1-A10例示了範例程式碼,以說明關於欄位之本發明具體實施例。While the specification provides a complete and detailed description of several specific embodiments of the present invention, the invention may be understood, and may be practiced without reference to other materials, which include Appendices A, B, C, and D, in which Exemplary actual programs or code segments that implement various aspects of the specific embodiments described. Although the description of the various aspects of the present invention includes the appendix, the drawings, and the scope of the patent application, it can be understood that Appendix A is mainly related to the field, Appendix B is mainly about initialization, and Appendix C is mainly about finalization, and Appendix D is mainly about synchronization. More specifically, the accompanying appendices provide: Appendix A1-A10 illustrates example code to illustrate a particular embodiment of the invention with respect to a field.
附錄B1為來自一未修正類別初始化<clinit>之範例性典型碼片段,附錄B2為對於一修正的類別初始化<clinit>指令的同等者。附錄B3為來自一未修正的物件初始化<init>指令之典型的碼片段。附錄B4為對於一修正的物件初始化<init>指令的一同等者。此外,附錄B5為附錄B2之程式碼對於一未修正的類別初始化指令的另一個選擇,而附錄B6為附錄B4之程式碼對於一未修正的物件初始化<init>指令的另一個選擇。再者,附件B7為InitClient之範例性電腦程式原始碼,其對一「初始化伺服器」查詢該相關類別或物件之初始化狀態。附錄B8為InitServer之電腦程式原始碼,其接收InitClient之一初始化狀態查詢,並回應而傳回該相對應之狀態。類似地,附錄B9為用於附錄B1-B6之先前/之後範例中的該範例應用程式之電腦程式原始碼。Appendix B1 is an exemplary typical code segment for initializing <clinit> from an uncorrected class, and Appendix B2 is the equivalent of initializing the <clinit> instruction for a modified class. Appendix B3 is a typical code fragment for initializing an <init> instruction from an uncorrected object. Appendix B4 is an equivalent to initializing the <init> instruction for a modified object. In addition, Appendix B5 is another option for the code of Appendix B2 for an uncorrected class initialization instruction, and Appendix B6 is another option for the code of Appendix B4 to initialize the <init> instruction for an uncorrected object. Furthermore, the accessory B7 is an exemplary computer program source code of the InitClient, which queries an "initialization server" for the initialization state of the related category or object. Appendix B8 is the computer program source code of InitServer, which receives an initialization status query of the InitClient and returns the corresponding status in response. Similarly, Appendix B9 is the computer program source code for the sample application in the previous/after examples of Appendix B1-B6.
其將可瞭解到在此處提供之說明目的在於附錄的分類化,以及在此說明中其它的標題及副標題的使用係要做為讀者的輔助,而並非以任何的方式限制本發明之範圍。It is to be understood that the description provided herein is for the purpose of the present invention, and the description of the subject matter of the present invention, and the use of other headings and sub-headings in this description are intended to be an aid to the reader and are not intended to limit the scope of the invention in any way.
本發明揭示一種修正的電腦架構,其使得一應用程式可在複數部電腦上同時執行,其方式可克服前述習用的架構、系統、方法及電腦程式之限制。The present invention discloses a modified computer architecture that enables an application to be executed concurrently on a plurality of computers in a manner that overcomes the limitations of the conventional architecture, systems, methods, and computer programs.
在一態樣中,在每部電腦內共用的記憶體可用修正及/或覆寫來更新,所以所有記憶體讀取請求皆可在本地滿足。先前在程式載入期間或之後,但在執行該程式碼之相關部份之前或類似者,重造成記憶體中重新寫入或操縱之指令可被識別出來。額外的指令插入到該程式碼(或其它做成的修正)可造成在所有電腦中同等記憶體位置進行更新。本發明並不限於JAVA語言或虛擬機器,範例性具體實施例係關於JAVA語言及標準來說明。在另一態樣中,提供了JAVA語言類別與物件(或其它資產)的初始化,所以所有電腦之所有記憶體位置依相同方式初始化。在另一態樣,JAVA語言類別及物件之最終化亦可提供,所以最終化僅在當出現在所有機器上的最後類別或物件不再被需要時才發生。在又另一態樣中,提供同步化,使得造成該應用程式取得(或釋放)對一特定資產之鎖定(同步化)的指令可被識別。其中插入有額外的指令(或其它執行的程式碼修正)以產生一修正的同步化例式,用於所有電腦的更新。In one aspect, the memory shared in each computer can be updated with corrections and/or overwrites, so all memory read requests can be satisfied locally. An instruction to rewrite or manipulate memory in memory may be recognized during or after the program is loaded, but before or after execution of the relevant portion of the code. The insertion of additional instructions into the code (or other made corrections) can result in an update of the equivalent memory location on all computers. The invention is not limited to JAVA languages or virtual machines, and exemplary embodiments are described in relation to JAVA languages and standards. In another aspect, initialization of the JAVA language category and objects (or other assets) is provided, so all memory locations of all computers are initialized in the same manner. In another aspect, the finalization of JAVA language categories and objects is also provided, so finalization only occurs when the last category or object that appears on all machines is no longer needed. In yet another aspect, synchronization is provided such that instructions that cause the application to acquire (or release) a lock (synchronization) of a particular asset can be identified. Additional instructions (or other executed code modifications) are inserted to generate a modified synchronization pattern for all computer updates.
本發明亦揭示一種運算環境及運算方法,其中一應用程式在複數部電腦上同時作業。在這種環境中,其有利的是可保證上述的初始化、清除及同步化例式在所有該等機器上以一致及協同的方式作業。這些記憶體複製、物件或其它資產初始化、最終化及同步化可分別使用及應用在多種運算及資訊處理環境。再者,它們較佳地是可實施及應用在任何的組合中,藉以提供綜效給多重電腦處理,例如網路為主的分散式運算。The invention also discloses a computing environment and an arithmetic method in which an application works simultaneously on a plurality of computers. In such an environment, it is advantageous to ensure that the initialization, cleanup, and synchronization routines described above operate in a consistent and coordinated manner across all of the machines. These memory copies, objects, or other asset initialization, finalization, and synchronization can be used and applied in a variety of computing and information processing environments, respectively. Moreover, they are preferably implemented and applied in any combination to provide synergy for multiple computer processing, such as network-based distributed computing.
因為本發明之每一種架構、系統、程序、方法及電腦程式態樣(例如記憶體管理及複製、初始化、最終化及同步化)皆可獨立地應用,因此將先進行說明,而不會參照到其它態樣。但是要瞭解到,在本說明中所提到的目的、類別、會其它資產產生或初始化,通常皆在這些目的、類別或其它資產的最終化之前。Because each of the architectures, systems, programs, methods, and computer programs of the present invention (eg, memory management and copying, initialization, finalization, and synchronization) can be applied independently, they will be described first without reference. To other aspects. However, it is important to understand that the purposes, categories, and other assets mentioned in this description are generated or initialized, usually before the finalization of these purposes, categories, or other assets.
在此處所提供的進一步說明之下將可更加瞭解到,本發明之特徵之一係要使其成為一種共用的應用程式或應用碼,及其可執行版本(具有類似的修正),其係在複數部電腦或機器M1...Mn之間同時或同步地執行。在之後的許多細節中所說明者為本發明係由在每部機器上執行相同的應用程式來達到此目的(例如Microsoft Word或Adobe Photoshop CS2),但是修正每部機器上的應用程式之可執行碼為必要的,使得在每部機器上每個執行例證“instance”("複本")可以與在任何特殊機器上的其本地作業可以與在其它機器上個別例證之作業相協調,使得它們皆可由一致性、協調及調和的方式一起工作,並使其外觀上為該應用的一個共通例證(即超應用(meta-application))。As will be further appreciated from the further description provided herein, one of the features of the present invention is to make it a shared application or application code, and its executable version (with similar corrections), which is tied to The plurality of computers or machines M1...Mn are executed simultaneously or synchronously. In the many details that follow, the invention is implemented by executing the same application on each machine (for example, Microsoft Word or Adobe Photoshop CS2), but correcting the executable of the application on each machine. Codes are necessary so that each execution of an "instance" ("replica") on each machine can be coordinated with its local work on any particular machine and with individual examples on other machines, so that they are all It can work together in a consistent, coordinated, and reconciled manner and makes it a common example of the application (ie, meta-application).
根據本發明之具體實施例,一單一應用碼50(有時候非正式地稱為應用或應用程式)可以同時在透過一通信網路或其它通信鏈結或路徑53互連的一些機器M1,M2...Mn上同時地作業。該通信網路或路徑可為任何電子發信、資料或數位通信網路或路徑,較佳地是為一相當低速之通信路徑,例如網際網路上的一網路連接,或任何共用的網路組態,其已知或可做為該日期或此應用程式,及其延伸及改善。In accordance with a particular embodiment of the present invention, a single application code 50 (sometimes informally referred to as an application or application) can simultaneously be interconnected by a communication network or other communication link or path 53 of some machines M1, M2. ... Mn works simultaneously. The communication network or path can be any electronic signaling, data or digital communication network or path, preferably a relatively low speed communication path, such as a network connection on the Internet, or any shared network. Configuration, known or available as the date or application, extension and improvement.
藉由範例(但非限制),一應用碼或程式50可為該等機器上的單一應用,例如Microsoft Word,相對於每部機器上不同的應用,例如在機器M1上為Microsoft Word,機器M2上為Microsoft PowerPoint,及機器M3上的Netscape Navigator等等。因此,該術語「一個」應用碼或程式,及一「共用」應用碼或程式係用於嘗試及捕捉此狀況,其中所有的機器M1,...,Mn係操作或執行相同的程式或碼,且不是不同(及不相關的)程式。換言之,相同或實質上相同的應用碼之複本或複製品係載入到每個互操作及連接的機器或電腦。因為每部機器或電腦之特性可以不同,該應用碼50可在載入之前、該載入處理期間做修正,且在該載入處理之後具有一些限制,以提供在每部機器上該碼之顧客化或修正。在該等程式之間的一些不相似性可以允許,只要在此處所說明的互通性、持續性及協調性之需求可以維持。在之後將可瞭解到,每部操作相同應用碼50之機器M1,M2,...Mn,在每部機器M1,M2,...Mn,及因此所有的機器M1,M2,...Mn具有相同或實質上相同的應用碼50,通常會具有機器特定之修正。By way of example (but not limitation), an application code or program 50 can be a single application on such machines, such as Microsoft Word, relative to different applications on each machine, such as Microsoft Word on machine M1, machine M2 On top of Microsoft PowerPoint, and Netscape Navigator on machine M3. Therefore, the term "a" application code or program, and a "shared" application code or program are used to attempt and capture the situation in which all machines M1, ..., Mn operate or execute the same program or code. And not a different (and irrelevant) program. In other words, copies or copies of identical or substantially identical application code are loaded into each interoperable and connected machine or computer. Because the characteristics of each machine or computer can vary, the application code 50 can be modified prior to loading, during the loading process, and with some restrictions after the loading process to provide the code on each machine. Customization or correction. Some dissimilarities between the programs may allow for as long as the interoperability, persistence, and coordination requirements described herein are maintained. It will be understood later that each machine M1, M2, ... Mn operating the same application code 50, in each machine M1, M2, ... Mn, and therefore all machines M1, M2, ... Mn has the same or substantially the same application code 50 and will typically have machine specific corrections.
類似地,每個機器M1,M2,...Mn具有在每部機器M1,M2,...,Mn上之相同(或實質上相同或類似)的修正子51(在一些具體實施例中實施為一分散式運算時間或DRT 71作業,因此所有的機器M1,M2,...Mn對於每個需要的修正具有相同(或實質上相同或類似)之修正子51。例如不同的修正對於記憶體管理及複製、初始化、最終化及/或同步化皆需要(雖然對於所有的具體實施例並不需要所有這些修正種類)。Similarly, each machine M1, M2, ... Mn has the same (or substantially the same or similar) modifier 51 on each machine M1, M2, ..., Mn (in some embodiments) Implemented as a decentralized computing time or DRT 71 operation, so all machines M1, M2, ... Mn have the same (or substantially the same or similar) modifiers 51 for each required correction. For example, different corrections for Memory management and copying, initialization, finalization, and/or synchronization are all required (although all of these types of corrections are not required for all embodiments).
此外,於每部機器M1,M2,...,Mn上在載入該應用碼50(或其相關部份)或在其執行之前的任何時間,每個應用碼50已經根據相同的規則由相對應的修正子51所修正(或實質上相同的規則,因為微幅的最佳化改變皆在每個修正子51/1,51/2.,,,51/n之內所允許)。當在任何特定機器上需要個別的修正時,例如對於機器M2,以影響該機器之記憶體管理、初始化、最終化、及/或同步化,然後每部機器事實上可根據複數個個別修正子(例如51/2-M(M2記憶體管理修正子),51/2-I(如M2初始化修正子),51/2-F(如M2最終化修正子)及/或51/2-S(如M2同步化修正子))來具有及被修正;或是可以結合其它任何一或多個這些修正子成為該電腦或機器之組合的修正子。在至少一些具體實施例中,在執行所需要的步驟來識別所需要的修正、並在執行實際修正時、並以有組織、一致性及協調性方式之電腦或機器的複數部或群集之作業的協調中皆會很有效率。這些修正可以根據本發明之各態樣由在以下詳細說明之分散式執行時間手段71來執行。在類似的方法中,具有本技術中一般技能之那些工作者在此處所提供的說明之下,將可瞭解到該分散式執行時間、分散式執行時間系統及分散式執行時間手段之結構性及方法論態樣,因為它們在此處之說明係特定於記憶體管理、初始化、最終化及/或同步化可以結合,所以一應用程式或應用碼所需要的任何修正皆可獨立進行、或組合進行,以達到在任何特定機器上或橫跨複數部機器M1,M2,...,Mn中任何所需要的記憶體管理、初始化、最終化及/或同步化。In addition, at each time the machine code 50 (or its associated portion) is loaded on each machine M1, M2, ..., Mn or at any time prior to its execution, each application code 50 has been based on the same rules. The corresponding modifier 51 corrects (or substantially the same rule, since the micro-optimization changes are allowed within each of the correctors 51/1, 51/2.,,, 51/n). When individual corrections are required on any particular machine, such as machine M2, to affect the memory management, initialization, finalization, and/or synchronization of the machine, then each machine can actually be based on a number of individual modifiers. (eg 51/2-M (M2 memory management modifier), 51/2-I (eg M2 initialization modifier), 51/2-F (eg M2 finalization modifier) and / or 51/2-S (such as the M2 synchronization modifier)) has and is modified; or can be combined with any other one or more of these modifiers to become a modifier of the computer or machine combination. In at least some embodiments, the plurality of steps or clusters of a computer or machine are performed in an organized, consistent, and coordinated manner while performing the required steps to identify the required corrections and performing the actual corrections. The coordination will be very efficient. These corrections can be performed in accordance with various aspects of the present invention by the decentralized execution time means 71 described in detail below. In a similar manner, those skilled in the art will be able to understand the structure of the decentralized execution time, the decentralized execution time system, and the decentralized execution time means, as provided herein. Methodological aspects, since the descriptions herein are specific to memory management, initialization, finalization, and/or synchronization, any modifications required for an application or application code can be performed independently or in combination. To achieve any required memory management, initialization, finalization, and/or synchronization on any particular machine or across a plurality of machines M1, M2, ..., Mn.
利用所提供的對於任何記憶體管理修正子之特定參照,整個修正子或分散式執行時間手段之這些記憶體管理修正子51-M或DRT 71-M或其它碼修正手段組件係負責在每部個別機器M1,M2,...Mn上產生或複製一記憶體結構及內容,而可允許該複數部機器相互運作。在一些具體實施例中,此複製的記憶體結構將為相同,在其它具體實施例中,此記憶體結構將具有相同的部份及其它不相同的部份,另有其它的具體實施例中,該等記憶體結構或可不相同。Using the provided specific reference for any memory management modifier, the memory management modifier 51-M or DRT 71-M or other code correction means component of the entire modifier or decentralized execution time means is responsible for each A memory structure and content is created or copied on individual machines M1, M2, ... Mn, allowing the plurality of machines to operate with each other. In some embodiments, the duplicated memory structure will be the same. In other embodiments, the memory structure will have the same portion and other different portions, and in other embodiments. The memory structures may or may not be the same.
參照到可能存在之任何初始化修正子,整體修正子或分散式執行時間手段之這些初始化修正子51-I或DRT 71-I或其它碼修正手段組件係負責修正該應用碼50,所以其可執行初始化例式或其它初始化作業,例如像是在JAVA語言及虛擬機器環境中的類別及物件初始化方法或例式,其係以一協調、調和及一致性的方式橫跨該複數部個別機器M1,M2,...Mn。Referring to any initialization modifiers that may be present, these initialization modifiers 51-I or DRT 71-I or other code correction means components of the overall modifier or decentralized execution time means are responsible for modifying the application code 50, so that it can be executed Initialization routines or other initialization operations, such as categories and object initialization methods or instances in JAVA language and virtual machine environments, which span the complex machine M1 in a coordinated, harmonized, and consistent manner. M2, ... Mn.
參照到可能存在之最終化修正子,這些最終化修正子51-F或DRT 71-F或其它碼修正手段係負責修正該應用碼50,所以該碼可執行最終化清除、或其它記憶體改造、回收、刪除或最終化作業,例如像是在JAVA語言及虛擬機器環境中的類別及物件最終方法或例式,其係以一協調、調和及一致性的方式橫跨該複數部個別機器M1,M2,...Mn。Referring to possible finalization modifiers, these finalization modifiers 51-F or DRT 71-F or other code modification means are responsible for modifying the application code 50, so the code can perform finalization removal, or other memory modification. Recycling, deleting, or finalizing operations, such as the final method or example of categories and objects in a JAVA language and virtual machine environment, which spans the complex machine M1 in a coordinated, harmonized, and consistent manner. , M2, ... Mn.
再者,參照到可能存在的任何同步化修正子,這些同步化修正子51-S或DRT 71-S或其它碼修正手段係負責保證當在一或多部機器上執行之修正過的應用程式50之一部份(例如一執行緒或處理)專門地利用(例如藉由一同步化例式或類似或同等的相互排除運算子或作業)一特定的本地資產,例如一物件50X-50Z或類別50A,在機器M2...Mn上沒有其它不同及可能同步地執行部份獨特地立刻或同時間利用對應於在其本地記憶體中類似的相等對應資產。Furthermore, with reference to any synchronization modifiers that may be present, these synchronization modifiers 51-S or DRT 71-S or other code modification means are responsible for ensuring that the modified application is executed on one or more machines. A portion of 50 (eg, a thread or process) specifically utilizes (eg, by a synchronization instance or similar or equivalent mutual exclusion operator or job) a particular local asset, such as an object 50X-50Z or Class 50A, there is no other difference on the machines M2...Mn and it is possible to perform a partial uniquely immediate or simultaneous use of equivalent corresponding assets corresponding to similar in their local memory.
這些結構及程序在需要時以組合方式應用時,其維持一運算環境,其中記憶體位置、位址範圍、物件、類別、資產、資源或任何一電腦或運算環境之任何其它程序性或結構性態樣皆為在需要時產生、維持、操作及撤銷或刪除,其係以一協調、調和及一致性方法橫跨在該複數部個別機器M1,M2...Mn。These structures and programs, when applied in combination, when needed, maintain a computing environment in which memory locations, address ranges, objects, categories, assets, resources, or any other procedural or structural nature of any computer or computing environment. The aspects are generated, maintained, manipulated, and revoked or deleted as needed, spanning the complex machine M1, M2...Mn in a complex, coordinated, and consistent manner.
現在將注意力移到本發明數個態樣當中的特殊性,其可單獨利用或以任何組合方式利用。Attention is now directed to the particularities of several aspects of the invention, which may be utilized separately or in any combination.
連接到第5圖,根據本發明一較佳具體實施例,一單一應用碼50(有時候更為非正式地稱之為應用或應用程式)可以在透過一通信網路或其它通信鏈結或路徑53互連的一些機器M1,M2...,Mn上同時作業。藉由範例(但非限制),一應用碼或程式50將可為在該等機器上一單一共用應用程式,例如Microsfot Word,相對於在每部機器上不同的應用,例如在機器M1上的Microsoft Word,機器M2上的Microsoft PowerPoint,及機器M3上的Netscape Navigator等等。因此,該術語「一個」、「單一」及「共用」應用碼或程式係用於嘗試及捕捉此狀況,其中所有的機器M1,...,Mn係操作或執行相同的程式或碼,且不是不同(及不相關的)程式。換言之,相同或實質上相同的應用碼之複本或複製品係載入到每個互操作及連接的機器或電腦。因為每部機器或電腦之特性可以不同,該應用碼50可在載入之前、該載入處理期間或在該載入處理之後做修正,以提供在每部機器上該碼之顧客化或修正。在該等程式之間的一些不相似性可以允許,只要在此處所說明的互通性、持續性及協調性之需求可以維持。在之後將可瞭解到,每部操作相同應用碼50之機器M1,M2,...Mn,在每部機器M1,M2,...Mn,及因此所有的機器M1,M2,...Mn具有相同或實質上相同的應用碼50,通常會具有機器特定之修正。In connection with FIG. 5, in accordance with a preferred embodiment of the present invention, a single application code 50 (sometimes more informally referred to as an application or application) may be through a communication network or other communication link or Some machines M1, M2..., Mn interconnected by path 53 operate simultaneously. By way of example (but not limitation), an application code or program 50 would be a single shared application on the machine, such as Microsfot Word, as opposed to a different application on each machine, such as on machine M1. Microsoft Word, Microsoft PowerPoint on machine M2, and Netscape Navigator on machine M3. Therefore, the terms "a", "single" and "shared" application code or program are used to attempt and capture the situation in which all machines M1, ..., Mn operate or execute the same program or code, and Not a different (and irrelevant) program. In other words, copies or copies of identical or substantially identical application code are loaded into each interoperable and connected machine or computer. Because the characteristics of each machine or computer can vary, the application code 50 can be modified prior to loading, during the loading process, or after the loading process to provide customization or correction of the code on each machine. . Some dissimilarities between the programs may allow for as long as the interoperability, persistence, and coordination requirements described herein are maintained. It will be understood later that each machine M1, M2, ... Mn operating the same application code 50, in each machine M1, M2, ... Mn, and therefore all machines M1, M2, ... Mn has the same or substantially the same application code 50 and will typically have machine specific corrections.
類似地,每部機器M1,M2,...Mn在每部機器M1,M2,...Mn上利用相同(或實質上相同或類似)修正子51作業,因此所有的機器M1,M2.,,,Mn具有相同(或實質上相同或類似)修正子51,而機器M1之修正子指定為51/1,機器M2之修正子指定為51/2等。此外,在載入之前或載入期間,或是在執行之前,或甚至在已經進行之後,每部機器M1,M2,...Mn上的應用碼50係由相對應的修正子51根據相同的規則來修正(或實質上相同的規則,因為在每個修正子51/1,51/2,...,51/n內允許微小的最佳化改變)。Similarly, each machine M1, M2, ... Mn operates on the same (or substantially the same or similar) modifier 51 on each machine M1, M2, ... Mn, so all machines M1, M2. ,, Mn has the same (or substantially the same or similar) modifier 51, and the modifier of the machine M1 is designated as 51/1, and the modifier of the machine M2 is designated as 51/2 or the like. In addition, the application code 50 on each machine M1, M2, ... Mn is based on the same corrector 51 before or during loading, or before execution, or even after it has been performed. The rules are to correct (or substantially the same rules, because tiny optimization changes are allowed within each modifier 51/1, 51/2, ..., 51/n).
因為在此處提供的進一步說明之下將可更為瞭解到,本發明之特徵之一係使其出現應用碼50之一應用程式例證係橫跨所有該複數部機器M1,M2,...,Mn上同時地執行。在之後的許多細節中所說明者為本發明係由在每部機器上執行相同的應用程式碼來達到此目的(例如Microsoft Word或Adobe Photoshop CS2),但是修正每部機器上的應用程式之可執行碼為必要的,使得在該等機器M1~Mn中每部機器上每個執行事件(或"本地例證")可以將其本地作業與在其它機器之每一部上個別的事件之作業協調,使得該複數部機器中每一部上的每個事件可由一致性、協調及調和的方式一起工作,藉此使其外觀上為該應用及程式碼的一個共通例證(或事件)(即超應用(meta-application))。As will be further appreciated from the further description provided herein, one of the features of the present invention is that one of the application code 50 application examples spans all of the complex machines M1, M2, ... , Mn is performed simultaneously. In the many details that follow, the invention is implemented by executing the same application code on each machine (for example, Microsoft Word or Adobe Photoshop CS2), but correcting the application on each machine. The execution code is necessary so that each execution event (or "local illustration") on each machine in the machines M1~Mn can coordinate its local operations with the individual events on each of the other machines. Having each event on each of the plurality of machines work together in a consistent, coordinated, and reconciled manner, thereby making it a common illustration (or event) of the application and the code (ie, super Application (meta-application).
上述的配置之結果,如果每部機器M1,M2,...,Mn具有像是10MB之內部記憶體容量,則每個應用碼50可用之整個記憶體不需要做為一個可以期待為機器數目乘以10MB,或是所有n部機器之內部記憶體容量之增加性組合,但仍可僅為10MB。當該等機器的內部記憶體容量不同的狀況下,其係可允許的,然後在當一部機器中的內部記憶體小於至少一部其它機器之內部記憶體容量時,則任何機器之最小記憶體的大小可以做為該等機器之最大記憶體容量,其係當這種記憶體(或其一部份)被視為一「共用」記憶體(即在每部機器M1...Mn上類似相等的記憶體)或另外用於執行該共用應用碼。As a result of the above configuration, if each of the machines M1, M2, ..., Mn has an internal memory capacity of 10 MB, the entire memory available for each application code 50 need not be regarded as one that can be expected as the number of machines. Multiply by 10MB, or an increase in the internal memory capacity of all n machines, but still only 10MB. When the internal memory capacity of the machines is different, it is permissible, and then when the internal memory in one machine is smaller than the internal memory capacity of at least one other machine, then the minimum memory of any machine The size of the body can be used as the maximum memory capacity of the machines, when the memory (or a portion thereof) is treated as a "common" memory (ie on each machine M1...Mn) Similar to equal memory) or otherwise used to execute the shared application code.
但是,即使每部機器的內部記憶體被對待的方法初始時可呈現為效能的一種可能限制,這樣會如何造成改善的作業及效能將在以下更加明顯。自然地,每部機器M1,M2...,Mn具有一私密(即「非共用」)內部記憶體容量。該等機器M1,M2,...,Mn之私密內部記憶體容量通常大致相等,但不一定要相等。其亦較佳地是選擇每部機器中內部記憶體的大小,以達到每部機器中所想要的效能水準,並其橫跨連接的或耦合的複數部機器、電腦或資訊家電M1,M2,...,Mn之群集或網路。在已經說明了這些內部及共用記憶體的考量之後,其將可在此處所提供的說明之下瞭解到在機器之間可共用之記憶體大小並非本發明的一種限制。However, even if the internal memory of each machine is initially treated as a possible limitation of performance, how this will result in improved operation and performance will be more apparent below. Naturally, each machine M1, M2..., Mn has a private (ie "non-shared") internal memory capacity. The private internal memory capacities of the machines M1, M2, ..., Mn are generally approximately equal, but not necessarily equal. It is also preferred to select the size of the internal memory in each machine to achieve the desired level of performance in each machine, and across multiple connected or coupled machines, computers or information appliances M1, M2 ,..., Mn cluster or network. Having described these internal and shared memory considerations, it will be understood from the description provided herein that the memory size that can be shared between machines is not a limitation of the present invention.
由先前技術中已知可以在該應用的一特定語言中操作一單一電腦或機器(由多個製造商之一所製造,並具有以多種不同語言中的一種運作的一作業系統),藉由產生一虛擬機器,如第6圖所示。第6圖之碼、資料及虛擬機器組態或配置所採取的形式為以Java語言所寫成之應用碼50,並在一Java虛擬機器61內執行。因此,當該應用之內部語言為Java語言時,其使用一JAVA虛擬機器,其能夠在運作Java寫成的碼,而無關於機器製造商及該機器的內部細節。進一步的細節請參見美國Sun Microsystems公司T.Lindholm及F.Yellin所撰之“The JAVA Virtual Machine Specification”第2版,其在此引用做為參考。It is known from the prior art to operate a single computer or machine (manufactured by one of a plurality of manufacturers and having an operating system operating in one of a plurality of different languages) in a particular language of the application, Generate a virtual machine, as shown in Figure 6. The code, data, and virtual machine configuration or configuration of Figure 6 takes the form of an application code 50 written in the Java language and executed within a Java virtual machine 61. Thus, when the internal language of the application is the Java language, it uses a JAVA virtual machine that is capable of running Java-written code regardless of the machine manufacturer and the internal details of the machine. For further details, please refer to "The JAVA Virtual Machine Specification", 2nd Edition, by Sun Microsystems, Inc., T. Lindholm and F. Yellin, which is incorporated herein by reference.
第6圖之習用技術配置根據本發明之具體實施例做修正,其提供一額外的設施,習慣上稱之為「分散式執行時間」或「分散式執行時間系統」DRT 71,如第7圖中所示。The conventional technical configuration of Fig. 6 is modified in accordance with a specific embodiment of the present invention, which provides an additional facility, conventionally referred to as "decentralized execution time" or "decentralized execution time system" DRT 71, as shown in Fig. 7. Shown in .
在第7圖中,該應用碼50被載入到Java虛擬機器72中,並與該分散式執行時間系統71共同運作,其係透過箭頭75所指示的載入程序。如此處所使用之術語「分散式執行時間」及「分散式執行時間系統」,其基本上為同義字,其藉由例示(但非限制)可通常瞭解為包括程式庫碼及處理,其可支援在一特定平台上所執行以一特定語言寫成的軟體。此外,一分散式執行時間系統亦可包括程式庫碼及處理,其可支援在一特定分散式運算環境中執行之以一特定語言寫成的軟體。該執行時間系統基本上處理了該程式與該作業系統之間的介面之細節,例如系統呼叫、程式啟動及終止、及記憶體管理。為了說明背景,並未提供本發明所需要之創新的分散式執行時間或分散式執行時間系統71之能力的一習用分散式運算環境(DCE)可由該Open Software Foundation取得。此分散式運算環境(DCE)可執行在該等機器上執行之軟體的電腦對電腦通信的形式,但在其許多限制中,其不能夠實施此發明之修正或通信作業。在其許多功能及作業當中,本發明之DRT 71可協調該複數部機器M1,M2,...Mn之間的特定通信。再者,本發明之分散式執行時間71在由機器JVM#1,JVM#2,...JVM#n之每部JAVA虛擬機器72上的JAVA應用50之箭頭75所指出的載入程序期間開始作業。於載入期間的作業順序將在以下參考第9圖來說明。其將可在此處所提供之說明而瞭解到雖然此處提供的許多範例及說明皆相對於JAVA語言及JAVA虛擬機器來提供,所以讀者可以取得特定範例之好處,但本發明並不限於JAVA語言或JAVA虛擬機器,或是受限於任何其它語言、虛擬機器、機器或作業環境。In FIG. 7, the application code 50 is loaded into the Java virtual machine 72 and operates in conjunction with the distributed execution time system 71 via the load program indicated by arrow 75. As used herein, the terms "decentralized execution time" and "decentralized execution time system" are basically synonymous, and by way of illustration (but not limitation), they are generally understood to include library code and processing, which can be supported. Software written in a specific language on a particular platform. In addition, a decentralized execution time system can also include library code and processing that can support software written in a particular language that is executed in a particular distributed computing environment. The execution time system basically handles the details of the interface between the program and the operating system, such as system calls, program startup and termination, and memory management. To illustrate the background, a conventional distributed computing environment (DCE) that does not provide the innovative decentralized execution time or decentralized execution time system 71 required by the present invention is available from the Open Software Foundation. This Distributed Computing Environment (DCE) can take the form of computer-to-computer communication of software executing on such machines, but in many of its limitations, it is not capable of implementing the modification or communication operations of the present invention. Among its many functions and operations, the DRT 71 of the present invention can coordinate specific communications between the plurality of machines M1, M2, ... Mn. Furthermore, the decentralized execution time 71 of the present invention is during the load procedure indicated by arrow 75 of the JAVA application 50 on each of the JAVA virtual machines 72 of the machines JVM #1, JVM #2, ... JVM #n. Start the assignment. The sequence of jobs during loading will be explained below with reference to Figure 9. It will be appreciated from the description provided herein that although many of the examples and descriptions provided herein are provided in relation to the JAVA language and the JAVA virtual machine, the reader can achieve the benefits of a particular example, but the invention is not limited to the JAVA language. Or JAVA virtual machine, or limited to any other language, virtual machine, machine or work environment.
第8圖顯示了第5圖之配置的修正形式,其利用了JAVA虛擬機器,其每個在第7圖中例示。其將可瞭解到其再次地載入相同的應用碼50到每部機器M1,M2..Mn上。但是,每部機器M1,M2,...,Mn之間的通信,其由箭頭83代表,雖然透過該機器硬體做實體導引,其較佳地是由每部機器內個別的DRT 71/1...71/n所控制。因此,實際上此可在觀念上視為DRT的71/1,...71/n,其透過該網路或其它網路鏈結73來彼此通信,而非透過機器M1,M2,...Mn它們本身或彼此之間的直接通信。實際上,本發明考慮到並包括此機器M1,M2,...,Mn或DRT 71/1,71/2,...71/n之間的此直接通信或這些通信的組合。本發明之DRT 71提供的通信在傳輸、協定及鏈結上為獨立。Fig. 8 shows a modification of the configuration of Fig. 5, which utilizes JAVA virtual machines, each of which is illustrated in Fig. 7. It will be appreciated that it again loads the same application code 50 onto each machine M1, M2..Mn. However, the communication between each machine M1, M2, ..., Mn, represented by arrow 83, although physically guided by the machine hardware, is preferably by the individual DRT 71 within each machine. Controlled by /1...71/n. Therefore, in fact, this can be conceptually regarded as 71/1, ... 71/n of the DRT, which communicates with each other through the network or other network link 73, rather than through the machines M1, M2, .. .Mn are themselves direct communication with each other or with each other. In fact, the present invention contemplates and includes such direct communication or a combination of such communications between the machines M1, M2, ..., Mn or DRTs 71/1, 71/2, ... 71/n. The communication provided by the DRT 71 of the present invention is independent in transmission, protocol, and link.
其將可瞭解到在此處的說明之下,該修正子51及該分散式執行時間71會有另外的實施。例如,該修正子51可以實施該分散式執行時間71之一個組件或在其內,因此該DRT 71可以實施該修正子51之功能及作業。另外,該修正子51之功能及作業可以在用於實施該DRT 71之結構、軟體、韌體或其它手段之外實施。在一具體實施例中,該修正子51及DRT 71係實施或寫入在電腦程式碼的單一段落中,而可提供該DRT及修正子之功能。因此該修正子功能及結構可能包含在該DRT中,並視為一選擇性組件。在如何實施之外,該修正子功能及結構係負責修正該應用碼程式之可執行碼,且該分散式執行時間功能及結構係負責實施該等電腦或機器之間的通信。在一具體實施例中的通信功能係透過在每部機器上之DRT的電腦程式碼內的一中間協定層來實施。例如該DRT可實施在該JAVA語言中的一通信堆疊,並使用該傳輸控制協定/網際網路協定(TCP/IP)來提供該等機器之間的通信或對話。實際上這些功能或作業是如何實施或分割在結構性及/或程序性元素之間,或是在本發明之電腦程式碼或資料結構之間,皆比它們所提供者要來得不重要。It will be appreciated that under the description herein, the modifier 51 and the distributed execution time 71 will have additional implementations. For example, the modifier 51 can implement or be within a component of the distributed execution time 71, such that the DRT 71 can implement the functions and operations of the modifier 51. In addition, the function and operation of the corrector 51 can be implemented in addition to the structure, software, firmware or other means for implementing the DRT 71. In a specific embodiment, the modifier 51 and the DRT 71 are implemented or written in a single paragraph of the computer code, and the functions of the DRT and the modifier are provided. Therefore, the modifier function and structure may be included in the DRT and be regarded as an optional component. In addition to how it is implemented, the modifier function and structure is responsible for modifying the executable code of the application code program, and the distributed execution time function and structure is responsible for implementing communication between the computers or machines. The communication functions in a particular embodiment are implemented by an intermediate protocol layer within the computer code of the DRT on each machine. For example, the DRT can implement a communication stack in the JAVA language and use the Transmission Control Protocol/Internet Protocol (TCP/IP) to provide communication or conversation between the machines. In fact, how these functions or operations are implemented or divided between structural and/or procedural elements, or between the computer code or data structure of the present invention, is less important than the ones they provide.
但是,在第8圖所例示的配置中(亦在第31-32圖中),其提供複數部個別電腦或機器M1,M2,...Mn,其每個係透過一通信網路53或其它通信鏈結來互連,且每部個別的電腦或機器具有一修正子51(請參見第5圖),並由例如該分散式執行時間(DRT)71(參見第8圖)所釋放,並載入有一共用應用碼50。該術語共用應用程式係要理解為代表一應用程式或應用程式碼,其寫成在單一機器上作業,並載入在該複數部電腦或機器M1,M2...Mn上整體或部份地執行,或視需要在該複數部電腦或機器M1,M2...Mn之某個子集合中每一個之上來執行。但有些不同地是,有一種共用應用程式,以應用碼50所代表,且此單一複本或可能是複數個相同複本係被修正來產生該應用程式或程式碼的一修正複本或版本,每個複本或例證係預備在該複數部機器上執行。在它們被修正之後,如果它們執行類似的作業,並彼此一致性及調和性地操作,即視為是共用。其將可瞭解到,實施本發明之特徵的複數部電腦、機器、資訊家電或類似者,可視需要連接或耦合到並未實施本發明之特徵的其它電腦、機器、資訊家電或類似者。However, in the configuration illustrated in Figure 8 (also in Figures 31-32), it provides a plurality of individual computers or machines M1, M2, ... Mn, each of which is transmitted through a communication network 53 or Other communication links are interconnected, and each individual computer or machine has a modifier 51 (see Figure 5) and is released, for example, by the Decentralized Execution Time (DRT) 71 (see Figure 8). And loaded with a shared application code 50. The term shared application is understood to mean an application or application code written to be executed on a single machine and loaded on the computer or machine M1, M2...Mn in whole or in part. Or, as needed, on each of the plurality of sub-sets of the plurality of computers or machines M1, M2...Mn. But somewhat differently, there is a shared application, represented by application code 50, and this single copy or possibly multiple identical copies are modified to produce a modified copy or version of the application or code, each A copy or illustration is prepared to be executed on the plurality of machines. After they are corrected, they are considered to be shared if they perform similar jobs and operate consistently and harmonically. It will be appreciated that a plurality of computers, machines, information appliances, or the like, embodying features of the present invention, may be coupled or coupled to other computers, machines, information appliances, or the like that do not implement the features of the present invention, as desired.
基本上在至少一具體實施例中,該修正子51或DRT 71或其它碼修正手段即負責修正該應用碼50,所以其可在JAVA語言及虛擬機器環境中執行記憶體操縱作業,例如記憶體PUTSTATIC及PUTFIELD指令,其係在一協調的、一致及調和的方式,並橫跨該複數部個別機器M1...Mn之間。因此接下來在這種運算環境中,其必須保證每個記憶體位置以一致性的方式操縱(相對於其它者)。Basically, in at least one embodiment, the modifier 51 or the DRT 71 or other code modification means is responsible for modifying the application code 50, so that it can perform memory manipulation operations, such as memory, in a JAVA language and a virtual machine environment. The PUTSTATIC and PUTFIELD commands are in a coordinated, consistent, and harmonic manner and span between the individual machines M1...Mn of the complex portion. So next in this computing environment, it must ensure that each memory location is manipulated in a consistent manner (relative to the others).
在一些具體實施例中,部份或所有的該複數部個別電腦或機器可以包含在單一外殼或機殼內(例如所謂刀鋒伺服器,由Hewlett-Packard Development公司、Intel公司、IBM公司及其它所製造),或是實施在一單一印刷電路板上,或甚至在一單一晶片或晶片組內。In some embodiments, some or all of the plurality of individual computers or machines may be contained within a single enclosure or enclosure (eg, a so-called blade server, by Hewlett-Packard Development, Intel Corporation, IBM Corporation, and others). Manufactured) either on a single printed circuit board or even in a single wafer or wafer set.
一機器(由多家製造商中任何一家製造,並具有在多種不同語言中任何一種操作的一作業系統),其可在該應用程式碼50之特定語言中操作,在此例中為JAVA語言。也就是說,一JAVA虛擬機器72能夠操作在JAVA語言中的應用碼50,並利用無關於該機器製造商及該機器的內部細節之JAVA架構。A machine (manufactured by any of a number of manufacturers and having an operating system operating in any of a number of different languages) operable in a particular language of the application code 50, in this case a JAVA language . That is, a JAVA virtual machine 72 is capable of operating the application code 50 in the JAVA language and utilizing a JAVA architecture that is independent of the machine manufacturer and the internal details of the machine.
當實施在一非JAVA語言或應用碼環境中,該泛用化平台、及/或虛擬機器、及/或機器、及/或執行時間系統,皆能夠操作在該平台的語言中的應用碼50(可能包括例如(但不限於)任何一種或多種的原始碼語言、中介碼語言、物件碼語言、機器碼語言及任何其它碼語言),及/或虛擬機器、及/或機器、及/或執行時間系統環境,並利用該平台、及/或虛擬機器、及/或機器、及/或執行時間系統、及/或語言架構,而無關於該機器製造商及該機器的內部細節。其將亦可在此處所提供的說明中瞭解到該平台及/或執行時間系統可包括虛擬機器及非虛擬機器軟體及/或韌體架構,以及硬體及直接硬體編碼應用及實施。When implemented in a non-JAVA language or application code environment, the generalized platform, and/or virtual machine, and/or machine, and/or execution time system are capable of operating an application code 50 in the language of the platform. (may include, for example, but not limited to, any one or more of a source code language, a mediation code language, an object code language, a machine code language, and any other code language), and/or a virtual machine, and/or machine, and/or Execute the time system environment and utilize the platform, and/or virtual machine, and/or machine, and/or execution time system, and/or language architecture, regardless of the machine manufacturer and internal details of the machine. It will also be appreciated in the description provided herein that the platform and/or execution time system can include virtual machine and non-virtual machine software and/or firmware architectures, as well as hardware and direct hardware coding applications and implementations.
對於一更為一般性的虛擬機器或摘要機器環境的組合,且對於目前及未來的電腦及/或運算機器及/或資訊家電或處理系統,且其可不利用或不需要利用到類別及/或物件,本發明之結構、方法及電腦程式及電腦程式產品仍將可應用。不會利用類別及/或物件之電腦及/或運算機器之範例包括例如由Intel公司及其它公司所製造的x86電腦架構,由Sun Microsystems公司及其它公司所製造的SPARC電腦架構,及由IBM公司及其它公司所製造的PowerPC電腦架構,及由Apple電腦公司及其它公司所製造的個人電腦產品。對於這些種類的電腦、運算機器、資訊家電,及並未利用類別或物件觀念而在其上實施的虛擬機器或虛擬運算環境,例如其可被一般化來包括基本資料型別(例如整數資料型別、浮點資料型別、長整數資料型別、雙重資料型別、字串資料型別、符號資料型別及布林資料型別)、結構化資料型別(例如陣列及記錄)衍生的型別,或其它程序性語言的碼或資料結構、或其它語言及環境,例如函數、指標、組件、模組、結構、參照及集合。For a more general combination of virtual machine or abstract machine environments, and for current and future computer and/or computing machines and/or information appliances or processing systems, and which may or may not utilize categories and/or The structure, method, computer program and computer program product of the present invention will still be applicable. Examples of computers and/or computing machines that do not utilize categories and/or objects include, for example, x86 computer architectures manufactured by Intel Corporation and others, SPARC computer architectures manufactured by Sun Microsystems and others, and by IBM Corporation. And the PowerPC computer architecture manufactured by other companies, as well as personal computer products manufactured by Apple Computer and other companies. For these types of computers, computing machines, information appliances, and virtual machines or virtual computing environments that are not implemented using categories or objects, for example, they can be generalized to include basic data types (eg, integer data types). Different, floating point data type, long integer data type, double data type, string data type, symbol data type and Bolling data type), structured data type (such as array and record) Type, or code or data structure of other procedural languages, or other languages and environments, such as functions, indicators, components, modules, structures, references, and collections.
現在請參考第7圖及第9圖,於該載入程序75期間,該應用碼50正被載入到每個JAVA虛擬機器72上,其由DRT 71所修正。此修正在第9圖之步驟90中進行,並包含該初始步驟91,其較佳地細查或分析該碼,並偵測所有可由該應用碼50所定址的記憶體位置,或視需要為可由該應用碼50所定址的所有記憶體位置之某個子集合;例如像是有名稱及無名稱記憶體位置,變數(例如本地變數、共用變數、及正式引數到子例式或函數)、欄位、暫存器、或任何其它位址空間、或應用碼50可存取之位址的範圍。在某些例子中這種記憶體位置需要在步驟92及93中對於後續的處理來識別。在一些具體實施例中,對於進一步處理需要一個表列之偵測的記憶體位置,於該載入程序75期間的DRT 71產生一系列藉此被識別的所有記憶體位置。在一具體實施例中,形式為JAVA欄位的該等記憶體位置係由物件及類別來列出,但是該等記憶體位置、欄位或類似者可以用任何方式列出或組織,只要它們符合該系統之結構化及程式化需求,其上要使用該程式,及在此所述之本發明的原理。此偵測為選擇性,且並非在本發明之所有具體實施例中皆需要。其可注意到該DRT至少部份可以完成該修正子51之名單。Referring now to Figures 7 and 9, during the loader 75, the application code 50 is being loaded onto each JAVA virtual machine 72, which is modified by the DRT 71. This correction is performed in step 90 of Figure 9, and includes the initial step 91, which preferably scrutinizes or analyzes the code and detects all memory locations addressable by the application code 50, or as needed a subset of all memory locations that can be addressed by the application code 50; for example, such as a name and a no-name memory location, variables (eg, local variables, shared variables, and formal arguments to sub-examples or functions), The range of fields, scratchpads, or any other address space, or address that the application code 50 can access. In some instances such memory locations need to be identified in steps 92 and 93 for subsequent processing. In some embodiments, for further processing of memory locations that require detection of a list, the DRT 71 during the loader 75 generates a series of all memory locations that are thereby identified. In a specific embodiment, the memory locations in the form of JAVA fields are listed by objects and categories, but the memory locations, fields or the like may be listed or organized in any manner as long as they are This program is used in accordance with the structuring and stylization requirements of the system, and the principles of the invention described herein. This detection is optional and is not required in all embodiments of the invention. It may be noted that the DRT can at least partially complete the list of the modifiers 51.
該修正程序之下一階段(第9圖中指定的步驟92)[Step 92]係要搜尋整個應用碼50,藉以在需要時,定位出操縱或改變對應於在步驟91所產生的該表列之任何列出之記憶體位置的數值或內容(例如但不限於JAVA欄位)之活動。較佳地是,操縱或改變任何一或多個列出之記憶體位置的任何一或多個數值或內容之所以處理活動皆被定位出來。The next stage of the correction procedure (step 92 specified in Figure 9) [Step 92] is to search the entire application code 50 so that when needed, the manipulation or change corresponds to the list generated in step 91. The activity of the value or content of any listed memory location (such as, but not limited to, a JAVA field). Preferably, any one or more of the values or contents of any one or more of the listed memory locations are manipulated or changed so that processing activity is located.
當偵測到這種處理活動或作業(基本上是JAVA語言中的"putstatic"或"putfield",或例如一記憶體指定作業、或一記憶體寫入作業、或一記憶體操縱作業、或更為一般性作業,其另可操縱或改變記憶體或其它可定址區域之數值或內容),其可改變一列出的或偵測的記憶體位置之數值或內容,然後由應用碼50中的步驟93插入在一「更新傳遞例式」,其對應於該偵測到的記憶體操縱作業,以與所有其它機器通信,藉以通知所有其它機器該操縱的記憶體位置之識別,及該操縱的記憶體位置之更新過、操縱的或改變的數值或內容。該插入的「更新傳遞例式」較佳地是採取形式為方法、函數、程序或類似的子例式呼叫、或作業到DRT 71之網路通信程式庫。另外,該「更新傳遞例式」可採取一種碼區塊的選擇性形式(或其它線上碼形式),其插入到該應用碼指令串流,時機在對應於該偵測的操縱指令或作業期間、之後、之前或其它時間。而較佳地是,在一多工或平行處理機器環境(且在一些具體實施例中包含或不含作業系統),例如一種機器環境能夠有可能同時或同步執行多種或不同的執行緒或處理,該「更新傳遞例式」可在相同執行緒或處理或處理器上執行,如同步驟92之偵測的記憶體操縱作業。然後,該載入程序即繼續,藉著載入該修正的應用碼50在該機器72上,以取代該未修正的應用碼50,如第9圖之步驟94所表示。When such a processing activity or job is detected (basically "putstatic" or "putfield" in the JAVA language, or for example a memory specified job, or a memory write job, or a memory manipulation job, or A more general operation that can manipulate or change the value or content of a memory or other addressable area, which can change the value or content of a listed or detected memory location, and then by application code 50 Step 93 is inserted in an "update transfer example" corresponding to the detected memory manipulation job to communicate with all other machines to notify all other machines of the location of the manipulated memory, and the manipulation The value or content of an updated, manipulated, or changed memory location. The inserted "update transfer modality" is preferably a network communication library in the form of a method, function, program or similar sub-routine call, or job to DRT 71. In addition, the "update transfer example" may take a selective form of code blocks (or other online code form) that is inserted into the application code instruction stream at the timing of the manipulation instruction or job corresponding to the detection. , after, before or at other times. Preferably, in a multiplex or parallel processing machine environment (and in some embodiments with or without a operating system), for example, a machine environment can potentially perform multiple or different threads or processes simultaneously or simultaneously. The "update delivery example" can be executed on the same thread or processing or processor, as in the memory manipulation operation detected in step 92. The loader then continues by loading the modified application code 50 on the machine 72 in place of the uncorrected application code 50, as indicated by step 94 of FIG.
另一種在載入期間修正的形式例示於第10圖中。此處之開始及列表步驟90,91及該搜尋步驟92相同於第9圖。但是,除了插入該「更新傳遞例式」到該應用碼50當中係對應於在步驟92中所指的該偵測的記憶體操縱作業,如在步驟93中所代表,其中該DRT之應用碼50或網路通信程式庫碼71在相同的執行緒或處理或處理器上執行,如同該偵測到的記憶體操縱作業,執行該更新,而令一「警示例式」被插入以對應於步驟103中的該偵測到的記憶體操縱作業。該「警示例式」指示、通知、或另可要求一不同且可能同時或同步地執行執行緒或處理或處理器,其並未用於執行該記憶體操縱作業(也就是說,不同於操縱該記憶體位置之執行緒或處理或處理器之一不同的執行緒或處理或處理器),例如配置給該DRT 71之不同的執行緒或處理,以執行該操縱的記憶體位置之識別的所有其它機器之通知、傳遞或通信,以及該操縱的記憶體位置之更新、操縱、或改變的數值或內容。Another form of correction during loading is illustrated in Figure 10. The start and list steps 90, 91 and the search step 92 are the same as in FIG. However, in addition to inserting the "update transfer modality" into the application code 50, the memory manipulation operation corresponding to the detection indicated in step 92 is represented, as represented in step 93, wherein the application code of the DRT 50 or the network communication library code 71 is executed on the same thread or processing or processor, as the detected memory manipulation job, performs the update, and an "alarm example" is inserted to correspond to The detected memory in step 103 manipulates the job. The "alarm example" indication, notification, or otherwise may require a different and possibly simultaneous or synchronous execution of a thread or process or processor that is not used to perform the memory manipulation operation (ie, different than manipulation) The memory location or the processor or processor or processor or processor (eg, a different thread or processor or processor) configured to provide different threads or processing to the DRT 71 to perform identification of the memory location of the manipulation The notification, transmission or communication of all other machines, and the value or content of the update, manipulation, or change of the memory location of the manipulation.
一旦於該載入程序期間的此修正已經發生,且該修正的應用碼50開始執行,則為發生第11圖或第12圖之步驟。第11圖(及其中的步驟112,113,114及115)對應於該修正的應用碼50之執行及作業,當其根據在第9圖中所揭示及描述的程序來修正時。另一方面第12圖(其中的步驟112,113,125,127及115)在其中揭示對應於該修正的應用碼50之執行及作業,當其根據第10圖做修正時。Once this correction has occurred during the loading procedure and the modified application code 50 begins to execute, the steps of Figure 11 or Figure 12 occur. Figure 11 (and steps 112, 113, 114 and 115 therein) corresponds to the execution and operation of the modified application code 50 when it is modified according to the procedure disclosed and described in Figure 9. On the other hand, Fig. 12 (steps 112, 113, 125, 127 and 115 therein) discloses therein the execution and operation of the application code 50 corresponding to the correction, when it is corrected according to Fig. 10.
此該應用碼50之分析或細查可在載入該應用程式碼50之前、或在該應用程式碼50載入程序期間發生,或甚至在該應用程式碼50載入程序之後發生。其可類似於一安裝、程式轉換、轉譯、或編譯程序,其中該應用碼可用額外的指令來實施,及/或另可由意義保留程式操縱所修正,即/或選擇性地由一輸入碼語言轉譯到一不同的碼語言(例如像是由原始碼語言或中介碼語言轉譯到物件碼語言或機器碼語言),並瞭解到該術語編譯通常或習用上包含了碼或語言中的改變,例如由原始碼或物件碼,或由一種語言到另一種語言。但是,在本例中該術語「編譯」(及其文法上同等者)並沒有那麼多限制,且亦可包括或含有在相同碼或語言內的修正。例如,該編譯及其同等者可瞭解為同時包含正常編譯(例如像是藉由例示而非限制,由原始碼到物件碼),且由原始碼編譯成原始碼,以及由物件碼編譯到物件碼,以及其中任何改變的組合。其亦可包括所謂的「中介碼語言」,其形式為「虛擬物件碼」。The analysis or scrutiny of the application code 50 may occur prior to loading the application code 50, or during loading of the application code 50, or even after the application code 50 loads the program. It can be similar to an installation, program conversion, translation, or compiler, where the application code can be implemented with additional instructions, and/or can be modified by meaning retention program manipulation, ie, or alternatively by an input code language. Translating into a different code language (for example, translation from a source code language or an intermediate code language to an object code language or a machine code language), and knowing that the term compilation usually or customally contains changes in the code or language, such as From source code or object code, or from one language to another. However, in this example the term "compilation" (and its grammatical equivalents) is not so limited and may include or contain amendments within the same code or language. For example, the compilation and its equivalents can be understood to include both normal compilation (eg, by way of illustration and not limitation, from source code to object code), and compiled from source code to source code, and compiled from object code to object. The code, and any combination of any of them. It may also include a so-called "mediation code language" in the form of "virtual object code".
藉由例示且並非限制,在一具體實施例中,該應用碼50之分析或細查可在載入該應用程式碼期間發生,例如藉由該作業系統由該硬碟或其它儲存裝置或來源讀取該應用碼,並將其複製到記憶體,並預備開始執行該應用程式碼。在另一具體實施例中,於JAVA虛擬機器中,該分析或細查可在該java.lang.ClassLoader loadClass方法(如java.lang.ClassLoader.loadClass())之類別載入程序期間發生。By way of illustration and not limitation, in one embodiment, analysis or scrutiny of the application code 50 may occur during loading of the application code, such as by the operating system from the hard disk or other storage device or source. The application code is read, copied to memory, and ready to begin execution of the application code. In another embodiment, in a JAVA virtual machine, the analysis or scrutiny can occur during a class loader of the java.lang.ClassLoader loadClass method (eg, java.lang.ClassLoader.loadClass()).
另外,該應用碼50之分析或細查可以甚至在該應用程式碼載入程序之後發生,例如在該作業系統已經載入該應用碼到記憶體之後,或選擇性地甚至在該應用程式碼之相關的對應部份已經開始執行之後,例如像是在該JAVA虛擬機器已經載入該應用碼到該虛擬機器當中之後,其係透過"java.lang.ClassLoader.loadClass()"方法,且選擇性地進行執行。In addition, the analysis or scrutiny of the application code 50 can occur even after the application code loading program, for example, after the operating system has loaded the application code into the memory, or alternatively even in the application code. After the relevant corresponding part has been executed, for example, after the JAVA virtual machine has loaded the application code into the virtual machine, it adopts the "java.lang.ClassLoader.loadClass()" method and selects Execute sexually.
如第11圖所示,一多重執行緒處理機器環境110存在於每部機器M1,...Mn之上,並包含執行緒111/1...111/4。該第二執行緒111/2之處理及執行(在此範例中)造成步驟113中執行緒111/2操縱一記憶體位置,其藉由寫入到一列出的記憶體位置。根據第9圖之步驟90-94中對於該應用碼50所做的修正,該應用碼50係在對應於步驟113之記憶體位置的地方被修正,所以其傳遞、通知或通信步驟113之操縱的記憶體位置之識別及改變的數值到其它機器M2,...Mn,其係透過網路53或其它通信鏈結或路徑,如步驟114中所示。在此階段,該執行緒111/2之應用碼50之處理可被改變,在某些狀況下在步驟114中藉由執行該插入的「更新傳遞例式」所中斷,且相同的執行緒111/2通知或傳遞或通信步驟113之操縱的記憶體位置之識別及改變的數值到所有其它機器M2,...Mn,透過該網路53或其它通信鏈結或路徑。在該通知、傳遞或通信程序114結束時,該執行緒111/2即繼續在步驟115中之修正的應用碼50之處理或執行。As shown in Fig. 11, a multi-thread processing machine environment 110 exists on each of the machines M1, ... Mn and includes threads 111/1 ... 111/4. The processing and execution of the second thread 111/2 (in this example) causes the thread 111/2 to manipulate a memory location in step 113 by writing to a listed memory location. According to the correction for the application code 50 in steps 90-94 of FIG. 9, the application code 50 is corrected at the location corresponding to the memory location of step 113, so its manipulation, notification or communication step 113 is manipulated. The identification of the memory location and the changed value to other machines M2, ... Mn, through the network 53 or other communication link or path, as shown in step 114. At this stage, the processing of the application code 50 of the thread 111/2 can be changed, in some cases interrupted by executing the inserted "update transfer example" in step 114, and the same thread 111 The identification or change value of the memory location manipulated by the /2 notification or transfer or communication step 113 to all other machines M2, ... Mn, through the network 53 or other communication link or path. At the end of the notification, delivery or communication program 114, the thread 111/2 continues the processing or execution of the application code 50 modified in step 115.
在第12圖所示的另一種配置中,一多重執行緒處理機器環境110包含或具有執行緒111/1,...111/3,及一同時或同步執行DRT處理環境120包含該執行緒121/1,如圖所示,或選擇性複數個執行緒,皆在機器M1,...Mn的每一部上執行。在執行緒111/2之修正的應用碼50之處理及執行造成步驟113之記憶體操縱作業,其在此例中為寫入到一列出的記憶體位置。根據在第9圖中步驟90,91,92,103及94中對於該應用碼50所做的修正,該應用碼50係對應到步驟113之寫入到記憶體位置之地方被修正,所以其要求或另外通知該DRT處理環境120之執行緒來通知或傳遞或通信步驟113之操縱的記憶體位置之識別及改變的數值到其它機器M2,...Mn上,如步驟125及128,及箭頭127所示。根據此修正,該執行緒111/2處理及執行該修正的應用碼50要求該DRT處理環境120之一不同及可能同時或同步執行緒或處理(例如執行緒121/1)來通知步驟113之操縱的記憶體位置之識別及改變的數值到該等機器M2,...Mn,其系透過網路53或其它通信鏈結或路徑,如步驟125及箭頭127所示。回應於步驟125及箭頭127之要求,該DRT處理環境120之一不同及可能同時或同步執行緒或處理121/1及透過網路53或其它通信鏈結或路徑通知該等機器M2,...,Mn步驟113之操縱的記憶體位置之識別及改變的數值,其係由在步驟125之執行緒111/2及箭頭127上執行的修正應用碼50所要求。In another configuration, shown in FIG. 12, a multi-thread processing machine environment 110 includes or has threads 111/1, ... 111/3, and a simultaneous or synchronous execution DRT processing environment 120 includes the execution. Thread 121/1, as shown, or optionally a plurality of threads, are executed on each of the machines M1, ... Mn. The processing and execution of the application code 50, as modified by the thread 111/2, results in the memory manipulation operation of step 113, which in this example is written to a listed memory location. According to the corrections made to the application code 50 in steps 90, 91, 92, 103 and 94 in FIG. 9, the application code 50 is corrected corresponding to the position written to the memory location in step 113, so its requirement or In addition, the DRT processing environment 120 is notified to notify or communicate or communicate the identification of the memory location of the manipulation of step 113 and the changed value to other machines M2, . . . Mn, as in steps 125 and 128, and arrow 127. Shown. According to this modification, the thread 111/2 processing and the application code 50 for performing the correction require that one of the DRT processing environments 120 is different and may simultaneously or synchronously execute a thread or process (eg, thread 121/1) to notify step 113. The identified and changed values of the manipulated memory locations are to the machines M2, ... Mn, which pass through the network 53 or other communication links or paths, as indicated by step 125 and arrow 127. In response to the requirements of step 125 and arrow 127, one of the DRT processing environments 120 is different and may simultaneously or synchronously execute the thread or process 121/1 and notify the machines M2 via the network 53 or other communication link or path, .. The value of the identification and change of the memory location manipulated by the Mn step 113 is required by the correction application code 50 executed on the thread 111/2 and the arrow 127 of the step 125.
當相較於稍早說明之第11圖之執行緒111/2之步驟114,第12圖之執行緒111/2的步驟125可以快速地進行,因為執行緒111/2之步驟114必須透過該相當慢的網路53(例如當相較於第1圖之內部記憶體匯流排4或第2圖之共用記憶體13時為相當慢)通知或通信機器M2,...,Mn步驟113之操縱的記憶體位置之識別及改變的數值,其中執行緒111/2之步驟125並為透過該相當慢的網路53通信於機器M2.,,,Mn。而是,執行緒111/2之步驟125要求或是另外通知該DRT處理環境120之一不同及可能同時或同步執行緒121/1來透過該相當慢的網路53通知及傳遞步驟113之操縱的記憶體位置之識別及改變的數值到機器M2,...Mn,如箭頭127所示。因此執行步驟125之執行緒111/2僅在該執行緒111/2重新開始或繼續在步驟115中的修正之應用碼的處理或執行之前被暫時地中斷。然後該DRT處理環境120之其它執行緒121/1則透過該相當慢的網路53或其它相當慢的通信鏈結或路徑傳送步驟113之操縱的記憶體位置之識別及改變的數值到機器M2,...Mn。Step 125 of the thread 111/2 of Fig. 12 can be performed quickly, as compared to step 114 of the thread 111/2 of Fig. 11 explained earlier, because the step 114 of the thread 111/2 must pass through the A relatively slow network 53 (e.g., relatively slow when compared to the internal memory bus 4 of Figure 1 or the shared memory 13 of Figure 2) notification or communication machine M2, ..., Mn step 113 The value of the manipulated memory location is identified and changed, wherein step 125 of thread 111/2 communicates with machine M2.,, Mn through the relatively slow network 53. Rather, step 125 of thread 111/2 requires or otherwise informs one of the DRT processing environments 120 that it is different and possibly simultaneously or synchronously executing thread 121/1 to notify and communicate the manipulation of step 113 via the relatively slow network 53. The identification of the memory location and the changed value to the machine M2, ... Mn, as indicated by arrow 127. Therefore, the thread 111/2 executing step 125 is temporarily interrupted only before the thread 111/2 restarts or continues the processing or execution of the modified application code in step 115. The other threads 121/1 of the DRT processing environment 120 then transmit the identified and changed values of the memory locations manipulated in step 113 to the machine M2 via the relatively slow network 53 or other relatively slow communication link or path. ,...Mn.
第12圖之第二配置可較佳地利用多個執行緒111/1...111/3及121/1的處理能力(通常其並未受到相等的需求)。無關於所使用的配置,步驟113之操縱的記憶體位置之識別及改變的數值在該網路53或其它通信鏈結或路徑上被傳遞到所有其它的機器M2...Mn上。The second configuration of Fig. 12 preferably utilizes the processing power of a plurality of threads 111/1...111/3 and 121/1 (generally they are not subjected to equal requirements). Regardless of the configuration used, the identification and changed values of the memory locations manipulated in step 113 are communicated to all other machines M2...Mn on the network 53 or other communication link or path.
此係例示於第13圖,其中第11圖之步驟114或DRT 71/1(對應於第12圖之DRT處理環境120)及其第12圖之執行緒121/1(由第13圖之步驟128所代表),透過該網路53或其它通信鏈結或路徑傳送第11圖及第12圖之步驟113之操縱的記憶體位置之識別及改變的數值到每一部其它的機器M2,...,Mn。請參考第13圖,每一部其它機器M2,...,Mn執行自該網路53接收的動作,例如來自機器M1之步驟113之操縱的記憶體位置之識別及改變的數值,由箭頭135所代表,並寫入在步驟135所接收的數值到對應於在步驟135所接收之識別的記憶體位置之本地記憶體位置,如步驟136所示。This is illustrated in Fig. 13, in which step 114 of FIG. 11 or DRT 71/1 (corresponding to DRT processing environment 120 of Fig. 12) and its thread 12/1 of Fig. 12 (step by Fig. 13) 128 represents), through the network 53 or other communication link or path, the identification and change values of the memory locations manipulated in step 113 of FIG. 11 and FIG. 12 are transmitted to each of the other machines M2. .., Mn. Referring to Fig. 13, each of the other machines M2, ..., Mn performs an action received from the network 53, such as the identification and change of the memory position from the manipulation of step 113 of the machine M1, by the arrow Represented by 135, and write the value received at step 135 to the local memory location corresponding to the identified memory location received at step 135, as shown in step 136.
在第3圖之習用配置中,其利用分散式軟體、由一機器的軟體做記憶體存取到實體上位在另一部機器上之記憶體,其係由該網路所互連的機器所允許。但是,因為該讀取及/或寫入記憶體存取到實體上位在另一部電腦上的記憶體需要使用該慢速網路14,在這些配置中,這種記憶體存取會造成記憶體讀取/寫入處理作業之實質的延遲,其等級可能在該機器之中央處理單元的106 -107 循環左右,但最終會根據多種因素,例如像是該網路14之速率、頻寬及/或遲滯而定。此大多數會造成在第3圖之先前技術配置中多個互連之機器的效能降低。In the conventional configuration of FIG. 3, the distributed software is used, and the memory of one machine is used as the memory to access the memory of the physical device on the other machine, which is connected by the network. allow. However, because the read and/or write memory accesses the memory of the physical host on another computer, the slow network 14 is required. In these configurations, the memory access causes memory. The substantial delay of the bulk read/write processing operation may be around 10 6 - 10 7 cycles of the central processing unit of the machine, but will eventually depend on various factors, such as the rate and frequency of the network 14 Width and / or delay. Most of this would result in reduced performance of multiple interconnected machines in the prior art configuration of Figure 3.
但是,在關連於第8圖之上述的本配置中,其將可瞭解到所有記憶體位置或資料之讀取可在本地滿足,因為所有(或所有的某個子集合)記憶體位置之目前數值係儲存在執行產生該需求來讀取記憶體之處理的機器上。However, in the present configuration described above in relation to Figure 8, it will be appreciated that all memory locations or data reads can be satisfied locally because of the current values of all (or all of a subset) memory locations. It is stored on the machine that performs the process of generating the request to read the memory.
類似地,在關連於第8圖之上述的本配置中,其將可瞭解到所有記憶體位置或資料之寫入可在本地滿足,因為所有(或所有的某個子集合)記憶體位置之目前數值係儲存在執行產生該需求來寫入到記憶體之處理的機器上。Similarly, in the present configuration described above in connection with Fig. 8, it will be understood that all memory locations or data writes can be satisfied locally because all (or all of a subset) memory locations are currently present. The values are stored on a machine that performs the process of generating the request for writing to the memory.
根據本發明所執行的這種本地記憶體讀取及寫入處理作業基本上可在該中央處理單元的102 -103 循環內被滿足。因此實際上,對於牽涉到讀取之記憶體存取會比相對於第3圖所示及說明的配置會有實質上較短的等待。此外,實際上對於牽涉到寫入之記憶體存取會比相對於第3圖所示及說明的配置會有實質上較短的等待。Such local memory read and write processing operations performed in accordance with the present invention are substantially satisfied within 10 2 - 10 3 cycles of the central processing unit. Thus, in practice, memory accesses involving reads will have substantially shorter waits than those shown and described with respect to FIG. In addition, there is actually a substantially shorter wait for memory accesses involving writes than for the configurations shown and described with respect to FIG.
其可瞭解到大部份應用軟體較常會讀取記憶體,而較不會經常寫入到記憶體。因此,記憶體被寫入或重新寫入之速率相較於記憶體被讀取之速率相對較低。由於對於記憶體寫入或重新寫入之需求較慢,該記憶體位置或欄位可以透過可能相對較慢及較便宜之商用網路53來以一相對慢的速率來連續地更新,然而此可能相對較慢之速率足以滿足寫入到記憶體之應用程式的需求。此結果為第8圖配置之效能可優於第3圖所示。其可在此處所提供之說明之下瞭解到當一相對較慢的網路通信鏈結或路徑53因為其可提供所想要的效能及低成本而可較佳地被使用時,本發明並不限於一相對慢速之網路連接,且可使用任何通信鏈結或路徑。本發明無關於傳輸、網路及通信路徑,且不會根據機器或DRT之間的通信是如何發生。在一具體實施例中,甚至機器或DRT之間的電子郵件(EMAIL)交換即已足以用於通信。It can be seen that most application software reads memory more often, and less often writes to memory. Therefore, the rate at which the memory is written or rewritten is relatively lower than the rate at which the memory is read. Since the need for memory writing or rewriting is slow, the memory location or field can be continuously updated at a relatively slow rate through a relatively slow and inexpensive commercial network 53. The rate may be relatively slow enough to meet the needs of applications written to memory. The result of this configuration for Figure 8 is better than that shown in Figure 3. It can be appreciated from the description provided herein that when a relatively slow network communication link or path 53 is preferably used because it provides the desired performance and low cost, the present invention Not limited to a relatively slow network connection, and any communication link or path can be used. The invention is not related to transmission, network and communication paths and does not occur depending on the communication between the machine or the DRT. In a specific embodiment, even an email (EMAIL) exchange between the machine or DRT is sufficient for communication.
在關於上述之另一種選擇性修正中,在網路53上所傳送之一操縱的記憶體位置之識別及改變數值配對,每個配對基本上係以例如一單一封包、訊框或單元的整個內容來傳送,其可被群組成對應於多重操縱的記憶體位置之識別及改變數值之多重配對的批次,並在網路53或其它通信鏈結或路徑上以一單一封包、訊框或單元來一起傳送。此另外的修正進一步降低了互連這些多種機器的網路53或其它通信鏈結或路徑之通信速率的需求,因為每個封包、單元或訊框可包含多重識別及改變數值配對,因此僅需要傳送較少的封包、訊框或單元。In another alternative modification described above, the identification of the manipulated memory locations transmitted on the network 53 and the changing of the value pairing, each pairing is substantially for example a single packet, frame or unit. Content to be transmitted, which can be grouped into batches corresponding to the identification of multiple manipulated memory locations and multiple pairs of varying values, and a single packet, frame on the network 53 or other communication link or path Or units to send together. This additional correction further reduces the need to interconnect the communication rates of the network 53 or other communication links or paths of these various machines, as each packet, unit or frame can include multiple identifications and changing value pairs, so only need Send fewer packets, frames, or cells.
其可瞭解到在該應用程式碼重複地寫入到一單一記憶體位置的環境中,步驟114之第11圖中所例示的具體實施例傳送一更新及傳遞訊息到對應於每一個執行的記憶體操縱作業之所有機器上。在關於上述的又另一種選擇性修正中,第12圖之DRT執行緒121/1並不需要執行對應於每一個本地記憶體操縱作業之一更新及傳遞作業,但另可傳送比記憶體操縱作業要較少的更新及傳遞訊息,每個訊息包含該操縱的記憶體位置之最後或最新改變的數值或內容,或依需要僅可傳送對應於該最後的記憶體操縱作業之一單一更新及傳遞訊息。此進一步的改善可降低對於該網路53或其它通信鏈結或路徑之需求,因為僅需要傳送較少的封包、訊框或單元。It can be appreciated that in an environment where the application code is repeatedly written to a single memory location, the embodiment illustrated in FIG. 11 of FIG. 114 transmits an update and delivers a message to a memory corresponding to each execution. Body manipulation on all machines. In still another alternative modification described above, the DRT thread 121/1 of FIG. 12 does not need to perform one update and transfer operation corresponding to each local memory manipulation job, but can also transmit specific memory manipulation. The job requires less updates and messages, each message containing the last or most recent changed value or content of the manipulated memory location, or only a single update corresponding to the last memory manipulation job can be transmitted and Pass the message. This further improvement may reduce the need for the network 53 or other communication links or paths as only a small number of packets, frames or units need to be transmitted.
對於本技術專業人士在此處所提供之詳細說明之下亦可瞭解到當初始記錄或產生所有記憶體位置(或欄位)、或其所有的某個子集合時,由每個DRT 71所產生的一表格、或表列、或其它資料結構對於在每部機器M1,...,Mn上每個這種記錄的記憶體位置,有一個名稱或識別在每一部機器M1,...,Mn上為共用或類似。但是,在個別機器中,對應於一給定名稱或識別(例如在第9圖之步驟91中所列出者)的本地記憶體位置將會隨時間改變,因為每部機器可以及通常將根據其本身的內部處理而儲存改變的記憶體數值或內容在不同的記憶體位置中。因此,每個DRT中的表格、表列或其它資料結構對應於一單一記憶體名稱或識別通常將具有不同的本地記憶體位置,但每個共用「記憶體名稱」或識別將具有相同的「記憶體數值」儲存在不同的本地記憶體位置中。It will also be apparent to those skilled in the art from the detailed description provided herein that each DRT 71 is generated when the initial recording or generation of all memory locations (or fields), or any subset thereof, is made. A table, or list, or other data structure for each such recorded memory location on each machine M1,..., Mn has a name or identification in each machine M1,..., Mn is common or similar. However, in individual machines, the local memory location corresponding to a given name or identification (eg, as listed in step 91 of Figure 9) will change over time as each machine can and will typically be based on Its own internal processing stores the changed memory value or content in different memory locations. Therefore, the table, table column or other data structure in each DRT corresponds to a single memory name or identification will usually have a different local memory location, but each shared "memory name" or identification will have the same " The memory value is stored in a different local memory location.
本技術專業人士在此處所提供的說明之下亦將可瞭解到在載入該應用程式碼50之前述的修正期間可用多種方式或藉由不同的手段來完成。這些方式或手段包括(但不限於)至少下述的五種方法,或這五種之變化或組合,其中包括有:(i)在載入時重新編譯,(ii)在載入之前藉由一預編譯程序,(iii)在載入之前編譯,(iv)一「即時性」編譯,或(v)在載入之後重新編譯(但是或例如在一分散式環境中執行相關或相對應的應用碼之前)。It will also be appreciated by those skilled in the art from the description provided herein that the above-described corrections for loading the application code 50 can be accomplished in a variety of ways or by different means. These means or means include, but are not limited to, at least the following five methods, or variations or combinations of the five, including: (i) recompilation at load time, (ii) by loading prior to loading a precompiled program, (iii) compiled before loading, (iv) an "immediate" compilation, or (v) recompiled after loading (but or performing related or corresponding, for example, in a decentralized environment Before applying the code).
傳統上該術語「編譯」意指碼或語言的改變,例如由原始碼到物件碼,或是一種語言到另一種。清楚地是在本說明中使用該術語「編譯」(及其文法上同等者)並沒有那麼多限制,且亦可包括或含有在相同碼或語言內的修正。Traditionally the term "compilation" refers to a change in code or language, such as from source code to object code, or from one language to another. It is expressly intended that the term "compilation" (and its grammatical equivalents) as used in this specification is not so limited and may include or contain modifications within the same code or language.
對於修正記憶體操縱作業來協調複數部機器M1...Mn之間的作業之基本觀念,有數種不同方式或具體實施例當中此協調、調和及一致性記憶體狀態及操縱作業觀念、方法及程序可以進行或實施。For the basic idea of correcting the memory manipulation operation to coordinate the operation between the plurality of machines M1...Mn, there are several different ways or specific embodiments of the coordination, reconciliation and consistency memory state and manipulation concepts and methods. The program can be carried out or implemented.
在第一具體實施例中,一特定機器,如機器M2,載入該資產(例如類別或物件),其包括有記憶體操縱作業,修正它,然後將包含有新修正的記憶體操縱作業的修正物件(或類別或其它資產或資源)載入到每一部其它的機器上M1,M3,...Mn(其可依序或同時,或根據任何其它順序、例式或程序)。請注意到對應於該應用碼中僅一個物件可以有一或複數個記憶體操縱作業,或對應於在該應用碼中的複數個物件可有複數個記憶體操縱作業。請注意到在一具體實施例中,被載入的該記憶體操縱作業為二元化可執行物件碼。另外,被載入的該記憶體操縱作業為可執行的中間碼。In a first embodiment, a particular machine, such as machine M2, loads the asset (eg, category or item), which includes a memory manipulation job, corrects it, and then loads the memory containing the new correction. Corrected objects (or categories or other assets or resources) are loaded onto each of the other machines M1, M3, ... Mn (either sequentially or simultaneously, or according to any other order, exemplification or procedure). Please note that there may be one or more memory manipulation jobs corresponding to only one object in the application code, or a plurality of memory manipulation operations corresponding to a plurality of objects in the application code. Please note that in one embodiment, the memory manipulation job loaded is a binary executable object code. In addition, the loaded memory manipulation job is an executable intermediate code.
在此配置中,其可使用術語「主控者/受控者」,每部受控(或次級)機器M1,M3,...Mn載入該修正的物件(或類別),並包含由該主控(或主要)機器(例如機器M2,或某個其它機器,如第15圖中之機器X)在該電腦通信網路或其它通信鏈結或路徑上傳送給它的新修正的記憶體操縱作業。在對於此「主控者/受控者」或「主要/次級」配置的些微變化中,該電腦通信網路可由一共用的儲存裝置所取代,例如一共用的檔案系統、或一共用的文件/檔案儲存區,例如一共用的資料庫。In this configuration, the term "master/controller" can be used, and each controlled (or secondary) machine M1, M3, ... Mn loads the corrected object (or category) and contains Newly modified by the master (or primary) machine (eg machine M2, or some other machine, such as machine X in Figure 15) on the computer communication network or other communication link or path The memory manipulates the job. In some minor changes to this "master/controller" or "primary/secondary" configuration, the computer communication network may be replaced by a shared storage device, such as a shared file system, or a shared File/file storage area, such as a shared database.
請注意到在每部機器或電腦上執行的修正不需要且經常不會是相同或類似。其所需要的是它們係以足夠類似的方式被修正,而其係根據此處所述之創新原理,該複數部機器之每一步對於其它機器為一致性且調和性地完成此處所述的作業及目的。再者,在此處所提供之說明之下將可瞭解到有大量的方法可以實施修正,例如可以根據該特定硬體、架構、作業系統、應用程式碼、或類似者或其它因素而定。其亦可瞭解到本發明之具體實施例可以在一作業系統內、或在任何作業系統之外或不具有其好處,在該虛擬機器內,在一EPROM內,在一軟體、韌體,或是這些的任何組合當中來實施。Please note that the corrections performed on each machine or computer are not required and often not the same or similar. What is needed is that they are modified in a sufficiently similar manner, and in accordance with the innovative principles described herein, each step of the plurality of machines performs consistently and harmonically for the other machines described herein. Homework and purpose. Furthermore, it will be appreciated from the description provided herein that there are numerous ways in which modifications can be implemented, such as depending on the particular hardware, architecture, operating system, application code, or the like or other factors. It will also be appreciated that embodiments of the present invention may or may not have the benefit of being within an operating system, or within any operating system, within an EPROM, in a software, firmware, or It is implemented in any combination of these.
在又另外的具體實施例中,每部機器M1,...,Mn接收該未修正的資產(例如類別或物件),其中包含有一或多個記憶體操縱作業,但修正該作業,然後載入包含有現在修正的作業之資產(例如類別或物件)。雖然一種機器(例如該主控或主要機器)可以顧客化或執行一不同的修正到傳送給每部機器之記憶體操縱作業,此具體實施例更可立即使得由每部機器所進行之修正略微不同,並基於其特定的機器架構、硬體、處理器、記憶體、組態、作業系統或其它因素來改進、顧客化及/或最佳化,然而仍類似、調和並與其它機器一致於所有其它類似的修正及特性,其不需要一定類似或相同。In still other embodiments, each machine M1, . . . , Mn receives the uncorrected asset (eg, category or item) containing one or more memory manipulation jobs, but corrects the job and then Enter an asset (such as a category or object) that contains the currently corrected job. While a machine (e.g., the master or primary machine) can customize or perform a different correction to a memory manipulation job that is transmitted to each machine, this embodiment can immediately make minor corrections made by each machine. Different, and improved, customized, and/or optimized based on their specific machine architecture, hardware, processor, memory, configuration, operating system, or other factors, yet still similar, reconciled, and consistent with other machines All other similar corrections and features need not necessarily be similar or identical.
在所述之所有具體實施例中,供應或傳送該資產碼(例如類別碼或物件碼)給該等機器M1,...Mn者,且視需要包含第15圖的一機器X,其可分支、分散或傳送於不同機器之任何組合或排列之間;例如藉由提供直接機器對機器通信(例如直接由M2供應每部M1,M3,M4等),或藉由提供或使用一串接或序列性通信(例如M2供應M1,其然後供應M3,然後供應M4,依此類推),或是該直接及串接及/或序列性的組合。In all of the specific embodiments described, the asset code (eg, a category code or an object code) is supplied or transmitted to the machines M1, . . . Mn, and a machine X of FIG. 15 is included as needed. Branching, decentralizing or transmitting between any combination or arrangement of different machines; for example by providing direct machine-to-machine communication (eg, supplying each M1, M3, M4, etc. directly from M2), or by providing or using a serial connection Or serial communication (eg, M2 supplies M1, which then supplies M3, then M4, and so on), or the combination of direct and concatenated and/or serial.
請參考所附的附錄A,其中:附錄A5為修正之前來自一記憶體操縱作業之典型的碼區段(例如具有一記憶體操縱作業之範例性未修正的例式),而附錄A6為在修正之後相同的具有一記憶體操縱作業之例式(例如具有一記憶體操縱作業之範例性修正的例式)。這些碼區段僅為範例性,並可識別一軟體碼手段,用以執行在一範例性語言中的修正。其將可瞭解到可以使用其它軟體/韌體或電腦程式碼來完成相同或類似的功能或作業,其皆不背離本發明。Please refer to Appendix A attached, where: Appendix A5 is a typical code segment from a memory manipulation operation (for example, an example unmodified example with a memory manipulation operation), and Appendix A6 is The same example with a memory manipulation operation after correction (for example, an example with an exemplary modification of a memory manipulation operation). These code segments are merely exemplary and a software code means can be identified for performing the corrections in an exemplary language. It will be appreciated that other software/firmware or computer code can be used to accomplish the same or similar functions or operations without departing from the invention.
附錄A5及A6(亦在以下的表VI及表VII中重現)為範例性碼表列,其提供了一例式的習用或未修正的電腦程式軟體碼(例如可用於單一機器或電腦環境中),其具有應用程式碼50之一記憶體操縱作業,及相同例式的一後修正摘錄,例如可用於本發明之具有多重機器的具體實施例中。加入到該例式之修正過的碼以粗體文字來強調。Appendixes A5 and A6 (also reproduced in Tables VI and VII below) are exemplary codelists that provide an example of a conventional or uncorrected computer program software code (for example, for use in a single machine or computer environment). ), which has one of the application code 50 memory manipulation operations, and a post-correction excerpt of the same example, such as may be used in the specific embodiment of the present invention having multiple machines. The corrected code added to the example is highlighted in bold text.
其要注意到在該附錄中的編譯過的碼與在該表格中重複的部份採用的形式為檔案"example.java"之原始碼,其係包括在附錄A7(表VIII)中。在附錄A5及表VI之程序中,步驟001之程序名稱"Method void setValues(int,int)"為"example.java"之編譯過應用碼之setValues方法之顯示的解碼輸出的名稱。該名稱"Method void setValues(int,int)"為任選的,其對此範例選擇出來代表包含一記憶體操縱作業之一典型JAVA方法。整個方法係負責透過使用一記憶體操縱指定敘述(在此範例中為"putstatic"及"putfield")及該等步驟來寫入兩個數值或兩個不同的記憶體位置來完成在此所述之目的。It should be noted that the compiled code in the appendix and the part in the form repeated in the table are in the form of the file "example.java", which is included in Appendix A7 (Table VIII). In the procedures of Appendix A5 and Table VI, the program name "Method void setValues(int, int)" of step 001 is the name of the decoded output of the display of the setValues method of the compiled code of "example.java". The name "Method void setValues(int, int)" is optional, and this example is chosen to represent a typical JAVA method that includes a memory manipulation job. The entire method is responsible for completing the description by using a memory manipulation specification ("putstatic" and "putfield" in this example) and the steps to write two values or two different memory locations. The purpose.
第一(步驟002),該Java虛擬機器指令"iload_1"造成該Java虛擬機器在該目前方法訊框之索引1處載入該整數值於該本地變數陣列中,並儲存此項目在目前方法訊框之堆疊的最上方,並造成該整數值傳送到此方法做為該第一引數,並儲存在索引1的本地變數陣列中,並推入到該堆疊上。First (step 002), the Java virtual machine instruction "iload_1" causes the Java virtual machine to load the integer value in the local variable array at index 1 of the current method frame, and store the item in the current method. The top of the stack of boxes, and causes the integer value to be passed to this method as the first argument, and stored in the local variable array of index 1 and pushed onto the stack.
該Java虛擬機器指令"putstatic #3<Field int static Value>"(步驟003)造成該Java虛擬機器將最上方數值推出目前方法訊框的堆疊,並儲存該數值到由包含此範例setValues()方法之應用程式的classfile結構之第三個索引中的CONSTANT Fieldref info constant-pool項目所指定的靜態欄位中,並使得該目前方法訊框之堆疊的最上方數值被儲存在稱為"staticValue"的整數欄位中。The Java virtual machine instruction "putstatic #3<Field int static Value>" (step 003) causes the Java virtual machine to push the topmost value out of the stack of the current method frame and store the value to the method containing the setValues() method. The third field of the application's classfile structure is in the static field specified by the CONSTANT Fieldref info constant-pool item, and the uppermost value of the stack of the current method frame is stored in a file called "staticValue". In the integer field.
該Java虛擬機器指令"aload_1"(步驟004)造成該Java虛擬機器在該目前方法訊框之索引0處載入該項目於該本地變數陣列中,並儲存此項目在目前方法訊框之堆疊的最上方,並造成「此」物件參照儲存在索引0的本地變數陣列中,並推入到該堆疊上。The Java virtual machine instruction "aload_1" (step 004) causes the Java virtual machine to load the item in the local variable array at index 0 of the current method frame and store the item in the stack of the current method frame. At the top, causing the "this" object to be referenced in the local variable array stored in index 0 and pushed onto the stack.
首先(步驟005),該Java虛擬機器指令"iload_2"造成該Java虛擬機器在該目前方法訊框之索引2處載入該整數值於該本地變數陣列中,並儲存此項目在目前方法訊框之堆疊的最上方,並造成該整數值傳送到此方法做為該第一引數,並儲存在索引2的本地變數陣列中,並推入到該堆疊上。First (step 005), the Java virtual machine instruction "iload_2" causes the Java virtual machine to load the integer value in the local variable array at index 2 of the current method frame, and store the item in the current method frame. The top of the stack, and causes the integer value to be passed to this method as the first argument, and stored in the local variable array of index 2, and pushed onto the stack.
該Java虛擬機器指令"putfield #2<Field int instanceValue>"(步驟006)使得該Java虛擬機器將最上方兩個數值推出該目前方法訊框的堆疊,並由儲存最上方數值在包含此範例setValues方法之應用程式的classfile結構的第2個索引中的CONSTANT_Fieldref_info constant-pool項目所指定,並造成在該目前方法訊框之堆疊上方的整數值被儲存在該物件參照的稱為"instanceValue"之例證欄位中,在該堆疊的整數值之下。The Java virtual machine instruction "putfield #2<Field int instanceValue>" (step 006) causes the Java virtual machine to push the top two values out of the stack of the current method frame, and by storing the top value in the sample setValues The CONSTANT_Fieldref_info constant-pool item specified in the second index of the application's classfile structure, and causes the integer value above the stack of the current method frame to be stored in the object referenced as "instanceValue" In the field, below the integer value of the stack.
最後,該JAVA虛擬機器指令"return"(步驟007)使得該JAVA虛擬機器藉由傳回控制給先前的方法訊框來中止執行此setValues()方法,並造成中止執行此setValues()方法。Finally, the JAVA virtual machine instruction "return" (step 007) causes the JAVA virtual machine to abort execution of the setValues() method by returning control to the previous method frame and causing the execution of the setValues() method to be aborted.
由於這些在第1圖及第2圖中習用組態的單一機器上作業的步驟,該JAVA虛擬機器操縱(即寫入)該staticValue及instanceValue記憶體位置,並在執行包含該等記憶體操縱作業之setValues()方法中能夠保證該記憶體正是且保持一單一應用例證之多個執行緒之間的一致性,因此可保證不想要的行為(例如像是一單一應用例證之多個執行緒之間的不一致或不調和的記憶體)會這種不一致或不調和的記憶體例如為相對於一單一記憶體位置之不正確、或不同數值或內容並不會發生)。如果這些要在第5圖及第8圖之組態的複數部機器上進行,藉由同步地執行該應用程式碼50在該複數部機器M1...Mn之每一部上,在每一部機器上每一個同步執行的應用程式發生之記憶體操縱作業將會被執行,但不具有任何其它機器之間的協調,這種協調例如為更新每部機器上的相對應記憶體位置,使得它們每一個皆回報一相同內容或數值。若是以橫跨複數部機器之一致性、協調及調和的記憶體狀態及操縱與更新作業為目標,此先前技術配置將無法執行這種橫跨複數部機器之一致性、協調及調和的記憶體狀態及操縱與更新作業,因為每部機器僅在本地執行記憶體操縱,並不會嘗試與在任何一部或超過一部機器上的任何其它類似記憶體狀態來協調或更新它們的本地記憶體狀態及操縱作業。因此這種配置由於不協調、不一致及/或不調和的記憶體操縱及更新作業將會造成機器M1..Mn之間不一致及不調和的記憶體狀態。因此,本發明的目標為克服此先前技術配置之限制。Due to the steps of working on a single machine configured in the first and second figures, the JAVA virtual machine manipulates (ie, writes) the staticValue and instanceValue memory locations, and performs the operation including the memory operations. The setValues() method guarantees that the memory is exactly the same as and maintains the consistency between multiple threads of a single application, thus ensuring unwanted behavior (such as multiple threads like a single application example). Inconsistent or non-harmonized memory between such inconsistent or uncoordinated memories, such as incorrect or different values or contents relative to a single memory location, does not occur). If these are to be performed on the plurality of machines configured in Figures 5 and 8, by executing the application code 50 synchronously on each of the plurality of machines M1...Mn, at each The memory manipulation jobs that occur for each of the simultaneously executing applications on the machine will be executed, but without any coordination between other machines, such as updating the corresponding memory locations on each machine, Each of them returns an identical content or value. This prior art configuration will not be able to perform this consistency, coordination, and reconciliation of memory across multiple complexes, with the goal of aligning, coordinating, and reconciling the memory state and manipulation and update operations across multiple machines. Status and manipulation and update jobs, as each machine performs memory manipulation only locally and does not attempt to coordinate or update their local memory with any other similar memory state on any or more than one machine. Status and operation. Therefore, this configuration may result in inconsistent and unharmonized memory states between the machines M1..Mn due to uncoordinated, inconsistent, and/or unharmonized memory manipulation and update operations. Accordingly, it is an object of the present invention to overcome the limitations of this prior art configuration.
在表VII(附錄A6)之範例碼中,該碼已被修正,所以其解決了在來自表VI(附錄A5)之碼範例中未能解決之對於複數部機器M1...Mn之一致性、協調的記憶體操縱及更新作業問題。在此修正的setValues()方法碼中,一"ldc#4<String"example">指令被插入在該"putstatic #3"指令之後,使其成為執行"putstaic #3"指令之後的第一個指令。此造成該JAVA虛擬機器將該字串值"example"載入到該目前方法訊框的堆疊上,並造成此字串值"example"被載入到該目前方法訊框的堆疊最上方。此改變很明顯,因為其修正該setValues()方法來載入對應於包含由該"putstatic #3"指令寫入到該堆疊上之靜態欄位位置之類別的類別名稱之一字串識別項。In the example code of Table VII (Appendix A6), the code has been corrected, so it solves the consistency of the complex machine M1...Mn that could not be solved in the code example from Table VI (Appendix A5). Coordinated memory manipulation and update operation problems. In the modified setValues() method code, an "ldc#4<String" example"> instruction is inserted after the "putstatic #3" instruction, making it the first after executing the "putstaic #3" instruction. The instruction causes the JAVA virtual machine to load the string value "example" onto the stack of the current method frame, and causes the string value "example" to be loaded to the top of the stack of the current method frame. This change is obvious because it fixes the setValues() method to load a string identifier corresponding to the category name containing the category of the static field position written to the stack by the "putstatic #3" instruction. .
再者,該JAVA虛擬機器指令"iconst_0"被插入在該"ldc #4"指令之後,所以該JAVA虛擬機器載入整數值"0"到該目前方法訊框之堆疊上,並造成該整數值"0"被載入到該目前方法訊框之堆疊的最上方。此改變很明顯,因為其修正了該setValues()方法來載入一整數值,其在此範例中為"0",其代表由先前"putstatic #3"作業所操縱之記憶體位置(欄位)之識別。其要注意到用於實施本發明之記憶體識別項的選擇或特定形式僅用於例示的目的。在此範例中,該整數值"0"為用於該操縱的記憶體位置之識別項,並對應於該"staticValue"欄位做為該"example.java"應用之第一欄位,如附錄A7所示。因此,對應於該"putstatic #3"指令,該"iconst_0"指令載入對應於該"putstatic #3"指令之操縱的欄位之索引的該整數值"0",且其在本例中為"example.java"的第一欄位,因此該"0"整數索引值到該堆疊上。Furthermore, the JAVA virtual machine instruction "iconst_0" is inserted after the "ldc #4" instruction, so the JAVA virtual machine loads the integer value "0" onto the stack of the current method frame and causes the integer value "0" is loaded to the top of the stack of the current method frame. This change is obvious because it fixes the setValues() method to load an integer value, which in this example is "0", which represents the memory location manipulated by the previous "putstatic #3" job (field Identification. It is to be noted that the selection or specific form of the memory identification item used to practice the invention is for illustrative purposes only. In this example, the integer value "0" is the identification of the memory location for the manipulation and corresponds to the "staticValue" field as the first field of the "example.java" application, as in the appendix. As shown in A7. Thus, corresponding to the "putstatic #3" instruction, the "iconst_0" instruction loads the integer value "0" of the index of the field corresponding to the manipulation of the "putstatic #3" instruction, and in this example The first field of "example.java", so the "0" integer index value is on the stack.
此外,該JAVA虛擬機器指令"invokestatic #5<Method boolean alert(java.lang.Object,int)>"被插入在"iconst_0"指令之後,所以該JAVA虛擬機器將最上方兩個項目推出該目前方法訊框的堆疊(其根據先前"ldc #4"指令為一參照到該字串物件,並具有數值"example"對應於所操縱欄位所屬的類別之名稱,且該整數"0"對應於在該example.java應用中該操縱欄位的索引),並引起"alert"方法,傳送最上方兩個項目推出該堆疊到新的方法訊框做為其前兩個引數。此改變很明顯,因為其修正setValues()方法來執行該"alert"方法及相關的作業,對應於該setValues()方法之先前的記憶體操縱作業(也就是說,該"putstatic #3"指令)。In addition, the JAVA virtual machine instruction "invokestatic #5<Method boolean alert(java.lang.Object, int)>" is inserted after the "iconst_0" instruction, so the JAVA virtual machine pushes the top two items out of the current method. The stack of frames (which is referred to the string object according to the previous "ldc #4" instruction, and has the value "example" corresponding to the name of the category to which the manipulated field belongs, and the integer "0" corresponds to The example.java application indexes the manipulation field) and causes the "alert" method to send the top two items to push the stack to the new method frame as its first two arguments. This change is obvious because it fixes the setValues() method to execute the "alert" method and related jobs, corresponding to the previous memory manipulation job of the setValues() method (that is, the "putstatic #3" instruction) ).
類似地,在此修正的setValues()方法碼,一"aload_0"指令係插入在該"putfield #2"指令之後,使其成為執行該"putfield #2"指令之後的第一指令。此造成該JAVA虛擬機器來載入先前"putfield #2"指令所屬的操縱欄位之範例類別的例證物件到該目前方法訊框之堆疊上,並造成由對應於該"putfield #2"指令寫入的例證欄位之物件參照,載入到該目前方法訊框之堆疊的上方。此改變很明顯,因為其修正該setValues()方法來載入一參照到對應於該操縱欄位的物件到該堆疊上。Similarly, in this modified setValues() method code, an "aload_0" instruction is inserted after the "putfield #2" instruction, making it the first instruction after executing the "putfield #2" instruction. This causes the JAVA virtual machine to load the exemplified object of the example category of the manipulation field to which the previous "putfield #2" instruction belongs to the stack of the current method frame and cause the instruction to be written corresponding to the "putfield #2" instruction. The object reference of the entered example field is loaded onto the stack of the current method frame. This change is obvious because it corrects the setValues() method to load a reference to the object corresponding to the manipulation field onto the stack.
再者,該JAVA虛擬機器指令"iconst_1"係插入在該"aload_0"指令之後,所以該JAVA虛擬機器載入一整數值"1"到該目前方法訊框之堆疊上,並造成整數值"1"被載入到該目前方法訊框之堆疊的上方。此改變很明顯,因為其修正該setValues()方法來載入一整數值,其在此範例中為"1",其代表由先前"putfield #2"作業所操縱的該記憶體位置(欄位)之識別。其要注意到用於實施本發明之識別項的選擇或特定形式僅做為例示的目的。在此範例中,該整數值"1"對應於該"instanceValue"欄位做為該"example.java"應用之第二欄位,如附錄A7所示。因此,對應於該"putfield #2"指令,該"iconst_1"指令載入對應於該"putfield #2"指令之操縱的欄位之索引的該整數值"1",且其在此例中,"example.java"之第二欄位,因此為該"1"整數索引值,載入到該堆疊上。Furthermore, the JAVA virtual machine instruction "iconst_1" is inserted after the "aload_0" instruction, so the JAVA virtual machine loads an integer value "1" onto the stack of the current method frame and causes an integer value of "1". "Loaded above the stack of the current method frame. This change is obvious because it fixes the setValues() method to load an integer value, which in this example is "1", which represents the memory location (field) manipulated by the previous "putfield #2" job. Identification. It is to be noted that the selection or specific form of the identification items used to implement the invention is only for the purpose of illustration. In this example, the integer value "1" corresponds to the "instanceValue" field as the second field of the "example.java" application, as shown in Appendix A7. Thus, corresponding to the "putfield #2" instruction, the "iconst_1" instruction loads the integer value "1" corresponding to the index of the field of manipulation of the "putfield #2" instruction, and in this example, The second field of "example.java", hence the "1" integer index value, is loaded onto the stack.
此外,該JAVA虛擬機器指令"invokestatic #5<Method boolean alert(java.lang.Object,int)>"被插入在該"iconst_1"指令之後,所以該JAVA虛擬機器推出最上方兩個項目離開該目前方法訊框之堆疊(其係根據先前的"aload_0"指令為一參照到該操縱的例證欄位所屬之物件的該物件,且該整數"1"對應於在該example.java應用之操縱的欄位之索引),並引起該"alert"方法,傳送推出該堆疊的最上方兩個項目到該新方法訊框作為其前兩個引數。此改變很明顯,因為其修正該setValues()方法來執行該"alert"方法及相關的作業,對應於該setValues()方法之先前的記憶體操縱作業(也就是說該"putfield #2"指令)。In addition, the JAVA virtual machine instruction "invokestatic #5<Method boolean alert(java.lang.Object, int)>" is inserted after the "iconst_1" instruction, so the JAVA virtual machine launches the top two items leaving the current Stack of method frames (which is based on the previous "aload_0" instruction as a reference to the object to which the illustrated field of the manipulation belongs, and the integer "1" corresponds to the column in the manipulation of the example.java application Bit index) and cause the "alert" method to send the top two items of the stack to the new method frame as its first two arguments. This change is obvious because it fixes the setValues() method to execute the "alert" method and related jobs, corresponding to the previous memory manipulation job of the setValues() method (that is, the "putfield #2" instruction ).
該方法void alert(java.lang.Object,int),為附錄A8之FieldAlert碼之部份及該分散式執行時間系統(DRT)71之部份,要求或另通知執行附錄A9之FieldSend.java碼之一DRT執行緒121/1,以更新及傳遞該操縱的記憶體位置之改變的識別及數值到該複數部機器M1...Mn。The method void alert(java.lang.Object, int) is part of the FieldAlert code of Appendix A8 and part of the Decentralized Execution Time System (DRT) 71, requiring or otherwise notifying the implementation of the FieldSend.java code of Appendix A9. One of the DRT threads 121/1 updates and transmits the identification and value of the change in the memory position of the manipulation to the complex machine M1...Mn.
其將可瞭解到該修正的碼在具有複數部電腦或運算機器之一分散式運算環境中允許該記憶體操縱作業之協調的作業,所以關於在該複數部機器M1...Mn上未修正的碼或程序之作業的問題(例如像是不一致及不調和的記憶體狀態及操縱及更新作業)在當應用該修正的碼或程序時並不會發生。It will be understood that the modified code allows the memory to operate in coordination in a distributed computing environment having a plurality of computers or computing machines, so that no correction is made on the complex machine M1...Mn. Problems with the operation of the code or program (such as inconsistent and unharmonized memory states and manipulation and update operations) do not occur when the modified code or program is applied.
請再次回到第14圖,其所示為一單一先前技術電腦操作為一JAVA虛擬機器之架構圖。依此方法,一機器(由多家製造商中任何一家製造,並具有在多種不同語言中任何一種操作的一作業系統),其可在該應用程式碼50之特定語言中操作,在此例中為JAVA語言。也就是說,一JAVA虛擬機器72能夠操作在JAVA語言中的應用碼50,並利用無關於該機器製造商及該機器的內部細節之JAVA架構。Please return to Figure 14 again, which shows an architectural diagram of a single prior art computer operating as a JAVA virtual machine. In this way, a machine (manufactured by any of a number of manufacturers and having an operating system operating in any of a number of different languages) can operate in a particular language of the application code 50, in this case In the middle of the JAVA language. That is, a JAVA virtual machine 72 is capable of operating the application code 50 in the JAVA language and utilizing a JAVA architecture that is independent of the machine manufacturer and the internal details of the machine.
當實施在一非JAVA語言或應用碼環境中,該泛用化平台、及/或虛擬機器、及/或機器、及/或執行時間系統,皆能夠操作在該平台的語言中的應用碼50(可能包括例如(但不限於)任何一種或多種的原始碼語言、中介碼語言、物件碼語言、機器碼語言及任何其它碼語言),及/或虛擬機器、及/或機器、及/或執行時間系統環境,並利用該平台、及/或虛擬機器、及/或機器、及/或執行時間系統、及/或語言架構,而無關於該機器製造商及該機器的內部細節。其將亦可在此處所提供的說明中瞭解到該平台及/或執行時間系統可包括虛擬機器及非虛擬機器軟體及/或韌體架構,以及硬體及直接硬體編碼應用及實施。When implemented in a non-JAVA language or application code environment, the generalized platform, and/or virtual machine, and/or machine, and/or execution time system are capable of operating an application code 50 in the language of the platform. (may include, for example, but not limited to, any one or more of a source code language, a mediation code language, an object code language, a machine code language, and any other code language), and/or a virtual machine, and/or machine, and/or Execute the time system environment and utilize the platform, and/or virtual machine, and/or machine, and/or execution time system, and/or language architecture, regardless of the machine manufacturer and internal details of the machine. It will also be appreciated in the description provided herein that the platform and/or execution time system can include virtual machine and non-virtual machine software and/or firmware architectures, as well as hardware and direct hardware coding applications and implementations.
回到該JAVA語言虛擬機器環境之範例,在該JAVA語言中,當載入一給定的類別檔案50A,僅會發生一次的類別初始化例式<clinit>。但是,該物件初始化例式<init>基本上經常發生,例如該物件初始化例式通常在每次產生一新物件(例如一物件50X,50Y或50Z)時發生。此外,在該JAVA環境及其它機器或其它使用類別及物件結構之執行時間系統環境,類別(通常為比物件更廣的類別)在物件之前載入(其為較窄的類別,且其中該物件屬於或被識別為一特定類別),所以在第14圖所示的該應用碼50中,其具有一單一類別50A及三個物件50X,50Y及50Z,該第一類別50A先被載入,然後載入第一物件50X,然後載入第二物件50Y,最後載入第三物件50Z。Returning to the example of the JAVA language virtual machine environment, in the JAVA language, when a given category file 50A is loaded, only one category initialization instance <clinit> occurs. However, the object initialization example <init> occurs quite often, for example, the object initialization routine typically occurs each time a new object (eg, an object 50X, 50Y, or 50Z) is created. In addition, in the execution environment system environment of the JAVA environment and other machine or other usage categories and object structures, the category (usually a wider category than the object) is loaded before the object (which is a narrower category, and wherein the object It belongs to or is recognized as a specific category), so in the application code 50 shown in FIG. 14, it has a single category 50A and three objects 50X, 50Y and 50Z, and the first category 50A is loaded first. The first object 50X is then loaded, then the second object 50Y is loaded, and finally the third object 50Z is loaded.
如對於第14圖所示之具體實施例,其中僅有一單一電腦或機器72(且非複數部連接或耦合的電腦或機器),則在執行該初始化例式(像是類別及物件初始化例式)當中不會產生衝突或不一致性,其會要在該載入程序期間作業,因為對於習用的作業,每個初始化例式僅由該單一虛擬機器或機器或執行時間系統或語言環境執行一次,其視需要可對每一個該一或多個類別及一或多個物件屬於或識別為該類別,或同等者,其中並未使用術語類別及物件。As for the specific embodiment shown in Fig. 14, in which there is only a single computer or machine 72 (and a computer or machine to which a plurality of parts are connected or coupled), the initialization example (such as category and object initialization example) is executed. There is no conflict or inconsistency in it, it will be a job during the loader, because for a custom job, each initialization instance is executed only once by the single virtual machine or machine or execution time system or locale. Each of the one or more categories and one or more items may belong to or be identified as the category, or equivalent, where the term category and the item are not used.
對於一更為一般性的虛擬機器或摘要機器環境的組合,且對於目前及未來的電腦及/或運算機器及/或資訊家電或處理系統,且其可不利用或不需要利用到類別及/或物件,本發明之結構、方法及電腦程式及電腦程式產品仍決將可應用。不會利用類別及/或物件之電腦及/或運算機器之範例包括例如由Intel公司及其它公司所製造的x86電腦架構,由Sun Microsystems公司及其它公司所製造的SPARC電腦架構,及由IBM公司及其它公司所製造的PowerPC電腦架構,及由Apple電腦公司及其它公司所製造的個人電腦產品。對於這些種類的電腦、運算機器、資訊家電,及並未利用類別或物件觀念而在其上實施的虛擬機器或虛擬運算環境,例如其可被一般化來包括基本資料型別(例如整數資料型別、浮點資料型別、長整數資料型別、雙重資料型別、字串資料型別、符號資料型別及布林資料型別)、結構化資料型別(例如陣列及記錄)衍生的型別,或其它程序性語言的其它碼或資料結構、或其它語言及環境,例如函數、指標、組件、模組、結構、參照及集合。For a more general combination of virtual machine or abstract machine environments, and for current and future computer and/or computing machines and/or information appliances or processing systems, and which may or may not utilize categories and/or The structure, method, computer program and computer program product of the present invention will still be applicable. Examples of computers and/or computing machines that do not utilize categories and/or objects include, for example, x86 computer architectures manufactured by Intel Corporation and others, SPARC computer architectures manufactured by Sun Microsystems and others, and by IBM Corporation. And the PowerPC computer architecture manufactured by other companies, as well as personal computer products manufactured by Apple Computer and other companies. For these types of computers, computing machines, information appliances, and virtual machines or virtual computing environments that are not implemented using categories or objects, for example, they can be generalized to include basic data types (eg, integer data types). Different, floating point data type, long integer data type, double data type, string data type, symbol data type and Bolling data type), structured data type (such as array and record) Type, or other code or data structure of other procedural languages, or other languages and environments, such as functions, indicators, components, modules, structures, references, and collections.
回到該JAVA語言虛擬機器環境之範例,在該JAVA語言中,當載入一給定的類別檔案50A,僅會發生一次的類別初始化例式<clinit>。但是,該物件初始化例式<init>基本上經常發生,例如該物件初始化例式通常在每次產生一新物件(例如一物件50X,50Y或50Z)時發生。此外,在該JAVA環境及其它機器或其它使用類別及物件結構之執行時間系統環境,類別(比物件更廣的類別)在物件之前載入(其為較窄的類別,且其中該物件屬於或被識別為一特定類別),所以在第14圖所示的該應用碼50中,其具有一單一類別50A及三個物件50X-50Z,該第一類別50A先被載入,然後載入第一物件50X,然後載入第二物件50Y,最後載入第三物件50Z。Returning to the example of the JAVA language virtual machine environment, in the JAVA language, when a given category file 50A is loaded, only one category initialization instance <clinit> occurs. However, the object initialization example <init> occurs quite often, for example, the object initialization routine typically occurs each time a new object (eg, an object 50X, 50Y, or 50Z) is created. In addition, in the execution environment system environment of the JAVA environment and other machine or other usage categories and object structures, the category (a wider category than the object) is loaded before the object (which is a narrower category, and wherein the object belongs to or It is recognized as a specific category), so in the application code 50 shown in Fig. 14, it has a single category 50A and three objects 50X-50Z, the first category 50A is first loaded, and then loaded into the first An object 50X is then loaded into the second object 50Y and finally loaded into the third object 50Z.
如對於第14圖所示之具體實施例,其中僅有一單一電腦或機器72(且非複數部連接或耦合的機器),則在執行該初始化例式(即該類別初始化例式<clinit>及該物件初始化例式<init>)當中不會產生衝突或不一致性,其會要在該載入程序期間作業,因為對於習用的作業,每個初始化例式僅由該單一虛擬機器或機器或執行時間系統或語言環境執行一次,其視需要可對每一個該一或多個類別及一或多個物件屬於或識別為該類別。As for the specific embodiment shown in FIG. 14, in which there is only a single computer or machine 72 (and a machine that is not connected or coupled by a plurality of parts), the initialization example is executed (ie, the category initialization example <clinit> and There is no conflict or inconsistency in the object initialization instance <init>, which will be run during the loader, because for a custom job, each initialization instance is only executed by the single virtual machine or machine. The time system or locale is executed once, and may belong to or be identified as each of the one or more categories and one or more items as needed.
但是,在第8圖所例示的配置中(亦在第31-33圖中),其提供複數部個別電腦或機器M1,M2,...Mn,其每個係透過一通信網路53或其它通信鏈結來互連,且每部個別的電腦或機器具有一修正子51(請參見第5圖),並由例如該分散式執行時間(DRT)71(參見第8圖)所釋放,並載入有一共用應用碼50。該術語共用應用程式係要理解為代表一應用程式或應用程式碼,其寫成在單一機器上作業,並載入在該複數部電腦或機器M1,M2...Mn上整體或部份地執行,或視需要在該複數部電腦或機器M1,M2...Mn之某個子集合中每一個之上來執行。但有些不同地是,有一種共用應用程式,以應用碼50所代表,且此單一複本或可能是複數個相同複本係被修正來產生該應用程式或程式碼的一修正複本或版本,每個複本或例證係預備在該複數部機器上執行。在它們被修正之後,如果它們執行類似的作業,並彼此一致性及調和性地操作,即視為是共用。其將可瞭解到,實施本發明之特徵的複數部電腦、機器、資訊家電或類似者,可視需要連接或耦合到並未實施本發明之特徵的其它電腦、機器、資訊家電或類似者。However, in the configuration illustrated in Figure 8 (also in Figures 31-33), it provides a plurality of individual computers or machines M1, M2, ... Mn, each of which is transmitted through a communication network 53 or Other communication links are interconnected, and each individual computer or machine has a modifier 51 (see Figure 5) and is released, for example, by the Decentralized Execution Time (DRT) 71 (see Figure 8). And loaded with a shared application code 50. The term shared application is understood to mean an application or application code written to be executed on a single machine and loaded on the computer or machine M1, M2...Mn in whole or in part. Or, as needed, on each of the plurality of sub-sets of the plurality of computers or machines M1, M2...Mn. But somewhat differently, there is a shared application, represented by application code 50, and this single copy or possibly multiple identical copies are modified to produce a modified copy or version of the application or code, each A copy or illustration is prepared to be executed on the plurality of machines. After they are corrected, they are considered to be shared if they perform similar jobs and operate consistently and harmonically. It will be appreciated that a plurality of computers, machines, information appliances, or the like, embodying features of the present invention, may be coupled or coupled to other computers, machines, information appliances, or the like that do not implement the features of the present invention, as desired.
在一些具體實施例中,部份或所有的該複數部個別電腦或機器可以包含在單一外殼或機殼內(例如所謂刀鋒伺服器,由Hewlett-Packard Development公司、Intel公司、IBM公司及其它所製造),或是實施在一單一印刷電路板上,或甚至在一單一晶片或晶片組內。In some embodiments, some or all of the plurality of individual computers or machines may be contained within a single enclosure or enclosure (eg, a so-called blade server, by Hewlett-Packard Development, Intel Corporation, IBM Corporation, and others). Manufactured) either on a single printed circuit board or even in a single wafer or wafer set.
基本上該修正子51或DRT 71或其它碼修正手段即負責修正該應用碼50,所以其可在JAVA語言及虛擬機器環境中執行初始化例式或其它初始化作業,例如像是在該JAVA語言及虛擬機器環境中的類別及物件初始化方法或例式,其係在一協調的、一致及調和的方式,並橫跨該複數部個別機器M1,M2...Mn之間。因此在這種運算環境中其依循必須要保證在每部個別的機器M1,M2...Mn上的本地物件及類別以一致性方式(相對於彼此)被初始化。Basically, the corrector 51 or the DRT 71 or other code correction means is responsible for correcting the application code 50, so that it can perform initialization routines or other initialization operations in the JAVA language and the virtual machine environment, for example, in the JAVA language and A class and object initialization method or exemplification in a virtual machine environment is in a coordinated, consistent, and harmonized manner and spans between the plurality of individual machines M1, M2...Mn. It is therefore necessary in this computing environment to ensure that local objects and classes on each individual machine M1, M2...Mn are initialized in a consistent manner (relative to each other).
其將可瞭解到在此處的說明之下,該修正子51及該分散式執行時間71會有另外的實施。例如,該修正子51可以實施該分散式執行時間71之一個組件或在其內,因此該DRT 71可以實施該修正子51之功能及作業。另外,該修正子51之功能及作業可以在用於實施該DRT 71之結構、軟體、韌體或其它手段之外實施。在一具體實施例中,該修正子51及DRT 71係實施或寫入在電腦程式碼的單一段落中,而可提供該DRT及修正子之功能。因此該修正子功能及結構可能包含在該DRT中,並視為一選擇性組件。在如何實施之外,該修正子功能及結構係負責修正該應用碼程式之可執行碼,且該分散式執行時間功能及結構係負責實施該等電腦或機器之間的通信。在一具體實施例中的通信功能係透過在每部機器上之DRT的電腦程式碼內的一中間協定層來實施。例如該DRT可實施在該JAVA語言中的一通信堆疊,並使用該傳輸控制協定/網際網路協定(TCP/IP)來提供該等機器之間的通信或對話。實際上這些功能或作業是如何實施或分割在結構性及/或程序性元素之間,或是在本發明之電腦程式碼或資料結構之間,皆比它們所提供者要來得不重要。It will be appreciated that under the description herein, the modifier 51 and the distributed execution time 71 will have additional implementations. For example, the modifier 51 can implement or be within a component of the distributed execution time 71, such that the DRT 71 can implement the functions and operations of the modifier 51. In addition, the function and operation of the corrector 51 can be implemented in addition to the structure, software, firmware or other means for implementing the DRT 71. In a specific embodiment, the modifier 51 and the DRT 71 are implemented or written in a single paragraph of the computer code, and the functions of the DRT and the modifier are provided. Therefore, the modifier function and structure may be included in the DRT and be regarded as an optional component. In addition to how it is implemented, the modifier function and structure is responsible for modifying the executable code of the application code program, and the distributed execution time function and structure is responsible for implementing communication between the computers or machines. The communication functions in a particular embodiment are implemented by an intermediate protocol layer within the computer code of the DRT on each machine. For example, the DRT can implement a communication stack in the JAVA language and use the Transmission Control Protocol/Internet Protocol (TCP/IP) to provide communication or conversation between the machines. In fact, how these functions or operations are implemented or divided between structural and/or procedural elements, or between the computer code or data structure of the present invention, is less important than the ones they provide.
為了保證在機器M1,M2,...,Mn之間有一致性的類別及物件(或同等者)初始化狀態及初始化作業,該應用碼50由搜尋整個可執行的應用碼50來分析或細查,藉以偵測在該應用碼50中的程式步驟(例如特定的指令或指令種類),其可定義或構成或另外代表一初始化作業或例式(或其它類似的記憶體、資源、資料或碼初始化例式或作業)。在該JAVA語言中,這些程式步驟例如包含或具有一物件或類別之某部份或全部的"<init>"或"<clinit>"方法,並視需要為任何關連於一"<init>"或"<clinit>"方法之其它碼、例式或方法,例如藉由該"<clinit>"方法之"<init>"的主體喚起一不同方法之方法。In order to ensure that there is a consistent category and object (or equivalent) initialization state and initialization operation between the machines M1, M2, ..., Mn, the application code 50 is analyzed or thinned by searching the entire executable application code 50. Detecting, by means of detecting a program step (eg, a specific instruction or type of instruction) in the application code 50, which may define or constitute or otherwise represent an initialization job or modality (or other similar memory, resource, material or Code initialization example or job). In the JAVA language, these program steps include, for example, a "<init>" or "<clinit>" method that has or has some or all of an object or category, and is optionally associated with an "<init>" as needed. Or other code, instance or method of the "<clinit>" method, such as by a subject of "<init>" of the "<clinit>" method, evoking a different method.
此該應用碼50之分析或細查可在載入該應用程式碼50之前、或在該應用程式碼50載入程序期間發生,或甚至在該應用程式碼50載入程序之後發生。其可類似於一安裝、程式轉換、轉譯、或編譯程序,其中該應用碼可用額外的指令來實施,及/或另可由意義保留程式操縱所修正,即/或選擇性地由一輸入碼語言轉譯到一不同的碼語言(例如像是由原始碼語言或中介碼語言轉譯到物件碼語言或機器碼語言),並瞭解到該術語編譯通常或習用上包含了碼或語言中的改變,例如由原始碼或物件碼,或由一種語言到另一種語言。但是,在本例中該術語「編譯」(及其文法上同等者)並沒有那麼多限制,且亦可在相同碼或語言內包括或含有修正。例如,該編譯及其同等者可瞭解為同時包含正常編譯(例如像是藉由例示而非限制,由原始碼到物件碼),且由原始碼編譯成原始碼,以及由物件碼編譯到物件碼,以及其中任何改變的組合。其亦可包括所謂的「中介碼語言」,其形式為「虛擬物件碼」。The analysis or scrutiny of the application code 50 may occur prior to loading the application code 50, or during loading of the application code 50, or even after the application code 50 loads the program. It can be similar to an installation, program conversion, translation, or compiler, where the application code can be implemented with additional instructions, and/or can be modified by meaning retention program manipulation, ie, or alternatively by an input code language. Translating into a different code language (for example, translation from a source code language or an intermediate code language to an object code language or a machine code language), and knowing that the term compilation usually or customally contains changes in the code or language, such as From source code or object code, or from one language to another. However, in this example the term "compilation" (and its grammatical equivalents) is not so limited and may include or contain amendments within the same code or language. For example, the compilation and its equivalents can be understood to include both normal compilation (eg, by way of illustration and not limitation, from source code to object code), and compiled from source code to source code, and compiled from object code to object. The code, and any combination of any of them. It may also include a so-called "mediation code language" in the form of "virtual object code".
藉由例示且並非限制,在一具體實施例中,該應用碼50之分析或細查可在載入該應用程式碼期間發生,例如藉由該作業系統由該硬碟或其它儲存裝置或來源讀取該應用碼,並將其複製到記憶體,並預備開始執行該應用程式碼。在另一具體實施例中,於JAVA虛擬機器中,該分析或細查可在該java.lang.ClassLoader loadClass方法(如java.lang.ClassLoader.loadClass())之類別載入程序期間發生。By way of illustration and not limitation, in one embodiment, analysis or scrutiny of the application code 50 may occur during loading of the application code, such as by the operating system from the hard disk or other storage device or source. The application code is read, copied to memory, and ready to begin execution of the application code. In another embodiment, in a JAVA virtual machine, the analysis or scrutiny can occur during a class loader of the java.lang.ClassLoader loadClass method (eg, java.lang.ClassLoader.loadClass()).
另外,該應用碼50之分析或細查可以甚至在該應用程式碼載入程序之後發生,例如在該作業系統已經載入該應用碼到記憶體之後,或選擇性地甚至在該應用程式碼之相關的對應部份已經開始或進行之後,例如像是在該JAVA虛擬機器已經載入該應用碼到該虛擬機器當中之後,其係透過"java.lang.ClassLoader.loadClass()"方法,且選擇性地進行執行。In addition, the analysis or scrutiny of the application code 50 can occur even after the application code loading program, for example, after the operating system has loaded the application code into the memory, or alternatively even in the application code. After the relevant part has been started or carried out, for example, after the JAVA virtual machine has loaded the application code into the virtual machine, it passes the "java.lang.ClassLoader.loadClass()" method, and Execute selectively.
因此,上述的分析或觀察,初始化例式(例如<clinit>類別初始化方法及<init>物件初始化方法)係初始時被尋找,且當發現或識別出插入一修正碼時,藉以引發一修正的初始化例式。此修正的例式被調整,並寫入來初始化在該等機器中的一部上之類別50A,例如JVM#1,並告訴、通知或另外傳遞到所有其它機器M2,...,Mn,這種類別50A存在,並視需要其初始化的狀態。有數種不同其它的模式,其中可以進行此修正及載入。Therefore, the above analysis or observation, the initialization example (such as <clinit> category initialization method and <init> object initialization method) is initially found, and when a correction code is found or recognized, a correction is triggered. Initialize the example. The modified example is modified and written to initialize the category 50A on one of the machines, such as JVM #1, and tell, notify or otherwise pass to all other machines M2,..., Mn, This category 50A exists and is in a state of initialization as needed. There are several different modes in which this correction and loading can be done.
因此在一種模式中,在該載入機器上的DRT 71/1,在此例中為Java虛擬機器M1(JVM#1),要求所有其它機器M1,...,Mn之DRT's 71/2...71/n,如果類似的同等第一類別50A在任何其它機器上被初始化(即已經被初始化)。如果此問題的答案為"是"(也就是說一類似同等類別50A已經在另一部機器上被初始化),則該初始化例式的執行即被中止、暫停、終止、關閉或另外對在機器JVM#1上的類別50A所除能。如果答案為"否"(也就是說一類似同等類別50A在另一部機器上尚未被初始化),則該初始化作業即繼續(或重新開始、或開始、或進行,及該類別50A被初始化,並視需要該連續的改變(例如像是記憶體中的初始化的碼及資料結構)於該初始化例式被轉換到在其它機器之每一部上每一個類似同等的本地類別期間被帶入,如第8圖中箭頭83所示。So in one mode, the DRT 71/1 on the loading machine, in this case the Java Virtual Machine M1 (JVM#1), requires all other machines M1,..., Mn DRT's 71/2. ..71/n if a similar equivalent first category 50A is initialized on any other machine (ie has been initialized). If the answer to this question is "yes" (that is, a similar class 50A has been initialized on another machine), then the execution of the initialization instance is aborted, paused, terminated, closed, or otherwise on the machine. Class 50A on JVM#1 is disabled. If the answer is "No" (that is, if a similar category 50A has not been initialized on another machine), then the initialization job continues (or restarts, or starts, or proceeds, and the category 50A is initialized, And as needed, the continuous change (such as, for example, the initialized code and data structure in the memory) is transferred to the initialization instance to be brought into each similarly-like local category on each of the other machines, As indicated by arrow 83 in Fig. 8.
一類似程序在每次一物件(如50X,50Y或50Z)被載入及初始化的狀況下發生。當該載入機器之DRT 71/1,在此範例中為Java機器M1(JVM#1)並未識別,由於其它機器M2...Mn之質問,一類似同等物件到要在機器M1上被初始化的該特定物件,即物件50Y,其已經由另一部機器初始化,則在機器M1上的DRT 71/1可以執行對應於物件50Y之物件初始化例式,並視需要每一部其它機器M2...Mn可載入一類似同等本地物件(其可方便地稱為一網點物件),及由機器M1上該初始化作業之執行所帶入的相關後續改變(例如像是初始化的資料、初始化的碼、及/或初始化的系統或資源結構)。但是,如果機器M1之DRT 71/1決定對於有問題之物件50Y之一類似同等物件已經在該複數部機器之另一部機器上被初始化(例如像是機器M2),則由對應於物件50Y之初始化函數、例式或程序的機器M1執行即並未開始或進行、或另外中止、終止、關閉或另外除能,且載入機器M1上的物件50Y,較佳地是但視需要該等後續改變(例如像是初始化的資料、初始化的碼、及/或其它初始化的系統或資源結構)由機器M2執行的初始化例式,即載入到對應於物件50Y之機器M1上。再次地,有多種方法可帶出所想要的結果。A similar procedure occurs every time an object (such as 50X, 50Y or 50Z) is loaded and initialized. When the DRT 71/1 of the loading machine, in this example, the Java machine M1 (JVM#1) is not recognized, due to the quality of other machines M2...Mn, an equivalent object is to be on the machine M1. The specific object that is initialized, ie, the object 50Y, which has been initialized by another machine, the DRT 71/1 on the machine M1 can perform an object initialization example corresponding to the object 50Y, and each of the other machines M2 as needed. ... Mn can load an equivalent local object (which can conveniently be referred to as a dot object), and related subsequent changes brought into by the execution of the initialization job on machine M1 (eg, like initialization data, initialization) Code, and / or initialized system or resource structure). However, if the DRT 71/1 of the machine M1 determines that one of the problematic items 50Y is equivalent to the equivalent object that has been initialized on another machine of the plurality of machines (eg, such as machine M2), then corresponds to the object 50Y. The machine M1 of the initialization function, the routine or the program does not start or perform, or otherwise suspends, terminates, closes or otherwise disables, and loads the object 50Y on the machine M1, preferably but if necessary Subsequent changes (such as, for example, initialized data, initialized code, and/or other initialized systems or resource structures) are initialized by machine M2, i.e., loaded onto machine M1 corresponding to object 50Y. Again, there are a number of ways to bring out the desired results.
較佳地是,該初始化例式的執行即配置給一部機器,例如該第一機器M1來載入(及視需要尋找來初始化)該物件或類別。對應於決定一特定類別或物件(及在每一部機器M1...Mn上任何類似同等本地類別或物件)尚未被初始化之初始化例式的執行,即對於所有機器M1...Mn僅執行一次,較佳地是僅由一部機器,而代表所有的機器M1...Mn。對應用、且較佳地是遵循由一部機器執行該初始化例式(如機器M1),然後所有其它機器之每一部載入一類似同等本地物件(或類別),且視需要載入該後續改變(例如像是初始化的資料、初始化的碼、及/或其它初始化的系統或資源結構),由機器M1之初始化作業的執行所帶入。Preferably, the execution of the initialization routine is configured to a machine, such as the first machine M1 to load (and, if necessary, to initialize) the object or category. Corresponding to the execution of an initialization routine that determines that a particular category or object (and any similar local categories or objects on each machine M1...Mn) has not been initialized, ie only for all machines M1...Mn Once, preferably by only one machine, it represents all machines M1...Mn. For the application, and preferably by following the initialization of a machine (such as machine M1), then each of the other machines is loaded with a similar equivalent local object (or category) and loaded as needed Subsequent changes (such as, for example, initialized data, initialized code, and/or other initialized systems or resource structures) are brought in by the execution of the initialization job of machine M1.
由第15圖可看出,對於第8圖之一般性配置之修正提供了機器M1,M2...Mn皆如同以前,並在所有機器M1,M2...Mn上同時或同步地執行相同的應用碼50(或許多碼)。但是,先前的配置由一伺服器機器X的供應所修正,其方便地能夠供應管家函數,例如且特別是結構、資產及資源之初始化。這種伺服器機器X可為一低價值商用電腦,例如PC,因為其運算負擔較低。如第15圖中虛線所示,兩部伺服器機器X及X+1可以為了冗餘的目的來提供,以增加該系統之整體可靠度。當提供這兩種伺服器機器X及X+1時,它們較佳地是但可視需要操作成一不會失效環境中的冗餘機器。As can be seen from Fig. 15, the modification of the general configuration of Fig. 8 provides that the machines M1, M2...Mn are as before, and perform the same simultaneously or synchronously on all machines M1, M2...Mn The application code is 50 (or many codes). However, the previous configuration was modified by the provision of a server machine X, which is conveniently capable of supplying housekeeping functions, such as, and in particular, initialization of structures, assets, and resources. This server machine X can be a low value commercial computer, such as a PC, because of its low computational load. As indicated by the dashed lines in Figure 15, the two server machines X and X+1 can be provided for redundancy purposes to increase the overall reliability of the system. When both server machines X and X+1 are provided, they are preferably, but can be operated as, redundant machines in a non-failed environment.
其不需要提供一伺服器機器X,因為其運算負擔可以分散到機器M1,M2...Mn上。另外,由一部機器所操作的一資料庫(在一主控者/受控者種類作業中)可以用於管家功能。It does not need to provide a server machine X because its computational load can be spread over the machines M1, M2...Mn. In addition, a database operated by a machine (in a master/controlled class job) can be used for housekeeping functions.
第16圖所示為要遵循的一較佳泛用程序。在已經進行一載入步驟161之後,要執行之該等指令即依序考慮,且所有初始化例式在步驟162中依所示來偵測。在該JAVA語言中,這些及物件初始化方法(例如<init>)及類別初始化方法(如<clinit>)。其它語言使用不同的術語。Figure 16 shows a preferred general procedure to follow. After a load step 161 has been performed, the instructions to be executed are considered sequentially, and all initialization routines are detected as shown in step 162. In the JAVA language, these and object initialization methods (such as <init>) and category initialization methods (such as <clinit>). Other languages use different terms.
當在步驟162中偵測到一初始化例式時,其在步驟163中被修正,藉以執行橫跨及該複數部機器M1,M2...Mn之間的一致、協調及調和之初始化作業(例如像是資料結構及碼結構之初始化),其基本上藉由插入其它的指令到該初始化例式中,例如決定在此初始化例式所對應之物件或類別(或資產)所對應之機器M1...Mn上一類似同等物件或類別(或其它資產)已經被初始化,如果是的話,即中止、暫停、終止、關閉或另外除能此初始化例式之執行(及或初始化作業),若否的話,即開始、繼續、或重新開始執行該初始化例式(即/或初始化作業),並視需要指示其它機器M1...Mn來載入一類似同等的物件或類別,及由該初始化例式之執行所帶入的後續改變。另外,該修正指令可以插入在該例式之前,例如像是在進行該相對應類別或物件之初始化的指令或作業之前。一旦該修正步驟163已經完成該載入程序,並繼續載入該修正的應用碼來取代該未修正的應用碼,如步驟164中所示。總之,該初始化例式僅要執行一次,較佳地是僅由一部機器,代表所有的機器M1...Mn,其對應於由所有機器M1...Mn之決定,該特定物件或類別(即在每部機器M1...Mn上類似同等本地物件或類別,其對應於此初始化例式所相關的該特定物件或類別)尚未被初始化。When an initialization routine is detected in step 162, it is modified in step 163 to perform the initialization, coordination, and reconciliation initialization operations across the complex machine M1, M2...Mn ( For example, the initialization of the data structure and the code structure, basically by inserting other instructions into the initialization example, for example, determining the machine M1 corresponding to the object or category (or asset) corresponding to the initialization example. A similar object or class (or other asset) on Mn has been initialized, if so, aborting, pausing, terminating, closing, or otherwise disabling the execution of the initialization routine (and or initializing the job), if If not, start, continue, or restart the execution of the initialization example (ie, or initialization job), and instruct other machines M1...Mn as needed to load an equivalent object or category, and initialize by Subsequent changes brought about by the execution of the example. In addition, the correction command can be inserted before the example, such as before an instruction or job that performs initialization of the corresponding category or object. Once the modification step 163 has completed the loading procedure, and continues to load the modified application code to replace the uncorrected application code, as shown in step 164. In summary, the initialization example is only to be executed once, preferably by only one machine, representing all machines M1...Mn, which corresponds to the determination of all machines M1...Mn, the particular object or category (i.e., similar native objects or categories on each machine M1...Mn, which correspond to the particular object or category associated with this initialization example) have not yet been initialized.
第17圖所示為一修正的特定形式。在進行步驟171Figure 17 shows a specific form of correction. In step 171
之例式之後,要被初始化的結構、資產或資源(JAVA的術語為類別或物件)在步驟172中被配置一名稱或標籤(例如一通用名稱或標籤),其可用來識別在每部機器M1,...,Mn上相對應的類似同等本地物件。此最為方便地是透過由第15圖之伺服器機器X所維護的一表格(或類似資料或記錄結構)來完成。此表格亦可包括要被初始化的類似同等類別或物件之初始化狀態。其將可瞭解到此表格或其它資料結構僅可儲存該初始化狀態,或其亦可儲存其它狀態或資訊。如第17圖中所示,如步驟173和174藉由機器M1...Mn的通信由DRT 71決定對應於該通用名稱或標籤之每部其它機器上的類似同等本地物件尚未被初始化(即尚未在除了進行該載入及尋找之機器之外的一部機器上並未初始化,以執行初始化),然後此代表該物件或類別可被初始化,較佳地是但視需要用正常的方式,藉由開始、進行、持續、或重新開始該初始化例式之執行,如步驟176中所示,因為其為要被初始化的機器M1...Mn之該複數部類似同等本地物件或類別的第一個。After the example, the structure, asset, or resource to be initialized (the term of the JAVA is a category or object) is configured in step 172 with a name or label (eg, a generic name or label) that can be used to identify each machine. M1,..., corresponding to equivalent local objects on Mn. This is most conveniently accomplished by a form (or similar material or record structure) maintained by the server machine X of Figure 15. This table may also include initialization status similar to the equivalent category or object to be initialized. It will be appreciated that this form or other data structure may only store the initialization state, or it may store other states or information. As shown in FIG. 17, steps 173 and 174 are determined by DRT 71 to determine that similar local objects on each of the other machines corresponding to the common name or tag have not been initialized (ie, by steps 173 and 174). Not yet initialized on a machine other than the machine that is doing the loading and searching to perform initialization), then this means that the object or category can be initialized, preferably but in the normal way, as needed The execution of the initialization routine is initiated, performed, continued, or restarted, as shown in step 176, because it is the same as the equivalent local object or category of the machine M1...Mn to be initialized. One.
在一具體實施例中,該初始化例式被停止初始化或進行或開始執行;但是,在一些實施中,其很難或實際上不可能來停止該初始化例式做初始化或開始或進行執行。因此,在另一具體實施例中,已經開始或進行之初始化例式的執行被中止,使得其不會完成或並無法以其正常的方式完成。此另外的中止可被瞭解為包括一實際中斷、或一暫緩、或一延遲、或暫停一已經開始執行之初始化例式之執行(不論在完成之前的執行階段),因此要保證該初始化例式並未得到機會來執行,以完成該物件(或類別或其它資產)之初始化,且因此該物件(或類別或其它資產)維持「未初始化」(即「並未初始化」)。In a specific embodiment, the initialization routine is either initialized or started or begins to execute; however, in some implementations, it is difficult or practically impossible to stop the initialization routine from initializing or starting or performing. Thus, in another embodiment, the execution of the initialization routine that has been initiated or performed is aborted such that it does not complete or does not complete in its normal manner. This additional suspension can be understood to include an actual interrupt, or a hold, or a delay, or a pause in the execution of an initialization routine that has already begun execution (regardless of the execution phase prior to completion), thus ensuring the initialization routine There is no opportunity to perform to complete the initialization of the object (or category or other asset), and thus the object (or category or other asset) remains "uninitialized" (ie, "not initialized").
但是或另外,如果步驟173及174決定對應於該複數部類似同等本地物件或類別之通用名稱,每一個在該複數部機器M1...Mn之一部上面,其已經在另一部機器上被初始化,然後此代表該物件或類別被視為代表或為了該複數部機器M1...Mn來被初始化。因此,該初始化例式之執行即被中止、終止、關閉或另由執行步驟175來除能。But or in addition, if steps 173 and 174 determine a generic name corresponding to the equivalent portion of the equivalent local object or category, each of which is on one of the plurality of machines M1...Mn, which is already on another machine Initialized, then this represents that the object or category is considered representative or initialized for the complex machine M1...Mn. Thus, execution of the initialization routine is aborted, terminated, closed, or otherwise disabled by performing step 175.
第18圖例示了第17圖之步驟173的一具體實施例,其顯示由該載入機器(M1,M2...Mn當中之一)所進行的查詢到第15圖之伺服器機器X,其詢問對應於該通用名稱之複數個類似同等本地物件(或類別)之初始化狀態。該載入機器之作業係暫時地中斷,如步驟181所示,並對應於第17圖之步驟173,直到回覆給此先前要求自機器X接收到,如步驟182所示。在步驟181中,該載入機器傳送一查詢訊息到機器X,要求要被初始化之物件(或類別或其它資產)之初始化狀態。接下來,該載入機器等待來自對應於在步驟181中該提出機器所傳送之查詢訊息之機器X的一答覆,如步驟182所示。Figure 18 illustrates a specific embodiment of step 173 of Figure 17, showing the query by the loader (one of M1, M2...Mn) to the server machine X of Figure 15, It queries the initialization status of a plurality of similar local objects (or categories) corresponding to the common name. The loading machine operation is temporarily interrupted, as shown in step 181, and corresponds to step 173 of Figure 17, until the reply is received from machine X for the previous request, as shown in step 182. In step 181, the loading machine transmits a query message to machine X requesting an initialization state of the object (or category or other asset) to be initialized. Next, the load machine waits for a reply from machine X corresponding to the query message transmitted by the requesting machine in step 181, as shown in step 182.
第19圖所示為由第15圖之機器X所進行之活動,其回應於第18圖之步驟181的這種初始化查詢。該初始化狀態在步驟192及193中決定,其決定如果對應於通用名稱之初始化狀態要求的一類似同等物件(或類別或其它資產),如在步驟191中所接收,其在另一部機器上被初始化(即除了步驟191之初始化狀態要求所啟始的該查詢機器181之外的一部機器),其中初始化狀態的一表格被徵詢對應於該通用名稱之記錄,且如果該初始化狀態記錄指出在另一部機器(例如在該等機器M1...Mn中的一部)上的一類似同等本地物件(或類別),並對應於一通用名稱已經被初始化,對此效果之回應由進行步驟194被傳送到該查詢機器。另外,如果該初始化狀態記錄指出在另一部機器(例如在該複數部機器M1...Mn中的一部之上)上,及對應於通用名稱為未初始化,一相對應回覆由進行步驟195及196傳送到該查詢機器。此處所使用之特別術語物件或類別(或在步驟192中使用之同等術語資產或資源)要被瞭解為包含所有類似同等物件(或類別、或資產、或資源),其對應於在該複數部機器M1...Mn的每一部上相同的通用名稱。然後步驟182之等待查詢機器能夠依此回應及/或作業,例如像是藉由(i)中止(或暫停、或延遲)該初始化例式之執行,當步驟182之來自機器X之回覆指出在另一部機器(例如該複數部機器M1...Mn中的一部)上一類似同等本地物件對應於要在步驟172中被提出要初始化之物件的該通用名稱已經在它處被初始化(即在除了提出要進行該初始化之機器之外的一部機器上初始化);或(ii)藉由繼續(或重新開始、或開始、或進行)該初始化例式之執行,當在步驟182中來自機器X之回覆指出在該複數部機器M1...Mn之一類似同等本地物件對應於在步驟172要被提出初始化之該物件的通用名稱尚未在它處被初始化(即除了提出要進行初始化之該機器之外的一部機器上未被初始化)。Figure 19 shows the activity performed by machine X of Figure 15 in response to such an initialization query of step 181 of Figure 18. The initialization state is determined in steps 192 and 193, which determines if a similar equivalent (or class or other asset) corresponding to the initialization status of the generic name is required, as received in step 191, on another machine. Initialized (i.e., a machine other than the query machine 181 initiated by the initialization state of step 191), wherein a table of initialization states is queried for a record corresponding to the common name, and if the initialization status record indicates A similar local object (or category) on another machine (eg, in one of the machines M1...Mn) and corresponding to a common name has been initialized, the response to this effect is performed Step 194 is transmitted to the query machine. In addition, if the initialization status record is indicated on another machine (eg, on a portion of the plurality of machines M1...Mn), and corresponding to the common name is uninitialized, a corresponding reply is performed by the step 195 and 196 are transmitted to the inquiry machine. The terminology object or category (or equivalent term asset or resource used in step 192) as used herein is to be understood to include all such equivalent items (or categories, or assets, or resources) corresponding to the plural The same generic name on each of the machines M1...Mn. Then, the waiting query machine of step 182 can respond and/or work accordingly, such as by (i) suspending (or suspending, or delaying) execution of the initialization routine, when the reply from machine X in step 182 indicates Another machine (e.g., one of the plurality of machines M1...Mn) has an equivalent local object corresponding to the generic name of the object to be initialized in step 172 that has been initialized at it ( That is, initialized on a machine other than the machine that is proposing the initialization; or (ii) by continuing (or restarting, or starting, or proceeding) the execution of the initialization routine, when in step 182 The reply from machine X indicates that one of the plurality of machines M1...Mn is similar to the equivalent local object corresponding to the generic name of the object to be initialized at step 172 has not been initialized at it (ie, except for the initialization to be initiated) It is not initialized on a machine other than the machine).
請參考所附附錄,其中:附錄A1-A10所示為關連於欄位之實際碼,附錄B1為來自一未修正的<clinit>指令之一典型的碼區段,附錄B2為對應於一修正的<clinit>指令之同等者,附錄B3為來自一未修正的<init>指令之一典型的碼區段,附錄B4為對應於一修正的<init>指令之同等者。此外,附錄B5為附錄B2的碼之另一種選擇,而附錄B6為附錄B4之碼的另一種選擇。Please refer to the attached appendix, where: Appendix A1-A10 shows the actual code associated with the field, Appendix B1 is a typical code segment from one of the uncorrected <clinit> instructions, and Appendix B2 corresponds to a correction. The equivalent of the <clinit> instruction, Appendix B3 is a typical code segment from one of the uncorrected <init> instructions, and Appendix B4 is the equivalent of a modified <init> instruction. In addition, Appendix B5 is another option for the code in Appendix B2, and Appendix B6 is another option for the code in Appendix B4.
再者,附錄B7為InitClient之原始碼,其執行第17圖及第18圖之步驟的一具體實施例,其查詢對應於在該複數部機器M1...Mn上該複數個類似同等類別或物件之指定的類別或物件之初始化狀態的一「初始化伺服器」(例如一機器X)。附錄B8為InitServer之原始碼,其進行第19圖之步驟的一具體實施例,其接收由InitClient傳送的一初始化狀態查詢,並回應來傳回該指定的類別或物件之相對應初始化狀態。類似地,附錄B9為用於附錄B1-B6之先前/之後範例中所使用的該範例應用之原始碼(在表X到XV重覆)。並且,附錄B10為InitLoader之原始碼,其執行第16,20及21圖之步驟的一具體實施例,其根據本發明之一種模式修正附錄B9之範例性應用程式碼。Furthermore, Appendix B7 is the source code of InitClient, which performs a specific embodiment of the steps of FIGS. 17 and 18, the query corresponding to the plurality of similar categories on the plurality of machines M1...Mn or An "initialization server" (eg, a machine X) that initializes the specified category or object of the object. Appendix B8 is the source code of the InitServer, which performs a specific embodiment of the steps of Figure 19, which receives an initialization status query transmitted by the InitClient and responds to return the corresponding initialization status of the specified category or object. Similarly, Appendix B9 is the source code for this example application (repeated in Table X to XV) used in the previous/after examples of Appendix B1-B6. Also, Appendix B10 is the source code of InitLoader, which performs a specific embodiment of the steps of Figures 16, 20 and 21, which modifies the exemplary application code of Appendix B9 in accordance with one mode of the present invention.
附錄B1及B2(亦在以下的表X及表XI中部份重現)為範例性碼表列,其提供應用程式50之一初始化例式的該習用或未修正的電腦程式軟體碼(例如可用於單一機器或電腦環境中),及相同初始化例式的一後修正摘錄,例如可用於本發明之具有多重機器的具體實施例中。加入到該初始化例式之修正過的碼以粗體文字來強調。Appendixes B1 and B2 (also partially reproduced in Tables X and XI below) are exemplary code list columns that provide the conventional or uncorrected computer program software code for an initialization example of the application 50 (eg A post-correction excerpt of the same initialization equations, which can be used in a single machine or computer environment, for example, can be used in the specific embodiment of the invention having multiple machines. The corrected code added to the initialization example is highlighted in bold text.
其要注意到在該附錄中的編譯過的碼與在該表格中重複的部份採用的形式為檔案"example.java"之原始碼,其係包括在附錄B4(表XIII)中。在附錄B1及表X之程序中,步驟001之程序名稱"Method<clinit>"為編譯過應用碼之"example.java"之clinit方法之顯示的解碼輸出的名稱。該方法名稱<clinit>為根據該JAVA平台規格之一類別初始化方法的名稱,並對此範例選擇來代表一JAVA初始化方法之作業的一典型模式。整個方法係負責初始化該類別'example',所以其可被使用,且該"example.java"碼所執行的步驟在此依序說明。It should be noted that the compiled code in the appendix and the part in the form repeated in the table are in the form of the file "example.java", which is included in Appendix B4 (Table XIII). In the procedures of Appendix B1 and Table X, the program name "Method<clinit>" of step 001 is the name of the decoded output of the display of the clipit method of the "example.java" compiled with the application code. The method name <clinit> is the name of the initialization method according to one of the JAVA platform specifications, and this example is selected to represent a typical mode of the operation of a JAVA initialization method. The entire method is responsible for initializing the class 'example', so it can be used, and the steps performed by the "example.java" code are described here in order.
首先(步驟002),該JAVA虛擬機器指令"new #2<Class example>"造成該JAVA虛擬機器例舉由儲存在包含有此範例<clinit>方法之應用程式的該classfile結構的第二個索引中CONSTANT_Classref_info constant_pool項目所指定的該範例類別的一新類別例證,並造成參照到一新產生之型別'example'之物件被置於(推入)在該目前執行的執行緒之目前方法訊框的堆疊上。First (step 002), the JAVA virtual machine instruction "new #2<Class example>" causes the JAVA virtual machine to enumerate the second index of the classfile structure stored by the application containing the sample <clinit> method. An example of a new category of the example category specified by the CONSTANT_Classref_info constant_pool item, and causing an object referenced to a newly generated type 'example' to be placed (pushed) in the current method frame of the currently executing thread On the stack.
接著(步驟003),該Java虛擬機器指令"dup"造成該Java虛擬機器來複製該堆疊的最上方項目,並推入該複製的項目到該目前方法訊框的堆疊之最上方位置,並造成該參照到該新產生之'example'物件在被複製並推入到該堆疊上之堆疊的最上方。Next (step 003), the Java virtual machine command "dup" causes the Java virtual machine to copy the topmost item of the stack, and push the copied item to the top position of the stack of the current method frame, and cause The reference to the newly generated 'example' object is copied and pushed onto the top of the stack on the stack.
接者(步驟004),該JAVA虛擬機器指令"invokespecial #3<Method example()>"造成該JAVA虛擬機器推出該最上方項目離開該目前方法訊框的堆疊,並引起在該推出的物件上的該例證初始化方法"<init>",並造成引起該新產生的'example'物件之"<init>"結構。Receiving (step 004), the JAVA virtual machine instruction "invokespecial #3<Method example()>" causes the JAVA virtual machine to launch the stack of the top method frame leaving the current method frame and cause the object to be pushed out This example initializes the method "<init>" and causes the "<init>" structure of the newly generated 'example' object.
該Java虛擬機器指令"putstatic #3<Field example currentExample>"(步驟005)造成該Java虛擬機器來推出最上方數值離開該目前方法訊框的堆疊,並儲存該數值在由包含此範例<clinit>方法之應用程式的該classfile結構之第三個索引中的CONSTANT_Fieldref_info constant-pool項目所指定的該靜態欄位中,並造成該參照到該新產生及初始化的'example"物件在該目前方法訊框的堆疊之上方,其係儲存在類別'example'之靜態參照欄位名為'currentExample'中。The Java virtual machine instruction "putstatic #3<Field example currentExample>" (step 005) causes the Java virtual machine to push the stack of the highest value from the current method frame and store the value in the sample containing <clinit> Method of the third index of the classfile structure of the application in the CONSTANT_Fieldref_info constant-pool item specified in the static field, and causing the reference to the newly generated and initialized 'example' object in the current method frame Above the stack, it is stored in the static reference field of the category 'example' named 'currentExample'.
最後,該Java虛擬機器指令"return"(步驟006)由傳回控制改該先前方法訊框來使得該Java虛擬機器停止執行此<clinit>方法,並造成此<clinit>方法之執行的終止。Finally, the Java virtual machine instruction "return" (step 006) changes the previous method frame by the return control to cause the Java virtual machine to stop executing the <clinit> method and cause termination of execution of the <clinit> method.
由於這些在第1圖及第2圖之習用組態之單一機器上作業的步驟,該JAVA虛擬機器可用一致性、調和及協調的方法來追跡一類別的初始化狀態,並在執行包含該初始化作業的<clinit>方法中能夠保證不會發生不想要的行為(例如執行超過一次的類別'example.java'之<init>方法),像是由不一致及/或不調和之初始化作業所造成。如果這些步驟要在第5圖及第8圖之組態中複數部機器上進行,並具有第9,10,11,12及13圖之記憶體更新及傳遞複製手段,並在該複數部機器M1...Mn的每一部上同步地執行該應用程式碼50,在每一部機器上每個同步執行的應用程式事件的初始化作業將可不需要在任何其它機器上任何其它事件之間的協調之下來進行。如果給定橫跨複數部機器之一致性、協調及調和的初始化作業之目標,此先前技術配置將無法執行這種橫跨該複數部機器之一致性協調的初始化作業,因為每部機器僅在本地執行初始化,且無任何嘗試來協調它們的本地初始化作業於在任何一或多部其它機器上的任何其它類似初始化作業。因此這種配置將會由於未協調、不一致及/或不調和的初始化狀態及相關的初始化作業而會有不想要或其它異常的行為。因此,其為本發明的目的來克服該先前技術之限制。Due to these steps of working on a single machine of the conventional configuration of Figures 1 and 2, the JAVA virtual machine can trace the initialization state of a category by means of consistency, reconciliation and coordination, and perform the initialization operation including The <clinit> method guarantees that unwanted behavior will not occur (for example, the <init> method of the class 'example.java' that executes more than once), as caused by inconsistent and/or uncoordinated initialization jobs. If these steps are to be performed on a plurality of machines in the configuration of Figures 5 and 8, and have the memory update and transfer copying means of Figures 9, 10, 11, 12 and 13, and in the plural machine The application code 50 is executed synchronously on each of M1...Mn, and the initialization of each synchronously executed application event on each machine will not need to be between any other events on any other machine. Coordinated to proceed. Given the goal of an initialization job that spans the consistency, coordination, and reconciliation of a plurality of machines, this prior art configuration would not be able to perform such a consistent job of coherent coordination across the complex machine because each machine is only Initialization is performed locally and there are no attempts to coordinate their local initialization jobs to any other similar initialization jobs on any one or more other machines. This configuration will therefore have unwanted or otherwise anomalous behavior due to uncoordinated, inconsistent and/or unharmonized initialization states and associated initialization operations. Accordingly, it is an object of the present invention to overcome the limitations of the prior art.
在表格XIV(附錄B5)的範例碼中,該碼已經被修正,所以其可解決複數部機器M1...Mn之一致性協調的初始化作業之問題,其並未在表X(附錄B1)之碼範例中被解決。在此修正的<clinit>方法碼中,一"1dc #2<String"example">"指令被插入在該"new #5"指令之前,藉以為該<clinit>方法之第一指令。此造成該JAVA虛擬機器載入該項目在該目前classfile之索引2處constant_pool中,並儲存此項目在該目前方法訊框的堆疊上方,並造成該參照到數值"example"之字串物件被推入到該堆疊上。In the sample code of Table XIV (Appendix B5), the code has been corrected, so it can solve the problem of the consistent coordination of the complex machines M1...Mn, which is not in Table X (Appendix B1). The code example is resolved. In the modified <clinit> method code, a "1dc #2<String" example">" instruction is inserted before the "new #5" instruction, and is the first instruction of the <clinit> method. This causes the JAVA virtual machine to load the project in the constant_pool of the current classfile index 2, and store the item above the stack of the current method frame, and cause the string object referenced to the value "example" to be pushed. Go to the stack.
再者,該JAVA虛擬機器指令"invokestatic #3<Method Boolean isAlreadyLoaded(java.lang.String)>"被插入在該"0 ldc #2"指令之後,所以該JAVA虛擬機器推出該最上方項目離開該目前方法訊框之堆疊(其根據先前"ldc #2"指令為一參照到該String物件,利用對應於此<clinit>方法所屬的該類別之名稱的數值"example"),並引起該"isAlreadyLoaded"方法,傳送該推出的項目到該新方法訊框做為其第一引數,並在由此"invodestatic"指令傳回時傳回一布林值到該堆疊上。此改變很明顯,因為其修正該<clinit>方法來執行該"isAlreadyLoaded"方法及相關的作業,對應於該<clinit>方法之執行的開始,並傳回一布林引數(代表是否對應用此<clinit>方法之類別在該複數部機器M1...Mn中另一部機器上被初始化)到該<clinit>方法之執行方法訊框的堆疊上。Furthermore, the JAVA virtual machine instruction "invokestatic #3<Method Boolean isAlreadyLoaded(java.lang.String)>" is inserted after the "0 ldc #2" instruction, so the JAVA virtual machine launches the topmost item leaving the The current stack of method frames (which refer to the String object according to the previous "ldc #2" instruction, using the value "example" corresponding to the name of the category to which the <clinit> method belongs, and causing the "isAlreadyLoaded" "Method, passing the launched item to the new method frame as its first argument, and returning a Boolean value to the stack when the "invodestatic" instruction is passed back. This change is obvious because it fixes the <clinit> method to execute the "isAlreadyLoaded" method and related jobs, corresponding to the beginning of the execution of the <clinit> method, and returns a Boolean argument (representing whether to apply The class of this <clinit> method is initialized on another machine in the complex machine M1...Mn) to the stack of execution method frames of the <clinit> method.
接著,兩個JAVA虛擬機器指令"ifeq 9"及"return"被插入到該"2 invokestatic #3"指令之後及該"new #5"指令之前的該碼串流中。這兩個指令的第一個為"ifeq 9"指令,其使得該JAVA虛擬機器推出最上方項目離開該堆疊,並執行該推出的數值與零之間的比較。如果該執行的比較成功(即如果且僅如果該推出的數值等於零時),則執行繼續到"9 new #5"指令。但是如果該執行的比較失敗(即如果且僅如果該推出的數值不等於零),則執行繼續到該碼串流中的下一個指令,其為該"8 return"指令。此改變特別明顯,因為其修正該<clinit>方法來在當該"isAlreadyLoaded"方法之傳回值為負值(即"false")時即繼續執行該<clinit>方法(即指令9-19),或是當該"isAlreadyLoaded"方法為正值(即"true")時即中斷該<clinit>方法之執行(即該"8 return"指令造成傳回控制給此<clinit>方法之引起者)。Next, two JAVA virtual machine instructions "ifeq 9" and "return" are inserted into the code stream after the "2 invokestatic #3" instruction and before the "new #5" instruction. The first of these two instructions is the "ifeq 9" instruction, which causes the JAVA virtual machine to push the topmost item out of the stack and perform a comparison between the pushed value and zero. If the comparison of the execution is successful (ie if and only if the value of the push is equal to zero), execution continues to the "9 new #5" instruction. But if the comparison of the execution fails (i.e. if and only if the pushed value is not equal to zero), execution proceeds to the next instruction in the code stream, which is the "8 return" instruction. This change is particularly noticeable because it fixes the <clinit> method to continue executing the <clinit> method (ie, instructions 9-19) when the return value of the "isAlreadyLoaded" method is negative (ie "false"). Or when the "isAlreadyLoaded" method is positive (ie "true"), the execution of the <clinit> method is interrupted (ie the "8 return" instruction causes the return control to be caused by this <clinit> method). .
該方法void isAlreadyLoaded(java.lang.String),附錄B7之InitClient碼之部份,及分散式執行時間系統(DRT)71之部份,其執行機器M1...Mn之間的通信作業,以協調該等機器M1...Mn之間的<clinit>方法之執行。此範例的isAlreadyLoaded方法傳送在第15圖之一機器X上執行之附錄B8的InitServer碼,藉由傳送一「初始化狀態要求」到對應於正被「初始化」的該類別之機器X(即此<clinit>方法所屬的該類別)。請參考第19圖及附錄B8,機器X接收對應於該<clinit>方法所屬的類別之「初始化狀態要求」,並造成初始化狀態或記錄之一表格來決定該要求所對應之該類別的該初始化狀態。The method void isAlreadyLoaded (java.lang.String), part of the InitClient code of Appendix B7, and part of the Decentralized Execution Time System (DRT) 71, which performs communication operations between the machines M1...Mn, Coordinate the execution of the <clinit> method between the machines M1...Mn. The isAlreadyLoaded method of this example transmits the InitServer code of Appendix B8 executed on machine X of Figure 15, by transmitting an "initialization state request" to the machine X corresponding to the category being "initialized" (ie, this < The category to which the clinit> method belongs). Referring to FIG. 19 and Appendix B8, the machine X receives the "initialization state requirement" corresponding to the category to which the <clinit> method belongs, and causes an initialization state or a table of records to determine the initialization of the category corresponding to the request. status.
如果對應於該初始化狀態要求之類別並未在除了該要求機器之外的另一部機器上被初始化,則機器X將會傳送一回應,代表該類別尚未被初始化,並更新對應於該指定的類別的一記錄登錄項來指示該類別現在被初始化。另外,如果對應於該初始化狀態要求之類別在除了該要求機器之外的另一部機器上被初始化,則機器X將傳送一回應來指示該類別已經被初始化。對應於決定了此初始化狀態要求所關於的該類別並未在除了該要求機器之外的另一部機器上被初始化,產生一回覆,並傳送到該要求機器來指示該類別並未被初始化。此外,機器X較佳地是更新對應於該初始化狀態要求所相關的該類別之登錄項來指示該類別現在被初始化。在自機器X接收到這種訊息之後,代表該類別並未在另一部機器上被初始化,該isAlreadyLoaded()方法及作業終止執行,並傳回一'false'數值到先前的方法訊框,其為該<clinit>方法之執行方法訊框。另外,在自機器X接收到一訊息之後,代表該類別已經在另一部機器上被初始化,該isAlreadyLoaded()方法及作業終止執行,並傳回一'true'數值到先前的方法訊框,其為該<clinit>方法之執行方法訊框。在此傳回作業之後,該<clinit>方法訊框之執行然後重新開始,如在步驟004中附錄B5之碼序列中所指出。If the category corresponding to the initialization state requirement is not initialized on another machine other than the required machine, then machine X will send a response indicating that the category has not been initialized and update the corresponding to the specified A record entry for the category to indicate that the category is now initialized. Additionally, if the category corresponding to the initialization state requirement is initialized on another machine other than the required machine, machine X will send a response indicating that the category has been initialized. The category associated with determining the initialization state requirement is not initialized on another machine other than the required machine, generating a reply and transmitting to the requesting machine to indicate that the category has not been initialized. In addition, machine X preferably updates the entry corresponding to the category associated with the initialization state request to indicate that the category is now initialized. After receiving such a message from machine X, the class is not initialized on another machine, the isAlreadyLoaded() method and the job terminate execution, and a 'false' value is returned to the previous method frame. It is the execution method frame of the <clinit> method. In addition, after receiving a message from machine X, indicating that the class has been initialized on another machine, the isAlreadyLoaded() method and the job terminate execution, and return a 'true' value to the previous method frame. It is the execution method frame of the <clinit> method. After the job is returned here, execution of the <clinit> method frame is then resumed, as indicated in the code sequence of Appendix B5 in step 004.
其將可瞭解到該修正的碼在具有複數部電腦或運算機器之一分散式運算環境中允許該記憶體操縱作業之協調的作業,所以關於在該複數部機器M1...Mn上未修正的碼或程序之作業的問題(例如像是多重初始化作業、或重新初始化作業)在當應用該修正的碼或程序時並不會發生。It will be understood that the modified code allows the memory to operate in coordination in a distributed computing environment having a plurality of computers or computing machines, so that no correction is made on the complex machine M1...Mn. The problem of the code or program operation (such as, for example, multiple initialization jobs, or reinitialization of the job) does not occur when the modified code or program is applied.
類似地,接下來的程序來修正關於物件之一<init>方法,藉以由附錄B3之碼區段(參見表格XII)轉換到附錄B6之碼區段(參見表格XV)來指示。Similarly, the next procedure is to modify the <init> method for one of the objects, whereby the code section of Appendix B3 (see Table XII) is converted to the code section of Appendix B6 (see Table XV).
附錄B3及B6(亦在以下的表XII及表XV中部份重現)為範例性碼表列,其提供應用程式50之一初始化例式的該習用或未修正的電腦程式軟體碼(例如可用於單一機器或電腦環境中),及相同初始化例式的一後修正摘錄,例如可用於本發明之具有多重機器的具體實施例中。加入到該初始化例式之修正過的碼以粗體文字來強調。Appendixes B3 and B6 (also partially reproduced in Tables XII and XV below) are exemplary code list columns that provide the conventional or uncorrected computer program software code for one of the application 50 initialization examples (eg, A post-correction excerpt of the same initialization equations, which can be used in a single machine or computer environment, for example, can be used in the specific embodiment of the invention having multiple machines. The corrected code added to the initialization example is highlighted in bold text.
其要注意到在該附錄中的編譯過的碼與在該表格中重複的部份採用的形式為檔案"example.java"之原始碼,其係包括在附錄B4中。在附錄B1及表XI之程序中,步驟001之程序名稱"Method<init>"為編譯過應用碼之"example.java"之init方法之顯示的解碼輸出的名稱。該方法名稱<init>為根據該JAVA平台規格之一物件的初始化方法(或方法,因為會有一個以上)的名稱,並對此範例選擇來指示一JAVA初始化方法之作業的一典型模式。整個方法係負責初始化一'example'物件,所以其可被使用,且該"example.java"碼所執行的步驟在此依序說明。It should be noted that the compiled code in the appendix and the part in the form repeated in the table are in the form of the file "example.java", which is included in Appendix B4. In the procedures of Appendix B1 and Table XI, the program name "Method<init>" of step 001 is the name of the decoded output of the display of the init method of "example.java" compiled with the application code. The method name <init> is the name of the initialization method (or method because there will be more than one) according to one of the JAVA platform specifications, and a typical mode for selecting an operation of a JAVA initialization method is selected for this example. The entire method is responsible for initializing an 'example' object, so it can be used, and the steps performed by the "example.java" code are described here in order.
該Java虛擬機器指令"aload_0"(步驟002)造成該Java虛擬機器載入該項目在該目前方法訊框之索引0處的該本地變數陣列,並儲存此項目在該目前方法訊框之堆疊的上方,並造成此物件參照儲存在索引0處的該本地變數陣列中,並被推入到該堆疊上。The Java virtual machine instruction "aload_0" (step 002) causes the Java virtual machine to load the local variable array of the item at index 0 of the current method frame and store the item in the stack of the current method frame. Above, and causing this object to be referenced in the local variable array stored at index 0 and pushed onto the stack.
接著(步驟003),該JAVA虛擬機器指令"invokespecial #1<Method java.lang.Object()>"使得該JAVA虛擬機器來推出該最上方項目離開該目前方法訊框之堆疊,並引起在該推出之物件的該例證初始化方法"<init>",並造成該"example'物件之超類別的"<init>"結構(或方法)被引起。Next (step 003), the JAVA virtual machine instruction "invokespecial #1<Method java.lang.Object()>" causes the JAVA virtual machine to push out the stack of the top method item leaving the current method frame and cause This illustration of the launched object initializes the method "<init>" and causes the "<init>" structure (or method) of the superclass of the "example" object to be raised.
該Java虛擬機器指令"aload_0"(步驟004)造成該Java虛擬機器載入該項目於該目前方法訊框的索引0處的本地變數陣列中,並儲存此項目在該目前方法訊框的堆疊之最上方,並造成儲存在索引0處的本地變數陣列中的「此」物件參照被推到該堆疊上。The Java virtual machine instruction "aload_0" (step 004) causes the Java virtual machine to load the item into the local variable array at index 0 of the current method frame and store the item in the stack of the current method frame. At the top, and causing the "this" object reference stored in the local variable array at index 0 to be pushed onto the stack.
接著(步驟005),該JAVA虛擬機器指令"invokestatic #2<Method long currentTimeMillis()>"造成該JAVA虛擬機器引起該java.lang.System類別之"currentTimeMillis()"方法,並造成一長數值對應於來自該currentTimeMillis()方法引發之傳回值被推入到的該堆疊的最上方。Next (step 005), the JAVA virtual machine instruction "invokestatic #2<Method long currentTimeMillis()>" causes the JAVA virtual machine to cause the "currentTimeMillis()" method of the java.lang.System class, and causes a long value corresponding The top of the stack to which the return value from the currentTimeMillis() method is pushed is pushed.
該Java虛擬機器指令"putfield #3<Field long timestamp>"(步驟006)使得該Java虛擬機器推出最上方兩個數值離開該目前方法訊框的堆疊,並儲存該最上方數值在該第二推出數值的物件例證欄位,其由儲存在含有此範例<init>方法之應用程式的classfile結構的第三個索引中的CONSTANT_Fieldref_info constant-pool項目,並造成在該目前方法訊框的堆疊最上方之長數值被儲存在該堆疊上的長數值之下此物件參照之名為"timestamp"的例證欄位中。The Java virtual machine instruction "putfield #3<Field long timestamp>" (step 006) causes the Java virtual machine to push the top two values out of the stack of the current method frame and store the topmost value in the second rollout The value instance field of the value, which is stored in the CONSTANT_Fieldref_info constant-pool item in the third index of the classfile structure of the application containing this example <init> method, and is caused at the top of the stack of the current method frame. The long value is stored in the example field named "timestamp" referenced by the object under the long value on the stack.
最後,該Java虛擬機器指令"return"(步驟007)使得該Java虛擬機器藉由傳回控制到該先前方法訊框來中止執行此<init>方法,並造成此<init>方法之執行結束。Finally, the Java virtual machine instruction "return" (step 007) causes the Java virtual machine to abort execution of the <init> method by returning control to the previous method frame and cause the execution of the <init> method to end.
由於這些在第1圖及第2圖中習用組態的單一機器上作業的步驟,該JAVA虛擬機器可用一致性、調和及協調的方式追跡一物件的初始化狀態,且在執行含有該初始化作業的<init>方法中能夠保證不會發生不想要的行為(例如執行超過一次的一單一'example.java'物件之<init>方法,或是相同物件的重新初始化),例如可由不一致及/或不調和之初始化作業所造成。如果這些步驟要在第5圖及第8圖之組態中複數部機器上進行,並具有第9,10,11,12及13圖之記憶體更新及傳遞複製手段,且同步地在該複數部機器M1...Mn之每一部上執行該應用程式碼50,在每部機器上每個同步執行應用程式事件的初始化作業將可在任何其它機器上的任何其它事件之間執行,而不需要協調。如果給定橫跨複數部機器之一致性、協調及調和的初始化作業之目標,此先前技術配置將無法執行這種橫跨該複數部機器之一致性協調的初始化作業,因為每部機器僅在本地執行初始化,且無任何嘗試來協調它們的本地初始化作業於在任何一或多部其它機器上的任何其它類似初始化作業。因此這種配置將會由於未協調、不一致及/或不調和的初始化狀態及相關的初始化作業而會有不想要或其它異常的行為。因此本發明之目的在於克服先前技術配置之限制。Due to the steps of working on a single machine of the conventional configuration in Figures 1 and 2, the JAVA virtual machine can trace the initialization state of an object in a consistent, harmonic, and coordinated manner, and execute the initialization operation containing the initialization operation. The <init> method guarantees that unwanted behavior will not occur (such as the <init> method of a single 'example.java' object that is executed more than once, or the reinitialization of the same object), for example, by inconsistency and/or not Caused by the initialization of the reconciliation. If these steps are to be performed on a plurality of machines in the configuration of Figures 5 and 8, and have the memory update and transfer copying means of Figures 9, 10, 11, 12 and 13, and synchronously in the plural The application code 50 is executed on each of the machines M1...Mn, and each initialization job that executes the application event synchronously on each machine can be executed between any other event on any other machine. No coordination is required. Given the goal of an initialization job that spans the consistency, coordination, and reconciliation of a plurality of machines, this prior art configuration would not be able to perform such a consistent job of coherent coordination across the complex machine because each machine is only Initialization is performed locally and there are no attempts to coordinate their local initialization jobs to any other similar initialization jobs on any one or more other machines. This configuration will therefore have unwanted or otherwise anomalous behavior due to uncoordinated, inconsistent and/or unharmonized initialization states and associated initialization operations. It is therefore an object of the present invention to overcome the limitations of prior art configurations.
在表XV(附錄B6)之範例碼中,該碼已經被修正,所以其解決了在來自表XII(附錄B3)之碼範例中未解決之複數部機器M1...Mn之一致性、協調的初始化作業的問題。在此修正的<init>方法碼中,一"aload_0"指令被插入在該"1 invokespecial #1"指令之後,因為該"invokespecial #1"指令必須在進一步使用該物件之前執行。此插入的"aload_0"指令造成該JAVA虛擬機器來載入該項目到該目前方法訊框之索引0處的本地變數陣列中,並儲存此項目在該目前方法訊框之堆疊的最上方,並造成在索引0處該「此」物件的物件參照被推入到該堆疊上。In the example code of Table XV (Appendix B6), the code has been corrected, so it solves the consistency and coordination of the complex machines M1...Mn that are not solved in the code example from Table XII (Appendix B3). The problem with the initialization job. In the modified <init> method code, an "aload_0" instruction is inserted after the "1 invokespecial #1" instruction because the "invokespecial #1" instruction must be executed before the object is further used. The inserted "aload_0" instruction causes the JAVA virtual machine to load the item into the local variable array at index 0 of the current method frame and store the item at the top of the stack of the current method frame, and The object reference that caused the "this" object at index 0 is pushed onto the stack.
再者,該JAVA虛擬機器指令"invokestatic #3<Method Boolean isAlreadyLoaded(java.lang.Object)>"被插入在該"4 aload_0"指令之後,所以該JAVA虛擬機器推出該最上方項目離開該目前方法訊框的堆疊(其根據該先前"aload_0"指令為參照到此<init>方法所屬的該物件),並引起該"isAlreadyLoaded"方法,傳送該推出的項目到該新方法訊框做為其第一引數,並在由此"invokestatic"指令傳回時來傳回一布林值到該堆疊上。此改變很明顯,因為其修正該<init>方法來執行該"isAlreadyLoaded"方法及相關的作業,對應於該<init>方法之執行的開始,並傳回一布林引數(代表是否對應用此<init>方法之物件在該複數部機器M1...Mn中另一部機器上被初始化)到該<init>方法之執行方法訊框的堆疊上。Furthermore, the JAVA virtual machine instruction "invokestatic #3<Method Boolean isAlreadyLoaded(java.lang.Object)>" is inserted after the "4 aload_0" instruction, so the JAVA virtual machine launches the topmost item to leave the current method. a stack of frames (which refers to the object to which the <init> method belongs according to the previous "aload_0" instruction) and causes the "isAlreadyLoaded" method to transmit the pushed item to the new method frame as its An argument, and returns a Boolean value to the stack when returned by this "invokestatic" instruction. This change is obvious because it fixes the <init> method to execute the "isAlreadyLoaded" method and related jobs, corresponding to the start of the execution of the <init> method, and returns a Boolean argument (representing whether to apply The object of this <init> method is initialized on another machine in the complex machine M1...Mn) to the stack of execution method frames of the <init> method.
接著,兩個JAVA虛擬機器指令"ifeq 13"及"return"被插入到該"5 invokestatic #2"指令之後及該"12 aload_0"指令之前的該碼串流中。這兩個指令的第一個為"ifeq 13"指令,其使得該JAVA虛擬機器推出最上方項目離開該堆疊,並執行該推出的數值與零之間的比較。如果該執行的比較成功(即如果且僅如果該推出的數值等於零時),則執行繼續到"12 aload_0"指令。但是如果該執行的比較失敗(即如果且僅如果該推出的數值不等於零),則執行繼續到該碼串流中的下一個指令,其為該"11 return"指令。此改變特別明顯,因為其修正該<init>方法來在當該"isAlreadyLoaded"方法之傳回值為負值(即"false")時即繼續執行該<init>方法(即指令12-19),或是當該"isAlreadyLoaded"方法為正值(即"true")時即中斷該<init>方法之執行(即該"11 return"指令造成傳回控制給此<init>方法之引起者。Next, two JAVA virtual machine instructions "ifeq 13" and "return" are inserted into the code stream after the "5 invokestatic #2" instruction and before the "12 aload_0" instruction. The first of these two instructions is the "ifeq 13" instruction, which causes the JAVA virtual machine to push the topmost item out of the stack and perform a comparison between the pushed value and zero. If the comparison of the execution is successful (ie if and only if the value of the push is equal to zero), then execution continues to the "12 aload_0" instruction. But if the comparison of the execution fails (ie if and only if the pushed value is not equal to zero), execution proceeds to the next instruction in the code stream, which is the "11 return" instruction. This change is particularly noticeable because it fixes the <init> method to continue executing the <init> method (ie, instructions 12-19) when the return value of the "isAlreadyLoaded" method is negative (ie "false"). Or when the "isAlreadyLoaded" method is positive (ie "true"), the execution of the <init> method is interrupted (ie, the "11 return" instruction causes the return control to be caused by the <init> method.
該方法void isAlreadyLoaded(java.lang.Object),附錄B7之InitClient碼之部份,及分散式執行時間系統(DRT)71之部份,其執行機器M1...Mn之間的通信作業,以協調該等機器M1...Mn之間的<init>方法之執行。此範例的isAlreadyLoaded方法傳送在第15圖之一機器X上執行之附錄B8的InitServer碼,藉由傳送一「初始化狀態要求」到對應於正被「初始化」的該物件之機器X(即此<init>方法所屬的該物件)。請參考第19圖及附錄B8,機器X接收對應於該<clinit>方法所屬的物件之「初始化狀態要求」,並造成初始化狀態或記錄之一表格來決定該要求所對應之該物件的該初始化狀態。The method void isAlreadyLoaded (java.lang.Object), part of the InitClient code of Appendix B7, and part of the Decentralized Execution Time System (DRT) 71, which performs communication operations between the machines M1...Mn, Coordinate the execution of the <init> method between the machines M1...Mn. The isAlreadyLoaded method of this example transmits the InitServer code of Appendix B8 executed on machine X of Figure 15, by transmitting an "initialization state request" to the machine X corresponding to the object being "initialized" (ie, this < Init> the object to which the method belongs). Referring to Figure 19 and Appendix B8, machine X receives the "initialization state requirement" corresponding to the object to which the <clinit> method belongs, and causes an initialization state or a table of records to determine the initialization of the object corresponding to the request. status.
如果對應於該初始化狀態要求之物件並未在除了該要求機器之外的另一部機器上被初始化,則機器X將會傳送一回應,代表該物件尚未被初始化,並更新對應於該指定的物件的一記錄登錄項來指示該物件現在被初始化。另外,如果對應於該初始化狀態要求之物件在除了該要求機器之外的另一部機器上被初始化,則機器X將傳送一回應來指示該物件已經被初始化。對應於決定了此初始化狀態要求所關於的該物件並未在除了該要求機器之外的另一部機器上被初始化,產生一回覆,並傳送到該要求機器來指示該物件並未被初始化。此外,機器X較佳地是更新對應於該初始化狀態要求所相關的該物件之登錄項來指示該物件現在被初始化。在自機器X接收到這種訊息之後,代表該物件並未在另一部機器上被初始化,該isAlreadyLoaded()方法及作業終止執行,並傳回一'false'數值到先前的方法訊框,其為該<init>方法之執行方法訊框。另外,在自機器X接收到一訊息之後,代表該物件已經在另一部機器上被初始化,該isAlreadyLoaded()方法及作業終止執行,並傳回一'true'數值到先前的方法訊框,其為該<init>方法之執行方法訊框。在此傳回作業之後,該<init>方法訊框之執行然後重新開始,如在步驟006中附錄B5之碼序列中所指出。If the object corresponding to the initialization state requirement is not initialized on another machine other than the required machine, then machine X will send a response indicating that the object has not been initialized and updated corresponding to the specified A record entry for the object indicates that the object is now initialized. Additionally, if the item corresponding to the initialization state requirement is initialized on another machine other than the required machine, machine X will send a response indicating that the item has been initialized. The object corresponding to the decision determining the initialization state requirement is not initialized on another machine other than the required machine, generating a reply and transmitting to the requesting machine to indicate that the object has not been initialized. In addition, machine X preferably updates the entry corresponding to the object associated with the initialization state request to indicate that the object is now initialized. After receiving such a message from machine X, the object is not initialized on another machine, the isAlreadyLoaded() method and the job terminate execution, and a 'false' value is returned to the previous method frame. It is the execution method frame of the <init> method. In addition, after receiving a message from machine X, the object is already initialized on another machine, the isAlreadyLoaded() method and the job terminate execution, and a 'true' value is returned to the previous method frame. It is the execution method frame of the <init> method. After the job is returned here, execution of the <init> method frame is then resumed, as indicated in the code sequence of Appendix B5 in step 006.
其將可瞭解到該修正的碼在具有複數部電腦或運算機器之一分散式運算環境中允許該記憶體操縱作業之協調的作業,所以關於在該複數部機器M1...Mn上未修正的碼或程序之作業的問題(例如像是多重初始化、或重新初始化作業)在當應用該修正的碼或程序時並不會發生。It will be understood that the modified code allows the memory to operate in coordination in a distributed computing environment having a plurality of computers or computing machines, so that no correction is made on the complex machine M1...Mn. The problem of the code or program operation (such as, for example, multiple initialization, or reinitialization of the job) does not occur when the modified code or program is applied.
附錄B1為附錄B9之example.java應用之<clinit>方法之解碼的編譯形式之修正前的摘錄。附錄B2為附錄B1之修正後的形式,其根據第20圖之步驟由附錄B10之InitLoader.java所修正。附錄B3為附錄B9之example.java應用之<init>方法的解碼之編譯的形式的修正之前摘錄。附錄B4為附錄B3的修正後形式,根據第21圖之步驟由附錄B10之InitLoader.java所修正。附錄B5為附錄B1的另一種修正後形式,根據第20圖之步驟由附錄B10之InitLoader.java所修正。且附錄B6為附錄B3之另一種修正後形式,根據第21圖之步驟由附錄B10之InitLoader.java所修正。該等修正以粗體來強調。Appendix B1 is an excerpt from the pre-correction of the compiled form of the decoding of the <clinit> method of the example.java application of Appendix B9. Appendix B2 is the revised form of Appendix B1, which is modified by InitLoader.java of Appendix B10 according to the steps in Figure 20. Appendix B3 is an excerpt from the revision of the compiled form of the decoding of the <init> method of the example.java application of Appendix B9. Appendix B4 is the revised form of Appendix B3, and the steps according to Figure 21 are corrected by InitLoader.java of Appendix B10. Appendix B5 is another modified form of Appendix B1, which is modified by InitLoader.java in Appendix B10 according to the steps in Figure 20. And Appendix B6 is another modified form of Appendix B3. The steps according to Figure 21 are corrected by InitLoader.java of Appendix B10. These corrections are highlighted in bold.
現在請參考第20圖及第21圖,接下來的程序為呈現出修正類別初始化例式(即該"<init>"方法)及物件初始化例式(即該"<init>"方法)。接下來的例式來修正關於類別之一<clinit>方法,藉以由附錄B1之碼區段(參見表格X)轉換到附錄B5之碼區段(參見表格XIV)來指示。類似地,接下來的程序來修正關於物件之一物件初始化<init>方法,藉以由附錄B3之碼區段(參見表格XII)轉換到附錄B6之碼區段(參見表格XV)來指示。Referring now to FIG. 20 and FIG. 21, the next procedure is to present the modified category initialization example (ie, the "<init>" method) and the object initialization example (ie, the "<init>" method). The following example modifies the <clinit> method for one of the categories, whereby the code segment of Appendix B1 (see Table X) is converted to the code segment of Appendix B5 (see Table XIV). Similarly, the next procedure is to modify the object initialization <init> method for an object, whereby it is indicated by the code section of Appendix B3 (see Table XII) to the code section of Appendix B6 (see Table XV).
該應用碼50之初始載入(顯示在附錄B9之原始碼形式的一例示性範例,及顯示在附錄B1(亦參見表X)及附錄B3(亦參見表XII)中的一相對應部份解碼的形式)到該JAVA虛擬機器72上,係在步驟201中進行,且該碼被分析或細查,藉以偵測一或多個類別初始化指令、碼區塊或方法(即"<clinit>"方法),由步驟202進行,及/或一或多個物件初始化指令、碼區塊或方法(即"<init>"方法),由步驟212進行。一旦偵測到,由進行步驟203來修正一<clinit>方法,及由進行步驟213來修正一<init>方法。一修正的類別初始化例式之範例例示表示在附錄B2(亦參見表XI),及另一種例示表示在附錄B5(亦參見表XIV)。一修正的物件初始化例式之範例例示係表示在附錄B4(亦參見表XIII),其另一種例示表示在附錄B6(亦參見表XV)。如步驟204及214所示,於修正完成之後,則繼續該載入程序,使得該修正的應用碼被載入到每部機器上,而非該未修正的應用碼。Initial loading of the application code 50 (an exemplary example of the source code form shown in Appendix B9 and a corresponding part shown in Appendix B1 (see also Table X) and Appendix B3 (see also Table XII) The decoded form is sent to the JAVA virtual machine 72 in step 201, and the code is analyzed or scrutinized to detect one or more class initialization instructions, code blocks or methods (ie, "<clinit> "Method", performed by step 202, and/or one or more object initialization instructions, code blocks or methods (ie, "<init>" method), is performed by step 212. Once detected, a <clinit> method is modified by performing step 203, and an <init> method is modified by performing step 213. An example of a modified class initialization example is shown in Appendix B2 (see also Table XI), and another example is shown in Appendix B5 (see also Table XIV). An example of a modified object initialization example is shown in Appendix B4 (see also Table XIII), and another illustration is shown in Appendix B6 (see also Table XV). As shown in steps 204 and 214, after the correction is completed, the loader is continued such that the modified application code is loaded onto each machine instead of the uncorrected application code.
附錄B1(亦參見表X)及附錄B2(亦參見表XI)分別為一類別初始化例式(即一"<clinit>"方法)的之前(或預修正或未修正碼)及之後(或後修正或修正的碼)摘錄。此外,另一種修正的<clinit>方法之另一個範例係例示於附錄B5(亦參見表XIV)。加入到該方法之修正過的碼以粗體文字來強調。在附錄B1之未部份修正的解碼之碼範例中,該<clinit>方法之"new #2"及"invokespecial #3"指令產生一新物件(型別為'example'),及接下來的指令"putstaitc #4"寫入此新產生的物件之參照到稱為"currentExample"之記憶體位置(欄位)。因此,不需要管理複數部機器M1,...,Mn之分散式環境中協調的類別初始化,且每個具有第9,10,11,12及13圖之一記憶體更新及傳遞手段,藉此該應用程式碼50係要操作成橫跨複數部機器M1...Mn之一單一協調、一致及調和的例證,每部電腦或運算機器將利用對應於該<clinit>方法之多重執行的多種及不同物件來重新初始化(及視需要另外重新寫入或覆寫)該"currentExample"記憶體位置(欄位),造成在每部機器M1,...,Mn上該應用程式碼50之事件之間可能的不調和或不一致記憶體。清楚地是此並非一單一應用程式碼50例證的程式師或使用者所預期要發生的。Appendix B1 (see also Table X) and Appendix B2 (see also Table XI) are the previous (or pre-corrected or uncorrected) and then (or after) a category initialization example (ie a "<clinit>" method) Extracted or corrected code). In addition, another example of another modified <clinit> method is illustrated in Appendix B5 (see also Table XIV). The corrected code added to the method is highlighted in bold text. In the decoded code example that is not partially modified in Appendix B1, the "new #2" and "invokespecial #3" instructions of the <clinit> method generate a new object (type 'example'), and the following The instruction "putstaitc #4" writes a reference to this newly generated object to the memory location (field) called "currentExample". Therefore, it is not necessary to manage the coordinated class initialization in the distributed environment of the plurality of machines M1, . . . , Mn, and each of the memory update and transfer means of the 9, 10, 11, 12 and 13 pictures is borrowed. The application code 50 is intended to operate as an example of a single coordination, consistency and reconciliation across one of the plurality of machines M1...Mn, each computer or computing machine utilizing multiple executions corresponding to the <clinit> method Multiple and different objects to reinitialize (and optionally rewrite or overwrite) the "currentExample" memory location (field), resulting in the application code 50 on each machine M1,..., Mn Possible non-harmonic or inconsistent memory between events. It is clear that this is not what a programmer or user of a single application code 50 would expect to happen.
所以,藉由DRT的好處,該應用碼50被修正成其由改變該類別初始化例式(即該<clinit>方法)來載入到該機器中。所做的改變(以粗體強調)為該修正的<clinit>方法所執行的該等初始指令。這些加入的指令決定了此特定類別之初始化狀態,其藉由檢查是否對應於此特定類別在另一部機器上之一類似同等本地類別,其已經被初始化並依需要載入,其藉由呼叫一例式來決定該複數個類似同等類別的初始化狀態,例如該"is already loaded"(例如"isAlreadyLoaded()")之程序或方法。執行第17圖之步驟172-176之DRT 71的附錄B7的InitClient之"isAlreadyLoaded()"方法決定了在每一部機器M1,...,Mn上的類似同等本地類別之初始化狀態,其對應於正在載入的該特定類別,其結果為一"真"結果或一"假"結果,皆對應於是否該等機器M1...Mn之另一個(或多個)已經被初始化,並視需要載入一類似同等的類別。Therefore, with the benefit of DRT, the application code 50 is modified to be loaded into the machine by changing the class initialization instance (i.e., the <clinit> method). The changes made (in bold) are the initial instructions executed by the modified <clinit> method. These added instructions determine the initialization state of this particular class by checking whether one of the other classes on this machine is similar to the equivalent local class, which has been initialized and loaded as needed, by calling An example is to determine the initialization state of the plurality of similar classes, such as the "is already loaded" (eg, "isAlreadyLoaded()") program or method. The "isAlreadyLoaded()" method of InitClient of Appendix B7 of DRT 71 executing steps 172-176 of Figure 17 determines the initialization state of similar equivalent local categories on each machine M1,..., Mn, corresponding to For the particular category being loaded, the result is a "true" result or a "false" result, which corresponds to whether another (or more) of the machines M1...Mn have been initialized, and Need to load a similar category.
DRT 71之附錄B7之InitClient的初始化決定例式或方法"isAlreadyLoaded()"可視需要採用一引數,其可代表此類別的一唯一識別項(參見附錄B5及表XIV)。例如,正被考慮要初始化的該類別名稱,代表此類別正被考慮要初始化的該類別或類別物件之一參照,或代表橫跨所有機器之一唯一數目或識別項(也就是對應於複數個類似同等本地類別之一唯一識別項,其每個在複數部機器M1...Mn上),其要用於決定在每部機器M1...Mn上複數部類似同等本地類別之初始化狀態。依此方式,該DRT可以同時支援多個類別之初始化,而不會混淆,因為該多重類別或尚未載入者,已使用每個類別之唯一識別項來載入,該DRT 71可有數種可能的方法來決定該類別之初始化狀態。較佳地是,該要求機器可以依序要求每個其它要求的機器(例如藉由使用一電腦通信網路來在該要求機器及該被要求機器之間交換查詢及回應訊息),如果對應該唯一識別項的於該要求的機器之類似同等本地類別被初始化,且如果任何要求的機器回覆為真,代表該類似同等本地類別已經被初始化,則傳回一真結果,其由該isAlreadyLoaded()方法傳回,代表該本地類別不需要被初始化,否則即傳回一假結果,由該isAlreadyLoaded()方法傳回,代表該本地類別必須被初始化。當然對於真或假結果之不同邏輯方案另可用相同的效果來實施。另外,在該本地機器上之DRT可考慮一共享的記錄表(可能在一獨立機器(如機器X),或在每部本地機器上一調和共享的記錄表,及被更新來維持實質上相同,或在一資料庫中),以決定是否在其它機器上之複數部類似同等類別之一已經被初始化。The initialization decision method or method "isAlreadyLoaded()" of the InitClient of Appendix B7 of DRT 71 may optionally use an argument, which may represent a unique identifier of this category (see Appendix B5 and Table XIV). For example, the category name being considered for initialization, representing one of the categories or categories of objects that the category is being considered for initialization, or representing a unique number or identification across one of the machines (ie, corresponding to a plurality of Similar to one of the equivalent local categories, the unique identifiers, each of which is on the plurality of machines M1...Mn), are used to determine the initialization state of the plurality of parts of the same local class on each machine M1...Mn. In this way, the DRT can support the initialization of multiple categories at the same time without confusion, because the multiple categories or not yet loaded, have been loaded using the unique identifier of each category, the DRT 71 can have several possibilities The method to determine the initialization state of the category. Preferably, the requesting machine can sequentially request each of the other required machines (for example, by using a computer communication network to exchange query and response messages between the requesting machine and the requested machine), if corresponding The unique identifier is initialized in a similar equivalent local category of the requested machine, and if any required machine reply is true, indicating that the similar equivalent local category has been initialized, then a true result is returned, which is by the isAlreadyLoaded() The method returns, indicating that the local category does not need to be initialized, otherwise a false result is returned, which is returned by the isAlreadyLoaded() method, indicating that the local category must be initialized. Of course, different logic schemes for true or false results can be implemented with the same effect. In addition, the DRT on the local machine may consider a shared record table (possibly on a separate machine (such as Machine X), or a shared and shared record table on each local machine, and updated to maintain substantially the same , or in a database, to determine whether one of the equivalent classes on another machine has been initialized.
如果DRT 71之isAlreadyLoaded()方法傳回假,則此代表此類別(即在該等複數部機器M1...Mn上複數個類似同等本地類別)之前並未被初始化,其係在該複數部機器M1...Mn之分散式運算環境中的任何其它機器上,因此該類別初始化方法之執行係要發生或進行,因為此係視為在每部機器上該複數個類似同等類別的一類別的第一及原始初始化。因此,當存在初始化狀態之一共享的記錄表,該DRT必須更新在該共享的記錄表中對應於此類別的該初始化狀態記錄為真或其它數值,以代表此類別被初始化,使得藉由所有機器及選擇性包括該目前機器之初始化狀態的該共享記錄表的後續參考(例如由isAlreadyLoaded方法之所有後續引發來執行),現在將傳回一真的值,以代表此類別已經被初始化。因此,如果isAlreadyLoaded()傳回假,該修正的類別初始化例式重新或繼續(或另外視需要開始或啟始)執行。If the isAlreadyLoaded() method of DRT 71 returns false, this represents that this category (ie, a plurality of similarly equivalent local categories on the plurality of machines M1...Mn) has not been initialized, and is in the plural The machine M1...Mn is distributed on any other machine in the computing environment, so the execution of the class initialization method is to occur or proceed as this is considered to be a plurality of categories of similar categories on each machine. The first and original initialization. Therefore, when there is a record table shared by one of the initialization states, the DRT must update the initialization state record corresponding to the category in the shared record table to be true or other value to be initialized on behalf of this category, so that by all The machine and subsequent references to the shared record table that includes the initialization state of the current machine (eg, executed by all subsequent firings of the isAlreadyLoaded method) will now return a true value to indicate that the class has been initialized. Therefore, if isAlreadyLoaded() returns false, the modified class initialization routine resumes or continues (or otherwise starts or starts as needed).
另一方面,如果該DRT 71之isAlreadyLoaded方法傳回真,則此代表此類別(在該複數部機器M1...Mn之一上每個該複數個類似同等本地類別)已經在該分散式環境中被初始化,如同記錄在該類別之初始化狀態的機器X上該共享的記錄表中。在這種狀況下,該類別初始化方法並不要執行(或另外重新開始或繼續,或開始或執行到完成),因為其有可能造成不想要的互動或矛盾,例如記憶體、資料結構或其它機器資源或裝置之重新初始化。因此,當該DRT傳回真時,在該<clinit>方法開始時所插入的指令可防止該初始化例式的執行(選擇性為整體或部份),藉由透過使用該傳回指令來中斷開始或繼續該<clinit>方法之執行,且後續中止此類別之JAVA虛擬機器的初始化作業。On the other hand, if the isAlreadyLoaded method of the DRT 71 returns true, then this represents that the category (each of the plurality of similarly equivalent local categories on one of the plurality of machines M1...Mn) is already in the decentralized environment. It is initialized as if it were recorded on the shared record table on the machine X of the initialization state of the category. In this case, the class initialization method does not execute (or otherwise restart or continue, or start or execute to completion) because it may cause unwanted interactions or contradictions, such as memory, data structures, or other machines. Reinitialization of resources or devices. Therefore, when the DRT returns true, the instruction inserted at the beginning of the <clinit> method prevents the execution of the initialization instance (selectively in whole or in part) by interrupting the use of the return instruction. Starts or resumes the execution of the <clinit> method, and subsequently suspends the initialization of the JAVA virtual machine in this category.
物件之初始化例式的一同等程序(例如"<init>"方法)係例示於第21圖,其中步驟212及213等同於第20圖之步驟202及203。此造成附錄B3之碼被轉換到附錄B4(亦參見表XIII)或附錄B6(亦參見表XV)之碼當中。An equivalent procedure for the initialization of the object (e.g., "<init>" method) is illustrated in Figure 21, where steps 212 and 213 are equivalent to steps 202 and 203 of Figure 20. This causes the code in Appendix B3 to be converted into the code in Appendix B4 (see also Table XIII) or Appendix B6 (see also Table XV).
附錄B3(亦參見表XII)及附錄B4(亦參見表XIV)分別為一物件初始化例式(即一"<linit>"方法)的之前(或預修正或未修正碼)及之後(或後修正或修正的碼)摘錄。此外,另一種修正的<init>方法之另一個範例係例示於附錄B6(亦參見表XV)。加入到該方法之修正過的碼以粗體文字來強調。在附錄B4之未修正的部份解碼之碼範例中,該<init>方法之"aload_0"及"invokespecial #3"指令引起該java.lang.Object超類別之<init>。接下來,接著的指令"aload_0"載入一參照到「此」物件到該堆疊上,成為給"8 putfield #3"指令的引數之一。接下來,接著的指令"invokestatic #2"引發該方法java.lang.System.currentTimeMillis(),並傳回一長數值在該堆疊上。接下來,接著的指令"putfield #3"寫入該長數值置於該堆疊上,為該先前"invokestatic #2"指令到稱之為"timestamp"的記憶體位置(欄位),其對應於由"4 aload_0"指令被載入到該堆疊上的該物件例證。因此,不需要管理複數部機器M1,..,Mn之分散式環境中協調的物件初始化,且每個具有第9,10,11,12及13圖之一記憶體更新及傳遞手段,藉此該應用程式碼50係要操作成橫跨複數部機器M1...Mn之一單一協調、一致及調和的例證,每部電腦或運算機器將利用對應於該<init>方法之多重執行的多種及不同數值來重新初始化(及視需要另外重新寫入或覆寫)該"timestamp"記憶體位置(欄位),造成在每部機器M1,...,M上n該應用程式碼50之事件之間可能的不調和或不一致記憶體。清楚地是此並非一單一應用程式碼50例證的程式師或使用者所預期要發生的。Appendix B3 (see also Table XII) and Appendix B4 (see also Table XIV) are the pre- (or pre-corrected or uncorrected) and/or after (or pre-corrected or uncorrected) of an object initialization example (ie a "<linit>" method) Extracted or corrected code). In addition, another example of another modified <init> method is exemplified in Appendix B6 (see also Table XV). The corrected code added to the method is highlighted in bold text. In the unmodified part of the code example of Appendix B4, the "aload_0" and "invokespecial #3" instructions of the <init> method cause <init> of the java.lang.Object superclass. Next, the next instruction "aload_0" loads a reference to the "this" object onto the stack, becoming one of the arguments to the "8 putfield #3" instruction. Next, the next instruction "invokestatic #2" raises the method java.lang.System.currentTimeMillis() and returns a long value on the stack. Next, the next instruction "putfield #3" writes the long value onto the stack, for the previous "invokestatic #2" instruction to a memory location (field) called "timestamp", which corresponds to The object instance loaded onto the stack by the "4 aload_0" instruction. Therefore, there is no need to manage coordinated object initialization in a distributed environment of the plurality of machines M1, .., Mn, and each has a memory update and transfer means of the 9, 10, 11, 12, and 13 figures, whereby The application code 50 is intended to operate as an example of single coordination, consistency and reconciliation across one of the plurality of machines M1...Mn, each computer or computing machine utilizing multiple implementations corresponding to the <init> method And different values to reinitialize (and optionally rewrite or overwrite) the "timestamp" memory location (field), resulting in the application code 50 on each machine M1,...,M Possible non-harmonic or inconsistent memory between events. It is clear that this is not what a programmer or user of a single application code 50 would expect to happen.
所以,藉由DRT的好處,該應用碼50被修正成其由改變該物件初始化例式(即該<init>方法)來載入到該機器中。所做的改變(以粗體強調)為該修正的<init>方法所執行的該等初始指令。這些加入的指令決定了此特定類別之初始化狀態,其藉由檢查是否對應於此特定物件在另一部機器上之一類似同等本地物件,其已經被初始化並依需要載入,其藉由呼叫一例式來決定該複數個類似同等物件的初始化狀態,例如附錄B7之該"is already loaded"(例如"isAlreadyLoaded()")之程序或方法。執行第17圖之步驟172-176之DRT 71的"isAlreadyLoaded()"方法決定了在每一部機器M1,...,Mn上的類似同等本地物件之初始化狀態,其對應於正在載入的該特定物件,其結果為一"真"結果或一"假"結果,皆對應於是否該等機器M1...Mn之另一個(或多個)已經被初始化,並視需要載入一類似同等的物件。Therefore, with the benefit of DRT, the application code 50 is modified to be loaded into the machine by changing the object initialization instance (i.e., the <init> method). The changes made (in bold) are the initial instructions executed by the modified <init> method. These added instructions determine the initialization state of this particular class by checking whether one of the specific objects on the other machine is equivalent to an equivalent local object, which has been initialized and loaded as needed, by calling An example determines the initialization state of the plurality of similar objects, such as the program or method of "is already loaded" (for example, "isAlreadyLoaded()") in Appendix B7. The "isAlreadyLoaded()" method of the DRT 71 performing steps 172-176 of Figure 17 determines the initialization state of similar equivalent local objects on each machine M1,..., Mn, which corresponds to the loading being performed. The result of the particular object, a "true" result or a "false" result, corresponds to whether another (or more) of the machines M1...Mn have been initialized and loaded as needed. Equivalent objects.
DRT 71之初始化決定程序或方法"isAlreadyLoaded()"可視需要採用一引數,其可代表此物件的一唯一識別(參見附錄B6及表XV)。例如,正被考慮要初始化的該物件名稱,正被考慮要初始化的該物件之一參照,或代表橫跨所有機器之一唯一數目或識別項(也就是對應於複數個類似同等本地類別之一唯一識別項,其每個在複數部機器M1...Mn上),其要用於決定在每部機器M1...Mn上複數部類似同等本地物件之此物件的初始化狀態。依此方式,該DRT可以同時支援多個物件之初始化,而不會混淆,因為該多重物件或尚未載入者,已使用每個物件之唯一識別項來載入,The DRT 71 initialization decision procedure or method "isAlreadyLoaded()" may optionally use an argument that represents a unique identification of the object (see Appendix B6 and Table XV). For example, the object name being considered for initialization is being referenced by one of the objects to be initialized, or represents a unique number or identification across one of the machines (ie, corresponding to one of a plurality of similarly equivalent local categories) The unique identification items, each of which is on the plurality of machines M1...Mn), are used to determine the initialization state of the object of the plurality of identical local objects on each of the machines M1...Mn. In this way, the DRT can simultaneously support the initialization of multiple objects without confusion, because the multiple objects or unloaded ones have been loaded using the unique identifier of each object.
該DRT 71可有數種可能的方法來決定該物件之初始化狀態。較佳地是,該要求機器可以依序要求每個其它要求的機器(例如藉由使用一電腦通信網路來在該要求機器及該被要求機器之間交換查詢及回應訊息),如果對應該唯一識別的於該要求的機器之類似同等本地物件被初始化,且如果任何要求的機器回覆為真,代表該類似同等本地類別已經被初始化,則傳回一真結果,其由該isAlreadyLoaded()方法傳回,代表該本地物件不需要被初始化,否則即傳回一假結果,由該isAlreadyLoaded()方法傳回,代表該本地物件必須被初始化。當然對於真或假結果之不同邏輯方案另可用相同的效果來實施。另外,在該本地機器上之DRT可考慮一共享的記錄表(可能在一獨立機器(如機器X),或在每部本地機器上一調和共享的記錄表,及被更新來維持實質上相同,或在一資料庫中),以決定此特定物件(或再其它機器上之複數個類似同等物件中任何一個)已經被該要求的機器當中之一來初始化。The DRT 71 can have several possible methods to determine the initialization state of the object. Preferably, the requesting machine can sequentially request each of the other required machines (for example, by using a computer communication network to exchange query and response messages between the requesting machine and the requested machine), if corresponding A similarly equivalent local object uniquely identified to the requested machine is initialized, and if any required machine reply is true, indicating that the similar equivalent local class has been initialized, then a true result is returned, which is determined by the isAlreadyLoaded() method Returning, the local object does not need to be initialized, otherwise a false result is returned, which is returned by the isAlreadyLoaded() method, indicating that the local object must be initialized. Of course, different logic schemes for true or false results can be implemented with the same effect. In addition, the DRT on the local machine may consider a shared record table (possibly on a separate machine (such as Machine X), or a shared and shared record table on each local machine, and updated to maintain substantially the same , or in a database, to determine that this particular object (or any of a number of similar equivalents on other machines) has been initialized by one of the required machines.
如果DRT 71之isAlreadyLoaded()方法傳回假,則此代表此物件(即在該等複數部機器M1...Mn上複數個類似同等本地物件)之前並未被初始化,其係在該複數部機器M1...Mn之分散式運算環境中的任何其它機器上,因此該物件初始化方法之執係要發生或進行,因為此係視為第一及原始初始化。因此,當存在初始化狀態之一共享的記錄表,該DRT必須更新在該共享的記錄表中對應於此物件的該初始化狀態記錄為真或其它數值,以代表此物件被初始化,使得藉由所有機器及選擇性包括該目前機器之初始化狀態的該共享記錄表的後續參考(例如由isAlreadyLoaded方法之所有後續引發來執行),現在將傳回一真的值,以代表此物件已經被初始化。因此,如果isAlreadyLoaded()傳回假,該修正的物件初始化例式重新或繼續(或另外視需要開始或啟始)執行。If the isAlreadyLoaded() method of DRT 71 returns false, then this represents that the object (ie, a plurality of similarly equivalent local objects on the plurality of machines M1...Mn) has not been initialized, and is in the plural The machine M1...Mn is on any other machine in the decentralized computing environment, so the implementation of the object initialization method is to occur or proceed because this is considered the first and the original initialization. Therefore, when there is a record table shared by one of the initialization states, the DRT must update the initialization state record corresponding to the object in the shared record table to be true or other value to represent that the object is initialized, so that by all The machine and subsequent references to the shared record table that includes the initialization state of the current machine (eg, executed by all subsequent firings of the isAlreadyLoaded method) will now return a true value to indicate that the object has been initialized. Therefore, if isAlreadyLoaded() returns false, the modified object initialization routine resumes or continues (or otherwise starts or starts as needed).
另一方面,如果該DRT 71之isAlreadyLoaded()方法傳回真,則此代表此物件(在該複數部機器M1...Mn之一上每個該複數個類似同等本地物件)已經在該分散式環境中被初始化,如同記錄在該物件之初始化狀態的機器X上該共享的記錄表中。在這種狀況下,該物件初始化方法並不要執行(或另外重新開始或繼續,或開始或執行到完成),因為其有可能造成不想要的互動或矛盾,例如記憶體、資料結構或其它機器資源或裝置之重新初始化。因此,當該DRT傳回真時,接近該<init>方法開始時所插入的指令可防止該初始化例式的執行(選擇性為整體或部份),藉由透過使用該傳回指令來中斷開始或繼續該<init>方法之執行,且後續中止此物件之JAVA虛擬機器的初始化作業。On the other hand, if the isAlreadyLoaded() method of the DRT 71 returns true, then this represents that the object (each of the plurality of similarly equivalent local objects on one of the plurality of machines M1...Mn) is already in the dispersion The environment is initialized as if it were recorded on the shared record table on machine X of the object's initialization state. In this case, the object initialization method does not execute (or otherwise restart or continue, or start or execute to completion) because it may cause unwanted interactions or contradictions, such as memory, data structures, or other machines. Reinitialization of resources or devices. Therefore, when the DRT returns true, the instruction inserted at the beginning of the <init> method prevents the execution of the initialization instance (selectively in whole or in part) by interrupting the use of the return instruction. Starts or resumes the execution of the <init> method, and subsequently suspends the initialization of the JAVA virtual machine for this object.
類似於用於<clinit>之修正係用於<init>。該應用程式的<init>方法(或多種方法,因為可為多個)即被偵測到,如步驟212所示,並被修正,如步驟213所示,以橫跨該分散式環境來調和地行為。Similar to the fix for <clinit> for <init>. The application's <init> method (or multiple methods, as many may be) is detected, as shown in step 212, and modified, as shown in step 213, to reconcile across the decentralized environment. Local behavior.
在已經發生修正之後的解碼之指令序列即提出在附錄B4中(及另一個類似的配置提供在附錄B6中),且該修正的/插入的指令以粗體強調。對於該<init>修正,不像是該<clinit>修正,該修正指令時常需要被置於該"invokespecial"指令之後,而非放在最開始時。此理由為JAVA虛擬機器規格所主導。其它語言時常具有類似的微細設計差異。The sequence of decoded instructions after the correction has occurred is proposed in Appendix B4 (and another similar configuration is provided in Appendix B6), and the modified/inserted instructions are highlighted in bold. For the <init> fix, unlike the <clinit> fix, the fix instruction often needs to be placed after the "invokespecial" directive, not at the very beginning. This reason is dominated by the JAVA virtual machine specification. Other languages often have similar subtle design differences.
給定測試的基本觀念來決定初始化是否已經發生在該等機器M1...Mn中某一部上的複數個類似同等類別或物件或其它資產,且如果未進行初始化,如果是的話,未進行該初始化;有數種不同的方式或具體實施例,其中可以進行或實施此協調的及調和的初始化觀念、方法及程序。Given the basic notion of testing to determine whether initialization has occurred in a number of similar categories or objects or other assets on one of the machines M1...Mn, and if not, if not, if not, The initialization; there are several different ways or embodiments in which this coordinated and reconciled initialization concept, method, and procedure can be performed or implemented.
在第一具體實施例中,一特定機器,如機器M2,載入該資產(例如類別或物件),其包括一用來修正它的初始化例式,然後將包含有新修正的初始化例式的修正物件(或類別或其它資產或資源)載入到每一部其它的機器上M1,M3,...Mn(其可依序或同時,或根據任何其它順序、例式或處理)。請注意到對應於該應用碼中僅一個物件可以有一或複數個例式,或對應於在該應用碼中的複數個物件可有複數個例式。請注意到在一具體實施例中,被載入的該初始化例式為二元化可執行物件碼。另外,被載入的該初始化例式為可執行的中間碼。In a first embodiment, a particular machine, such as machine M2, loads the asset (e.g., category or object), which includes an initialization routine for modifying it, and then includes an initialization routine containing the new correction. The correction object (or category or other asset or resource) is loaded onto each of the other machines M1, M3, ... Mn (which may be sequential or simultaneous, or according to any other order, exemplification or processing). Please note that there may be one or more instances corresponding to only one object in the application code, or a plurality of instances corresponding to a plurality of objects in the application code. Please note that in a specific embodiment, the initialization routine loaded is a binary executable object code. In addition, the initialization example loaded is an executable intermediate code.
在此配置中,其可使用術語「主控者/受控者」,每部受控(或次級)機器M1,M3,...Mn載入該修正的物件(或類別),並包含由該主控(或主要)機器(例如機器M2,或某個其它機器,如第15圖中之機器X)在該電腦通信網路或其它通信鏈結上傳送給它的新修正的初始化例式。在對於此「主控者/受控者」或「主要/次級」配置的些微變化中,該電腦通信網路可由一共用的儲存裝置所取代,例如一共用的檔案系統、或一共用的文件/檔案儲存區,例如一共用的資料庫。In this configuration, the term "master/controller" can be used, and each controlled (or secondary) machine M1, M3, ... Mn loads the corrected object (or category) and contains A newly modified initialization example sent to the host communication (or primary) machine (eg, machine M2, or some other machine, such as machine X in Figure 15) on the computer communication network or other communication link formula. In some minor changes to this "master/controller" or "primary/secondary" configuration, the computer communication network may be replaced by a shared storage device, such as a shared file system, or a shared File/file storage area, such as a shared database.
請注意到在每部機器或電腦上執行的修正不需要且經常不會是相同或類似。其所需要的是它們係以足夠類似的方式被修正,而其係根據此處所述之創新原理,該複數部機器之每一步對於其它機器為一致性且調和性地完成此處所述的作業及目的。再者,在此處所提供之說明之下將可瞭解到有大量的方法可以實施修正,例如可以根據該特定硬體、架構、作業系統、應用程式碼、或類似者或其它因素而定。其亦可瞭解到本發明之具體實施例可以在一作業系統內、或在任何作業系統之外或不具有其好處,在該虛擬機器內,在一EPROM內,在一軟體、韌體,或是這些的任何組合當中來實施。Please note that the corrections performed on each machine or computer are not required and often not the same or similar. What is needed is that they are modified in a sufficiently similar manner, and in accordance with the innovative principles described herein, each step of the plurality of machines performs consistently and harmonically for the other machines described herein. Homework and purpose. Furthermore, it will be appreciated from the description provided herein that there are numerous ways in which modifications can be implemented, such as depending on the particular hardware, architecture, operating system, application code, or the like or other factors. It will also be appreciated that embodiments of the present invention may or may not have the benefit of being within an operating system, or within any operating system, within an EPROM, in a software, firmware, or It is implemented in any combination of these.
在此「主控者/受控者」或「主要/次級」配置的另一種變化中,機器M2載入資產(例如類別或物件),包含一(或甚至一或多個)初始化例式,以未修正形式在機器M2上,然後(例如機器M2或每個本地機器)修正該類別(或物件或資產),藉由整體或部份自該資產(或類別或物件)中刪除該初始化例式,並藉由一電腦通信網路或其它通信鏈結或路徑載入該資產的修正碼,其在其它機器上具有現在修正或刪除的初始化例式。因此,在該修正並非該資產初始化例式的一轉換、測試、轉譯或編譯時,而是在所有機器中除了一部之外之上刪除該初始化例式。In another variation of the "master/controller" or "primary/secondary" configuration, machine M2 loads an asset (such as a category or object) containing one (or even one or more) initialization instances. , in uncorrected form on machine M2, and then (for example, machine M2 or each local machine) correct the category (or object or asset) by removing the initialization from the asset (or category or object) in whole or in part For example, the asset's revision code is loaded by a computer communication network or other communication link or path, which has an initialization routine that is now modified or deleted on other machines. Therefore, when the correction is not a conversion, test, translation, or compilation of the asset initialization routine, the initialization routine is deleted on all but one of all machines.
整個刪除該初始化例式之處理可以由該「主控」機器(例如機器M2或某個其它機器,例如第15圖之機器X)或另由每個其它機器M1,M3,...,Mn在收到該未修正資產時來執行。此「主控者/受控者」或「主要/次級」配置的額外變化係要使用一共享的儲存裝置,例如一共享的檔案系統,或一共享的文件/檔案儲藏處,例如一共享的資料庫,用於在機器M1,M2,...,Mn及選擇性第15圖之機器X之間交換該資產、類別或物件的碼(包括例如該修正的碼)。The entire process of deleting the initialization routine may be performed by the "master" machine (e.g., machine M2 or some other machine, such as machine X of Fig. 15) or by each of the other machines M1, M3, ..., Mn. Execute when the uncorrected asset is received. Additional changes to this "master/controlled" or "primary/secondary" configuration are to use a shared storage device, such as a shared file system, or a shared file/archive repository, such as a share A database for exchanging codes of the asset, category or object (including, for example, the modified code) between the machines M1, M2, ..., Mn and the machine X of the selective Fig. 15.
在又另外的具體實施例中,每部機器M1,...,Mn接收該未修正的資產(例如類別或物件),其中包含有一或多個初始化例式,但修正該例式,然後載入包含有現在修正的例式之資產(例如類別或物件)。雖然一種機器(例如該主控或主要機器)可以顧客化或執行一不同的修正到傳送給每部機器之初始化例式,此具體實施例更可立即使得由每部機器所進行之修正略微不同,並基於其特定的機器架構、硬體、處理器、記憶體、組態、作業系統或其它因素來改進、顧客化及/或最佳化,然而仍類似、調和並與其它機器一致於所有其它類似的修正及特性,其不需要一定類似或相同。In still other embodiments, each machine M1, . . . , Mn receives the uncorrected asset (eg, category or object), including one or more initialization instances, but corrects the example, and then Enter an asset (such as a category or object) that contains a modified example. While a machine (e.g., the master or primary machine) can customize or perform a different correction to the initialization routine delivered to each machine, this embodiment can immediately make the corrections made by each machine slightly different. And improved, customized, and/or optimized based on its specific machine architecture, hardware, processor, memory, configuration, operating system, or other factors, yet still similar, reconciled, and consistent with all other machines Other similar corrections and features do not necessarily have to be similar or identical.
在另一配置中,一特定機器(如M1)載入該未修正的資產(例如類別或物件),其包括一或多個初始化例式,且所有其它機器M2,M3,...,Mn執行一修正或刪除該資產的初始化例式(例如類別或物件),並載入該修正的版本。In another configuration, a particular machine (e.g., M1) loads the uncorrected asset (e.g., category or object), which includes one or more initialization instances, and all other machines M2, M3, ..., Mn Perform an amendment or delete the initial instance of the asset (such as a category or object) and load the modified version.
在所述之所有具體實施例中,供應或傳送該資產碼(例如類別碼或物件碼)給該等機器M1,...Mn者,且視需要包含第15圖的一機器X,其可分支、分散或傳送於不同機器之任何組合或排列之間;例如藉由提供直接機器對機器通信(例如直接由M2供應每部M1,M3,M4等),或藉由提供或使用一串接或序列性通信(例如M2供應M1,其然後供應M3,然後供應M4,依此類推),或是該直接及串接及/或序列性的組合。In all of the specific embodiments described, the asset code (eg, a category code or an object code) is supplied or transmitted to the machines M1, . . . Mn, and a machine X of FIG. 15 is included as needed. Branching, decentralizing or transmitting between any combination or arrangement of different machines; for example by providing direct machine-to-machine communication (eg, supplying each M1, M3, M4, etc. directly from M2), or by providing or using a serial connection Or serial communication (eg, M2 supplies M1, which then supplies M3, then M4, and so on), or the combination of direct and concatenated and/or serial.
在又另一種配置中,該初始機器(如M2)可以進行該應用碼50之初始載入,根據此發明來修正它,然後產生一類別/物件載入及初始化的表,其列出所有或至少所有由機器M2所載入及初始化的相關的類別及/或物件。此表格然後被傳送或傳遞(或至少其內容被傳送或傳遞)到所有其它機器(包括例如為分支或串接的形式)。然後如果一機器(除了M2之外)需要載入,且因此初始化在該表中所列出的一類別,其傳送一要求到M2來提供所需要的資訊,視需要包含要被載入之類別或物件之未修正的應用碼50或要被載入的該類別或物件之修正的應用碼,且視需要為在機器M2上先前載入及初始化的類別或物件之先前初始化的(或視需要且如果可用的話,該最新或甚至目前的)數值或內容。此模式的另一種配置係要傳送必要資訊的該要求不是到機器M2,而是另一個或甚至超過一個之機器M1,...,Mn或機器X。因此提供給機器Mn之資訊一般而言不同於由機器M2所載入及初始化的該初始狀態。In yet another configuration, the initial machine (e.g., M2) can perform an initial loading of the application code 50, modify it according to the invention, and then generate a category/object loading and initialization table listing all or At least all relevant categories and/or objects loaded and initialized by machine M2. This form is then transmitted or delivered (or at least its content is transmitted or delivered) to all other machines (including, for example, in the form of branches or concatenations). Then if a machine (other than M2) needs to be loaded, and thus initializes a category listed in the table, it sends a request to M2 to provide the required information, including the category to be loaded as needed. Or the uncorrected application code 50 of the object or the modified application code of the category or object to be loaded, and optionally initialized for the category or object previously loaded and initialized on machine M2 (or as needed And if available, the latest or even current value or content. Another configuration of this mode is that the requirement to transmit the necessary information is not to machine M2, but to another or even more than one machine M1,..., Mn or machine X. The information provided to the machine Mn is therefore generally different from the initial state loaded and initialized by the machine M2.
在上述之狀況下,對於該表格中每個登錄項為較佳及較有利的是伴隨一計數器,其在每此一類別或物件被載入及初始化在該等機器M1,...,Mn中一部之上時來增加。因此,當需要資料或其它內容時,該類別或物件內容及該相對應計數器之計數,且視需要包括該修正過或未修正的應用碼,皆回應於該需求來轉換。此「隨需求」模式對於一或多部機器M1,...,Mn可以某種程度增加了此發明之執行的負擔,但其亦降低了互連該等電腦之通信網路之交通量,並因此提供整體效益。In the above circumstances, it is preferred and advantageous for each entry in the table to be accompanied by a counter in which each category or object is loaded and initialized in the machines M1,..., Mn When the middle part is over, it will increase. Therefore, when data or other content is required, the category or object content and the corresponding counter are counted, and the modified or uncorrected application code is included as needed, in response to the demand. This "on demand" mode can increase the burden of implementation of the invention for one or more machines M1,..., Mn, but it also reduces the amount of traffic that interconnects the communication networks of such computers. And therefore provide overall benefits.
在又另一種配置中,該等機器M1到Mn可以傳送一些或所有載入要求到一額外的機器X(例如參見第15圖之具體實施例),其可執行對該應用碼50之修正,包括一個(及可能複數個)最終化例式,其透過上述任何一種方法,並傳回該修正的應用碼,其包括對於每部機器M1到Mn之現在修正的初始化例式,且這些機器依序載入該修正的應用碼,其包括本地修正的例式。在此配置中,機器M1到Mn傳送所有載入要求到機器X,其傳回一修正的應用程式碼50到每部機器,其包括修正的初始化例式。由機器X所執行的該等修正可包括本發明之範圍所涵蓋的任何修正。此配置在應用到其它機器之前當然可應用到此處所述的某些機器及其它配置。In still another configuration, the machines M1 through Mn can transmit some or all of the loading requirements to an additional machine X (see, for example, the specific embodiment of Figure 15), which can perform the correction of the application code 50, Including a (and possibly plural) finalization example, which passes any of the above methods and returns the modified application code, which includes the current modified initialization equation for each machine M1 to Mn, and these machines are The modified application code is loaded in sequence, including a local modified example. In this configuration, machines M1 through Mn transfer all load requests to machine X, which returns a modified application code 50 to each machine, including the modified initialization routine. Such modifications performed by machine X may include any modifications encompassed by the scope of the invention. This configuration can of course be applied to some of the machines and other configurations described herein before being applied to other machines.
在運算技術中的專業人士將可知道多種可能的技術,其可用於修正電腦碼,其包括但不限於測試、程式轉換、轉譯、或編譯手段。Those skilled in the art will be aware of a variety of possible techniques that can be used to modify computer code including, but not limited to, testing, program conversion, translation, or compilation means.
一種這樣的技術係對該應用碼進行修正,而不需要該應用碼之語言的一先前或後續改變。另一種這樣的技術係要轉換該原始碼(例如JAVA語言原始碼)成為一中介表示(或中介碼語言或虛擬碼),例如JAVA位元組碼。一旦此轉換發生之後,對該位元組碼做修正,然後可倒轉該轉換。此提供了修正的JAVA碼所需要的結果。One such technique is to modify the application code without requiring a prior or subsequent change in the language of the application code. Another such technique is to convert the source code (eg, JAVA language source code) into an intermediary representation (or intermediate code language or virtual code), such as a JAVA byte code. Once this conversion occurs, the byte code is corrected and the conversion can be reversed. This provides the results needed for the modified JAVA code.
另一種可能的技術為轉換該應用程式為機器碼,其可直接由原始碼、或透過前述的中介語言、或透過某些其它中介手段。然後該機器碼在被載入及執行之前被修正。另一種這樣的技術為轉換該原始碼為一中介代表,因此被修正及後續被轉換成機器碼。Another possible technique is to convert the application to machine code, either directly from the source code, or through the aforementioned intermediate language, or through some other intermediary means. The machine code is then corrected before being loaded and executed. Another such technique is to convert the source code into an intermediary representation, thus being modified and subsequently converted to machine code.
本發明包含所有這些修正程序,以及兩個、三個或甚至更多這種程序的組合。The present invention encompasses all of these correction procedures, as well as combinations of two, three or even more such programs.
請再次回到第14圖,其所示為一單一先前技術電腦操作為一JAVA虛擬機器之架構圖。依此方法,一機器(由多家製造商中任何一家製造,並具有在多種不同語言中任何一種操作的一作業系統),其可在該應用程式碼50之特定語言中操作,在此例中為JAVA語言。也就是說,一JAVA虛擬機器72能夠操作在JAVA語言中的應用碼50,並利用無關於該機器製造商及該機器的內部細節之JAVA架構。Please return to Figure 14 again, which shows an architectural diagram of a single prior art computer operating as a JAVA virtual machine. In this way, a machine (manufactured by any of a number of manufacturers and having an operating system operating in any of a number of different languages) can operate in a particular language of the application code 50, in this case In the middle of the JAVA language. That is, a JAVA virtual machine 72 is capable of operating the application code 50 in the JAVA language and utilizing a JAVA architecture that is independent of the machine manufacturer and the internal details of the machine.
當實施在一非JAVA語言或應用碼環境中,該泛用化平台、及/或虛擬機器、及/或機器、及/或執行時間系統,皆能夠操作在該平台的語言中的應用碼50(可能包括例如(但不限於)任何一種或多種的原始碼語言、中介碼語言、物件碼語言、機器碼語言及任何其它碼語言),及/或虛擬機器、及/或機器、及/或執行時間系統環境,並利用該平台、及/或虛擬機器、及/或機器、及/或執行時間系統、及/或語言架構,而無關於該機器製造商及該機器的內部細節。其將亦可在此處所提供的說明中瞭解到該平台及/或執行時間系統可包括虛擬機器及非虛擬機器軟體及/或韌體架構,以及硬體及直接硬體編碼應用及實施。When implemented in a non-JAVA language or application code environment, the generalized platform, and/or virtual machine, and/or machine, and/or execution time system are capable of operating an application code 50 in the language of the platform. (may include, for example, but not limited to, any one or more of a source code language, a mediation code language, an object code language, a machine code language, and any other code language), and/or a virtual machine, and/or machine, and/or Execute the time system environment and utilize the platform, and/or virtual machine, and/or machine, and/or execution time system, and/or language architecture, regardless of the machine manufacturer and internal details of the machine. It will also be appreciated in the description provided herein that the platform and/or execution time system can include virtual machine and non-virtual machine software and/or firmware architectures, as well as hardware and direct hardware coding applications and implementations.
再者,當僅有單一電腦或機器72時,第14圖之單一機器能夠輕易地追跡是否該等特定物件50X,50Y及/或50Z可能在該應用碼50的執行之後續時間為該應用碼50所需要。此基本上可由維護每個物件及/或類別之一「把柄計數」或類似計數或索引來完成。此計數基本上可在執行該應用碼50中追跡參照到一特定物件(或類別)之場所或次數。對於一把柄計數(或其它計數或索引為主)實施,其在當產生或指定該物件或類別之新的參照時向上增加該把柄計數(或索引),並在當消滅或遺失該物件或類別之參照時向下減少該把柄計數(或索引),當一特定物件的物件把柄計數到達零時,在該執行應用碼50中無處可參照到該特定物件(或類別),其中關於該零物件把柄計數(或類別把柄計數)。例如,在該JAVA語言及虛擬機器環境中,一「零物件把柄計數」關連於缺少指向到該特定物件之任何參照(零參照計數)。然後該物件稱之為「可最終化」或存在於一可最終化狀態。物件把柄計數(及把柄計數器)可以用類似的方式對每個物件來維持,所以可以知道每個特殊或特定物件之可最終化或非可最終化狀態。類別把柄計數(及類別把柄計數器)可以用類似的方式對每個物件及每個類別來維持,所以可以知道每個特殊或特定類別之可最終化或非可最終化狀態。再者,資產把柄計數或索引及計數器可以用類似的方式對每個資產或類別及物件來維持,所以可以知道每個特殊或特定資產之可最終化或非可最終化狀態。Moreover, when there is only a single computer or machine 72, the single machine of Figure 14 can easily trace whether the particular object 50X, 50Y and/or 50Z may be the application code at the subsequent time of execution of the application code 50. 50 needs. This can basically be done by maintaining one of the "handle counts" or similar counts or indexes for each object and/or category. This count can basically trace the location or number of times a reference to a particular item (or category) is performed in the application code 50. For a handle count (or other count or index-based implementation) that increments the handle count (or index) when a new reference to the object or category is generated or specified, and when the object or category is destroyed or lost The handle count is reduced downward (or index), and when the object handle count of a particular object reaches zero, there is nowhere to refer to the particular object (or category) in the execution application code 50, wherein the zero Object handle count (or category handle count). For example, in the JAVA language and virtual machine environment, a "zero object handle count" is associated with any reference (zero reference count) that is missing pointing to that particular object. The object is then referred to as "finalizable" or in a finalizable state. The object handle count (and the handle counter) can be maintained for each object in a similar manner, so that the finalizable or non-finalizable state of each particular or particular object can be known. The category handle count (and the category handle counter) can be maintained in a similar manner for each item and each category, so that the finalizable or non-finalizable state of each particular or particular category can be known. Furthermore, asset handle counts or indexes and counters can be maintained in a similar manner for each asset or category and object, so that the finalizable or non-finalizable state of each particular or specific asset can be known.
一旦對於一物件(或類別)已經達到此最終化狀態,該物件(或類別)可以安全地最終化。此最終化基本上可以包括物件(或類別)刪除、移除、清除、改造、回收、最終化或其它記憶體釋放作業,因為該物件(或類別)不再需要了。Once an finalized state has been reached for an item (or category), the item (or category) can be safely finalized. This finalization can basically include the removal (removal, removal, removal, modification, recycling, finalization, or other memory release operation of the item (or category) because the item (or category) is no longer needed.
因此,由於這些參照、指標、把柄計數或其它類別及物件種類追跡手段之可用性,該電腦程式師(或其它自動化或非自動化程式產生器或產生手段)在使用該JAVA語言及架構來撰寫像是該應用碼50之程式,其不需要撰寫任何特定碼,藉以提供給此類別或物件之移除、清除、刪除、改造、回收、最終化或其它記憶體釋放作業。因為僅有一單一JAVA虛擬機器72,該單一JAVA虛擬機器72可用一致性、調和及協調的方式追跡該類別及物件把柄計數,並以一自動化及不唐突的方式視需要清除(或進行最終化),例如不需要不想要的行為,錯誤、不成熟、多餘或重新最終化作業,像是可由不一致及/或不調和最終化狀態或把柄計數所造成。在類似的方式中,一單一泛用化虛擬機器或機器或執行時間系統可以追跡該類別及物件把柄計數(或如果未特別使用「物件」及「類別」指定時即相等),並視需要以一自動化及不唐突的方式清除(或進行最終化)。Therefore, due to the availability of these references, indicators, handle counts, or other categories and object type tracing means, the computer programmer (or other automated or non-automated program generator or means of production) is written using the JAVA language and architecture. The application code 50 program does not require writing any particular code to provide for removal, removal, deletion, modification, recycling, finalization or other memory release operations for this category or item. Because there is only a single JAVA virtual machine 72, the single JAVA virtual machine 72 can track the category and object handles in a consistent, harmonized, and coordinated manner and clean (or finalize) as needed in an automated and unobtrusive manner. For example, unwanted behaviors, errors, immature, redundant or re-finalized jobs are not required, as can be caused by inconsistencies and/or non-harmonic finalization states or handle counts. In a similar manner, a single generalized virtual machine or machine or execution time system can trace the category and object handle counts (or equal if not specified by the "object" and "category"), and if necessary An automated and unobtrusive way to clear (or finalize).
上述之自動化把柄計數系統係用來指出當一執行中應用程式50之一物件(或類別)不再需要,並可被「刪除」(或清除、或最終化、或再造、或回收、或其它另行釋放)。其要瞭解到當實施在「非自動化記憶體管理」語言及架構(例如像是「未收集垃圾」程式化語言,像是C,C++,FORTRAN,COBOL及機器碼語言,例如x86,SPARC,PowerPC,或中介碼語言),該應用程式碼50或程式師(或其它自動化或非自動化程式產生器或產生手段)能夠做出決定何時不再需要一特定物件(或類別),並後續可被「刪除」(或清除、或最終化、或再造、或回收)。因此,在本發明內文中的「刪除」要瞭解為包含在那些「非自動化記憶體管理」語言及架構中,對應於刪除、最終化、清除、回收或再造作業之「非自動化記憶體管理」語言及架構上物件(或類別)之刪除(或清除、或最終化、或再造、或回收、或釋放)。The automated handle counting system described above is used to indicate that an object (or category) of an executing application 50 is no longer needed and may be "deleted" (or cleared, or finalized, or recreated, or recycled, or otherwise). Released separately). It is important to understand the language and architecture implemented in "non-automated memory management" (such as "uncollected garbage" stylized languages such as C, C++, FORTRAN, COBOL and machine code languages such as x86, SPARC, PowerPC , or the mediation code language), the application code 50 or the programmer (or other automated or non-automated program generator or means of production) can make a decision as to when a specific object (or category) is no longer needed, and can be subsequently " Delete" (or clear, or finalize, or recreate, or recycle). Therefore, "deletion" in the context of the present invention is understood to be "non-automated memory management" that is included in the "non-automated memory management" language and architecture corresponding to deletion, finalization, removal, recycling or re-engineering operations. Deletion (or removal, or finalization, or re-creation, or recycling, or release) of an object (or category) in language and architecture.
對於一更為一般性的虛擬機器或摘要機器環境的組合,且對於目前及未來的電腦及/或運算機器及/或資訊家電或處理系統,且其可不利用或不需要利用到類別及/或物件,本發明之結構、方法及電腦程式及電腦程式產品仍將可應用。不會利用類別及/或物件之電腦及/或運算機器之範例包括例如由Intel公司及其它公司所製造的x86電腦架構,由Sun Microsystems公司及其它公司所製造的SPARC電腦架構,及由IBM公司及其它公司所製造的PowerPC電腦架構,及由Apple電腦公司及其它公司所製造的個人電腦產品。對於這些種類的電腦、運算機器、資訊家電,及並未利用類別或物件觀念而在其上實施的虛擬機器或虛擬運算環境,例如其可被一般化來包括基本資料型別(例如整數資料型別、浮點資料型別、長整數資料型別、雙重資料型別、字串資料型別、符號資料型別及布林資料型別)、結構化資料型別(例如陣列及記錄)衍生的型別,或其它程序性語言的其它碼或資料結構、或其它語言及環境,例如函數、指標、組件、模組、結構、參照及集合。For a more general combination of virtual machine or abstract machine environments, and for current and future computer and/or computing machines and/or information appliances or processing systems, and which may or may not utilize categories and/or The structure, method, computer program and computer program product of the present invention will still be applicable. Examples of computers and/or computing machines that do not utilize categories and/or objects include, for example, x86 computer architectures manufactured by Intel Corporation and others, SPARC computer architectures manufactured by Sun Microsystems and others, and by IBM Corporation. And the PowerPC computer architecture manufactured by other companies, as well as personal computer products manufactured by Apple Computer and other companies. For these types of computers, computing machines, information appliances, and virtual machines or virtual computing environments that are not implemented using categories or objects, for example, they can be generalized to include basic data types (eg, integer data types). Different, floating point data type, long integer data type, double data type, string data type, symbol data type and Bolling data type), structured data type (such as array and record) Type, or other code or data structure of other procedural languages, or other languages and environments, such as functions, indicators, components, modules, structures, references, and collections.
但是,在第8圖所例示的配置中(亦在第31-33圖中),其提供複數部個別電腦或機器M1,M2,...Mn,其每個係透過一通信網路53或其它通信鏈結來互連,且每部個別的電腦或機器具有一修正子51(請參見第5圖),並由例如該分散式執行時間(DRT)71(參見第8圖)所釋放或實施,並載入有一共用應用碼50。該術語共用應用程式係要理解為代表一應用程式或應用程式碼,其寫成在單一機器上作業,並整體或部份地載入及/或執行在該複數部電腦或機器M1,M2...Mn上整體或部份地執行,或視需要在該複數部電腦或機器M1,M2...Mn上來執行。但有些不同地是,有一種共用應用程式,以應用碼50所代表,且此單一複本或可能是複數個相同複本係被修正來產生該應用程式或程式碼的一修正複本或版本,每個複本或例證係預備在該複數部機器上執行。在它們被修正之後,如果它們執行類似的作業,並彼此一致性及調和性地操作,即視為是共用。其將可瞭解到,實施本發明之特徵的複數部電腦、機器、資訊家電或類似者,可視需要連接或耦合到並未實施本發明之特徵的其它電腦、機器、資訊家電或類似者。However, in the configuration illustrated in Figure 8 (also in Figures 31-33), it provides a plurality of individual computers or machines M1, M2, ... Mn, each of which is transmitted through a communication network 53 or Other communication links are interconnected, and each individual computer or machine has a modifier 51 (see Figure 5) and is released, for example, by the Decentralized Execution Time (DRT) 71 (see Figure 8) or Implemented and loaded with a shared application code 50. The term shared application is understood to mean an application or application code written to work on a single machine and loaded and/or executed in whole or in part on the computer or machine M1, M2.. The .Mn is performed in whole or in part, or as needed on the plurality of computers or machines M1, M2...Mn. But somewhat differently, there is a shared application, represented by application code 50, and this single copy or possibly multiple identical copies are modified to produce a modified copy or version of the application or code, each A copy or illustration is prepared to be executed on the plurality of machines. After they are corrected, they are considered to be shared if they perform similar jobs and operate consistently and harmonically. It will be appreciated that a plurality of computers, machines, information appliances, or the like, embodying features of the present invention, may be coupled or coupled to other computers, machines, information appliances, or the like that do not implement the features of the present invention, as desired.
在一些具體實施例中,部份或所有的該複數部個別電腦或機器可以包含在單一外殼或機殼內(例如所謂刀鋒伺服器,由Hewlett-Packard Development公司、Intel公司、IBM公司及其它所製造),或是實施在一單一印刷電路板上,或甚至在一單一晶片或晶片組內。In some embodiments, some or all of the plurality of individual computers or machines may be contained within a single enclosure or enclosure (eg, a so-called blade server, by Hewlett-Packard Development, Intel Corporation, IBM Corporation, and others). Manufactured) either on a single printed circuit board or even in a single wafer or wafer set.
基本上該修正子51或DRT 71或其它碼修正手段即負責修正該應用碼50,所以其可在JAVA語言及虛擬機器環境中執行清除、或其它記憶體再造、回收、刪除或最終化作業,例如像是在該JAVA語言及虛擬機器環境中的最終化方法,其係在一協調的、一致及調和的方式,並橫跨該複數部個別機器M1,M2...Mn之間。因此在這種運算環境中其依循必須要保證在每部個別的機器M1,M2...Mn上的本地物件及類別以一致性方式(相對於彼此)被最終化。Basically, the corrector 51 or the DRT 71 or other code correction means is responsible for correcting the application code 50, so that it can perform cleaning, or other memory reconstruction, recycling, deletion or finalization in the JAVA language and the virtual machine environment. For example, the finalization method in the JAVA language and virtual machine environment is in a coordinated, consistent and harmonic manner and spans between the plurality of individual machines M1, M2...Mn. It is therefore necessary in this computing environment to ensure that local objects and categories on each individual machine M1, M2...Mn are finalized in a consistent manner (relative to each other).
其將可瞭解到在此處的說明之下,該修正子51及該分散式執行時間71會有另外的實施。例如,該修正子51可以實施該分散式執行時間71之一個組件或在其內,因此該DRT 71可以實施該修正子51之功能及作業。另外,該修正子51之功能及作業可以在用於實施該DRT 71之結構、軟體、韌體或其它手段之外實施。在一具體實施例中,該修正子51及DRT 71係實施或寫入在電腦程式碼的單一段落中,而可提供該DRT及修正子之功能。因此該修正子功能及結構可能包含在該DRT中,並視為一選擇性組件。在如何實施之外,該修正子功能及結構係負責修正該應用碼程式之可執行碼,且該分散式執行時間功能及結構係負責實施該等電腦或機器之間的通信。在一具體實施例中的通信功能係透過在每部機器上之DRT的電腦程式碼內的一中間協定層來實施。例如該DRT可實施在該JAVA語言中的一通信堆疊,並使用該傳輸控制協定/網際網路協定(TCP/IP)來提供該等機器之間的通信或對話。實際上這些功能或作業是如何實施或分割在結構性及/或程序性元素之間,或是在本發明之電腦程式碼或資料結構之間,皆比它們所提供者要來得不重要。It will be appreciated that under the description herein, the modifier 51 and the distributed execution time 71 will have additional implementations. For example, the modifier 51 can implement or be within a component of the distributed execution time 71, such that the DRT 71 can implement the functions and operations of the modifier 51. In addition, the function and operation of the corrector 51 can be implemented in addition to the structure, software, firmware or other means for implementing the DRT 71. In a specific embodiment, the modifier 51 and the DRT 71 are implemented or written in a single paragraph of the computer code, and the functions of the DRT and the modifier are provided. Therefore, the modifier function and structure may be included in the DRT and be regarded as an optional component. In addition to how it is implemented, the modifier function and structure is responsible for modifying the executable code of the application code program, and the distributed execution time function and structure is responsible for implementing communication between the computers or machines. The communication functions in a particular embodiment are implemented by an intermediate protocol layer within the computer code of the DRT on each machine. For example, the DRT can implement a communication stack in the JAVA language and use the Transmission Control Protocol/Internet Protocol (TCP/IP) to provide communication or conversation between the machines. In fact, how these functions or operations are implemented or divided between structural and/or procedural elements, or between the computer code or data structure of the present invention, is less important than the ones they provide.
特別是,當在一特定機器上(例如機器M3)上執行的該應用程式碼不會具有活動的把柄、參照或指標到一特定本地物件或類別(即一「零把柄計數」),在另一部機器上(例如機器M5)執行的相同程式碼可具有一活動把柄、參照或指標到該本地類似同等物件或類別,其對應於機器M3之「未參照的」本地物件或類別,因此此其它機器(機器M5)在未來仍需要參照或使用該物件或類別。因此,如果在每部機器M3及M5上相對應之類似同等本地物件或類別要以相對於其它機器之一獨立及未協調之方法被最終化(會另由某個其它記憶體清除作業所清除),該物件及應用之行為整個並未定義,也就是說,缺少機器M1...Mn之間協調的、調和、及一致性最終化或記憶體清除作業,即有可能造成衝突、不想要的互動、或其它異常行為,例如在機器M5及機器M3上本地類似相對應物件之間的永久不一致性。例如,如果機器M3上該本地類似同等物件或類別要被最終化,例如由機器M3中被刪除、或清除、或再造、或回收,並以相對於機器M5之一不協調及不一致的方式,則如果機器M5係要執行一作業,或另外使用機器M3上對應於現在最終化的類似同等本地物件之本地物件或類別(這種作業例如為第9,10,11,12,及13圖中一記憶體更新及傳遞手段的環境中,一寫入到(或嘗試寫入到)機器M5上類似同等本地物件或對該特定物件之數值的修改),則該作業(該改變或嘗試的數值改變)可以不被執行(由機器M5傳遞)到整個所有其它機器M1,M2...Mn,因為至少機器M3將不會包括在其本地記憶體中相關類似同等對應的特定物件,該物件及其資料、內容及數值已經由先前物件清除、或最終化、或再造或回收作業來刪除。因此,即使可考慮到目前機器M5能夠寫入到該物件(或類別),事實上其已經在機器M3上被最終化,其代表可能這種寫入作業為不可能,或在機器M3上幾乎不可能。In particular, when the application code executed on a particular machine (eg, machine M3) does not have an active handle, reference, or indicator to a particular local object or category (ie, a "zero handle count"), The same code executed on a machine (eg, machine M5) may have a movable handle, reference or indicator to the local similar equivalent item or category, which corresponds to the "unreferenced" local object or category of machine M3, thus this Other machines (M5) still need to refer to or use the object or category in the future. Therefore, if similar native objects or categories corresponding to each machine M3 and M5 are to be finalized independently and uncoordinated with respect to one of the other machines (which will be cleared by some other memory clearing operation) ), the behavior of the object and the application is not defined as a whole, that is, the lack of coordination, reconciliation, and consistency finalization or memory removal between the machines M1...Mn may cause conflicts or unwanted Interactions, or other anomalous behaviors, such as permanent inconsistencies between similar counterparts on machine M5 and machine M3. For example, if the local similar equivalent item or category on machine M3 is to be finalized, such as deleted, or cleared, or rebuilt, or recycled by machine M3, and in a manner that is uncoordinated and inconsistent with respect to one of machines M5, Then if the machine M5 is to perform a job, or otherwise use a local object or category on the machine M3 that corresponds to a similarly equivalent local object that is now finalized (such jobs are for example in Figures 9, 10, 11, 12, and 13) In the context of a memory update and delivery means, the job (the value of the change or attempt) is written (or attempted to be written) to the machine M5 similar to the equivalent local object or the modification of the value of the particular object) Change) may not be executed (delivered by machine M5) to all other machines M1, M2...Mn, since at least machine M3 will not include specific objects in the local memory that are similarly equivalent, the object and The information, content and values have been deleted by the removal, finalization, or re-engineering or recycling of previous objects. Therefore, even if it is considered that the current machine M5 can write to the object (or category), in fact it has been finalized on the machine M3, which represents that such a writing operation is impossible, or almost on the machine M3. impossible.
此外,如果機器M3上一類別的物件要標示為可最終化及後續被最終化(例如藉由刪除、或清除、或再造、或回收),而在其它機器M1,M2...Mn上相同的物件亦不會標示為可最終化,則在機器M3上該物件的最終化(或刪除、或清除、或再造、或回收)之執行相對於所有機器M1,M2...Mn之間協調的最終化作業為不成熟,因為除了M3之外的機器尚未預備來最終化它們對應於由機器M3現在最終化或可最終化之特殊物件的本地類似同等物件。因此,如果機器M3要執行一給定特殊物件(或類別)上該清除或其它最終化例式,該清除或其它最終化例式將執行該清除或最終化,而非僅是在機器M3上的本地物件(或類別),但亦對於在所有其它機器上所有類似同等本地物件或類別(即對應於要被清除或另外最終化之特殊物件或類別)。In addition, if a category of items on machine M3 is to be marked as finalizable and subsequently finalized (eg, by deletion, or removal, or reconstitution, or recycling), the same on other machines M1, M2...Mn The object is also not marked as finalizable, and the finalization (or deletion, or removal, or re-engineering, or recycling) of the object on machine M3 is coordinated with respect to all machines M1, M2...Mn. The finalization operation is immature, as machines other than M3 have not been prepared to finalize their local equivalents corresponding to special items that are now finalized or finalizable by machine M3. Thus, if machine M3 is to perform a purge or other finalization on a given particular item (or category), the purge or other finalization instance will perform the cleanup or finalization, not just on machine M3. Local object (or category), but also for all similar local objects or categories on all other machines (ie corresponding to special items or categories to be cleared or otherwise finalized).
如果要發生這些狀況,在其它機器M1,M2...Mn上同等物件之行為即為未定義,並有可能造成機器M3與機器M1,M2...Mn之間的永久及不可恢復的不一致性。因此,雖然機器M3可獨立地決定一物件(或類別)已經可以最終化,並進行最終化該指定的物件(或類別),機器M5可能不會對於已經預備好最終化之相同類似同等本地物件(或類別)做出相同決定,因此不一致的行為將由於刪除在一部機器(例如機器M3)上複數個類似同等物件中的一個而有可能造成,但不會在其它機器(如機器M5)或多個機器,且由機器M3不成熟地執行該指定物件(或類別)之最終化例式,並代表所有其它的機器M1,M2...Mn。在機器M5之最低作業以及其它的機器處於上述的狀況下,皆為不可預測,並有可能造成不一致的結果,這種不一致性有可能例如來自於不成熟地執行最終化例式及/或在一部機器或一些機器的子集合中但不會在其它部機器上刪除該物件。因此,將不會達到在每部該等複數部機器M1,M2...Mn上對於相同應用程式碼之同步作業所需要之達到或提供一致性的協調最終化作業(或其它記憶體清除作業)。因此任何嘗試要維持相同的記憶體內容與第9,10,11,12及13圖之記憶體更新及傳遞手段者,或甚至相同的記憶體內容,做為一特別或定義的類別、物件、數值或其它資料的組合,其係對於每部機器M1,M2,...,Mn,對於相同應用程式之同步作業的需要,對於給定的習用方案皆將不會達到。If these conditions are to occur, the behavior of equivalent objects on other machines M1, M2...Mn is undefined and may result in permanent and irreversible inconsistency between machine M3 and machines M1, M2...Mn. Sex. Thus, although machine M3 can independently determine that an item (or category) has been finalized and finalize the specified item (or category), machine M5 may not be the same equivalent local object that has been prepared for finalization. (or category) make the same decision, so inconsistent behavior may result from the deletion of one of a number of similar objects on a machine (eg machine M3), but not on other machines (eg machine M5) Or a plurality of machines, and the finalized version of the specified object (or category) is performed immaturely by machine M3 and represents all other machines M1, M2...Mn. The minimum operation of machine M5 and other machines in the above-mentioned conditions are unpredictable and may result in inconsistent results. Such inconsistency may come, for example, from immature execution of the finalization and/or A machine or a subset of some machines but does not delete the object on other machines. Therefore, it will not be possible to achieve a coordinated finalization (or other memory clearing operation) required to achieve or provide consistency for the synchronization of the same application code on each of the plurality of machines M1, M2...Mn. ). Therefore, any attempt to maintain the same memory content and the memory update and transmission means of Figures 9, 10, 11, 12 and 13 or even the same memory content, as a special or defined category, object, The combination of numerical values or other data for each machine M1, M2, ..., Mn, for the simultaneous operation of the same application, will not be achieved for a given utility.
為了保證在機器M1,M2,...,Mn之間有一致性的類別及物件(或同等者)最終化狀態及最終化或清除,該應用碼50由搜尋整個可執行的應用碼50來分析或細查,藉以偵測在該應用碼50中的程式步驟(例如特定的指令或指令種類),其可定義或構成或另外代表一最終化作業或例式(或其它類似的記憶體、資料或碼清除例式、或其它類似的再造、回收或刪除作業)。在該JAVA語言中,這些程式步驟例如包含或具有一物件之某部份或全部的"finalize()"方法,並視需要為任何關連於一"finalize()"方法之其它碼、例式或方法,例如藉由該"finalize()"方法的主體喚起一不同方法之方法。In order to ensure a consistent category and object (or equivalent) finalization status and finalization or removal between machines M1, M2, ..., Mn, the application code 50 is searched for the entire executable application code 50. Analysis or scrutiny to detect program steps (eg, specific instructions or types of instructions) in the application code 50 that may define or constitute or otherwise represent a finalized job or modality (or other similar memory, Data or code removal routines, or other similar re-engineering, recycling, or deletion operations). In the JAVA language, these program steps include, for example, or a "finalize()" method of some or all of an object, and any other code, instance or method associated with a "finalize()" method, as needed or The method, for example, evokes a different method by the subject of the "finalize()" method.
此分析或細查會在載入該應用程式碼50之前、或在該應用程式碼50載入程序期間發生,或甚至在該應用程式碼50載入程序之後發生。其可類似於一安裝、程式轉換、轉譯、或編譯程序,其中該應用程式可用額外的指令來實施,及/或另可由意義保留程式操縱所修正,即/或選擇性地由一輸入碼語言轉譯到一不同的碼語言(例如像是由原始碼或中介碼語言轉譯到機器語言),並瞭解到該術語編譯通常或習用上包含了碼或語言中的改變,例如由原始碼或物件碼,或由一種語言到另一種語言。但是,在本例中該術語「編譯」(及其文法上同等者)並沒有那麼多限制,且亦可在相同碼或語言內包括或含有修正。例如,該編譯及其同等者可瞭解為同時包含正常編譯(例如像是藉由例示而非限制,由原始碼到物件碼),且由原始碼編譯成原始碼,以及由物件碼編譯到物件碼,以及其中任何改變的組合。其亦可包括所謂的「中介語言」,其形式為「虛擬物件碼」。This analysis or scrutiny will occur before the application code 50 is loaded, or during the application code 50 loading process, or even after the application code 50 loads the program. It can be similar to an installation, program conversion, translation, or compilation program, where the application can be implemented with additional instructions, and/or can be modified by meaning retention program manipulation, ie, or alternatively by an input code language. Translating into a different code language (for example, translation from source code or mediation code language to machine language), and knowing that the term compilation usually or customally contains changes in the code or language, such as by source code or object code , or from one language to another. However, in this example the term "compilation" (and its grammatical equivalents) is not so limited and may include or contain amendments within the same code or language. For example, the compilation and its equivalents can be understood to include both normal compilation (eg, by way of illustration and not limitation, from source code to object code), and compiled from source code to source code, and compiled from object code to object. The code, and any combination of any of them. It may also include a so-called "intermediary language" in the form of "virtual object code".
藉由例示且並非限制,在一具體實施例中,該應用碼50之分析或細查可在載入該應用程式碼期間發生,例如藉由該作業系統由該硬碟或其它儲存裝置或來源讀取該應用碼,並將其複製到記憶體,並預備開始執行該應用程式碼。在另一具體實施例中,於JAVA虛擬機器中,該分析或細查可在該java.lang.ClassLoader loadClass方法(如java.lang ClassLoader.loadClass())之類別載入程序期間發生。By way of illustration and not limitation, in one embodiment, analysis or scrutiny of the application code 50 may occur during loading of the application code, such as by the operating system from the hard disk or other storage device or source. The application code is read, copied to memory, and ready to begin execution of the application code. In another embodiment, in a JAVA virtual machine, the analysis or scrutiny can occur during a class loader of the java.lang.ClassLoader loadClass method (eg, java.lang ClassLoader.loadClass()).
另外,該應用碼50之分析或細查可以甚至在該應用程式碼載入程序之後發生,例如在該作業系統已經載入該應用碼到記憶體之後,或選擇性地甚至在該應用程式碼之相關的對應部份已經開始或進行之後,例如像是在該JAVA虛擬機器已經載入該應用碼到該虛擬機器當中之後,其係透過"java.lang.ClassLoader.loadClass()"方法,且選擇性地進行執行。In addition, the analysis or scrutiny of the application code 50 can occur even after the application code loading program, for example, after the operating system has loaded the application code into the memory, or alternatively even in the application code. After the relevant part has been started or carried out, for example, after the JAVA virtual machine has loaded the application code into the virtual machine, it passes the "java.lang.ClassLoader.loadClass()" method, and Execute selectively.
因此,上述的分析或細查中,初始係尋找清除例式,且當找到或識別出來時,插入一修正碼,藉以呼叫一修正的清除例式。此修正的例式係被調整並撰寫來中止在任何特定機器上的該清除例式,除非要被刪除、清除、再造、回收、釋放、或另被最終化之類別或物件(或更一般而言是「資產」)被標示為被所有其它機器所刪除。有數種不同其它的模式,其中可以進行此修正及載入。Therefore, in the above analysis or scrutiny, the initial system looks for a clearing example, and when it is found or recognized, inserts a correction code to call a modified clearing example. This modified example is adapted and written to suspend the clearing modality on any particular machine, unless a category or object is to be deleted, removed, recreated, recycled, released, or otherwise finalized (or more generally The words "assets" are marked as being deleted by all other machines. There are several different modes in which this correction and loading can be done.
藉由例示且並非限制,在一具體實施例中,該應用碼50之分析或細查可在載入該應用程式碼期間發生,例如藉由該作業系統由該硬碟或其它儲存裝置或來源讀取該應用碼,並將其複製到記憶體,並預備開始執行該應用程式碼。在另一具體實施例中,於JAVA虛擬機器中,該分析或細查可在該java.lang.ClassLoader loadClass方法(如java.lang.ClassLoader.loadClass())之執行期間發生。By way of illustration and not limitation, in one embodiment, analysis or scrutiny of the application code 50 may occur during loading of the application code, such as by the operating system from the hard disk or other storage device or source. The application code is read, copied to memory, and ready to begin execution of the application code. In another embodiment, in a JAVA virtual machine, the analysis or scrutiny may occur during execution of the java.lang.ClassLoader loadClass method (eg, java.lang.ClassLoader.loadClass()).
另外,該應用碼50之分析或細查可以發生,即使在該應用碼載入程序之後,例如在該作業系統已經載入該應用碼到記憶體中,甚至開始執行,或在該java虛擬機器透過"java.lang.ClassLoader.loadClass()"方法已經載入該應用碼到該虛擬機器當中之後。換言之,在JAVA虛擬機器的例子中,在執行了"java.lang.ClassLoader.loadclass()"之後已經斷定。In addition, the analysis or scrutiny of the application code 50 can occur even after the application code is loaded into the program, for example, the operating system has loaded the application code into the memory, or even started execution, or in the java virtual machine. After the application code has been loaded into the virtual machine via the "java.lang.ClassLoader.loadClass()" method. In other words, in the example of the JAVA virtual machine, it has been determined after executing "java.lang.ClassLoader.loadclass()".
因此在一種模式中,在該載入機器上的DRT 71/1,在此例中為Java虛擬機器M1(JVM#1),要求所有其它機器M2,...,Mn之DRT's 71/2...71/n,如果類似的同等第一類別50X,如被使用、參照或被任何其它機器M2,...Mn所使用(即並未被標示為最終化)。如果此問題的答案為是(也就是說,一類似同等物件正由另一部或多部機器使用時,且並未被標示為可最終化,因此不會被刪除、清除、最終化、再造、回收或釋放),則正常的清除例式即被關閉、中止、暫停或另對於機器JVM#1上類似同等第一物件50X所除能。如果該答案為否,(也就是在每部機器上類似同等第一物件50X在所有其它機器上被標示為利用一類似同等物件50X可最終化),則該清除例式被操作(或重新開始或持續、或進行),且該第一物件50X與一類似同等物件50X被刪除在不僅是機器JVM#1上,但是在所有其它機器M2...Mn上。較佳地是,該清除例式之執行被配置給一部機器,例如該最後機器M1標示了該類似同等物件或類別為可最終化。該最終化例式之執行對應於由所有機器之決定之該複數個類似同等物件為可最終化,其對應於所有機器M1...Mn僅執行一次,且較佳地是僅由一部機器來代表所有的機器M1...Mn。對應於且較佳地是依循該最終化例式之執行,則所有機器可以刪除、再造、回收、釋放或另外清除由它們本地類似同等物件所使用的記憶體(及其它相對應系統資源)。So in one mode, the DRT 71/1 on the load machine, in this case the Java Virtual Machine M1 (JVM#1), requires all other machines M2,..., Mn DRT's 71/2. ..71/n, if similar equivalent first category 50X, if used, referenced or used by any other machine M2,...Mn (ie not marked as finalized). If the answer to this question is yes (that is, if a similar object is being used by another machine or multiple machines and is not marked as finalizable, it will not be deleted, cleared, finalized, recreated , Recycle or Release), the normal clearing case is turned off, aborted, paused, or otherwise disabled for the equivalent first object 50X on machine JVM #1. If the answer is no (ie, on each machine similar to the first object 50X is marked on all other machines to be finalized with a similar equivalent 50X), then the clearing instance is manipulated (or restarted) Or continuing, or proceeding, and the first item 50X and a similar equivalent item 50X are deleted not only on the machine JVM #1 but on all other machines M2...Mn. Preferably, the execution of the clearing routine is configured for a machine, for example, the last machine M1 indicates that the similar equivalent item or category is finalizable. The execution of the finalized embodiment corresponds to the plurality of similar equivalents determined by all machines being finalizable, which corresponds to all machines M1...Mn only once, and preferably only by one machine To represent all machines M1...Mn. Corresponding to, and preferably in accordance with, the execution of the finalized embodiment, all machines may delete, recreate, recycle, release or otherwise erase the memory (and other corresponding system resources) used by their local similar equivalents.
附錄C1,C2,C3及C4(亦在以下的表XVI,XVII,XVIII及XIX中部份重現)為範例性碼表列,其提供應用程式50之一最終化例式(附錄C1及表XVI)的該習用或未修正的電腦程式軟體碼(例如可用於單一機器或電腦環境中),及相同同步化例式的一後修正摘錄,例如可用於本發明之具有多重機器的具體實施例中(附錄C2及C3及表XVII及XVIII)。同時,被加入到該初始化例式之修正過的碼以粗體文字來強調。Appendix C1, C2, C3 and C4 (also partially reproduced in Tables XVI, XVII, XVIII and XIX below) are exemplary code list columns that provide a finalized example of one of the applications 50 (Appendix C1 and Table) XVI) The conventional or unmodified computer program software code (for example, which can be used in a single machine or computer environment), and a post-correction excerpt of the same synchronization example, such as a specific embodiment with multiple machines that can be used in the present invention Medium (Appendix C2 and C3 and Tables XVII and XVIII). At the same time, the modified code added to the initialization example is emphasized in bold text.
附錄C1為附錄C4之example.java應用之finalize()方法之解碼的編譯形式之修正前的摘錄。附錄C2為附錄C1之修正之後形式,其由附錄C7之FinalLoader.java利用第22圖之步驟所修正。附錄C3為附錄C1的另一個修正之後形式,其由附錄C7之FinalLoader.java根據第22圖之步驟所修正。該等修正以粗體強調。Appendix C1 is an excerpt from the pre-correction of the compiled form of the decoding of the finalize() method of the example.java application of Appendix C4. Appendix C2 is the revised form of Appendix C1, which is corrected by the procedure of Figure 22 using FinalLoader.java in Appendix C7. Appendix C3 is another post-correction form of Appendix C1, which is modified by the procedure of Figure 22 in Final Loader.java of Appendix C7. These corrections are highlighted in bold.
附錄C4為在修正之前/之後的摘錄C1-C3中所使用之example.java應用之原始碼的摘錄。此範例應用具有一單一最終化例式,該finalize()方法根據本發明由附錄C7之FinalLoader.java所修正。Appendix C4 is an excerpt of the source code of the example.java application used in the excerpts C1-C3 before/after the correction. This example application has a single finalization example that is modified according to the present invention by FinalLoader.java of Appendix C7.
其要注意到在該附錄中的編譯過的碼與在該表格中重複的部份採用的形式為檔案"example.java"之原始碼,其係包括在附錄C4中。在附錄C1及表XVI之程序中,步驟001之程序名稱"Method finalize()"為編譯過應用碼之"example.java"之最終化方法之顯示的解碼輸出的名稱。該方法名稱"finalize()"為根據該JAVA平台規格之一物件的最終化方法的名稱,並對此範例選擇來代表一JAVA最終方法之作業的一典型模式。整體而言該方法係負責配置系統資源或執行對應於決定出不具有對此物件之參照的JAVA虛擬機器之垃圾收集器的其它清除,且該"example.java"執行的碼係依序做說明。It should be noted that the compiled code in the appendix and the part in the form repeated in the table are in the form of the file "example.java", which is included in Appendix C4. In the procedures of Appendix C1 and Table XVI, the program name "Method finalize()" of step 001 is the name of the decoded output of the display of the finalization method of "example.java" compiled with the application code. The method name "finalize()" is the name of the finalization method of the object according to one of the JAVA platform specifications, and this example is selected to represent a typical mode of the operation of a JAVA final method. Overall, the method is responsible for configuring system resources or performing other cleanups corresponding to the garbage collector that determines the JAVA virtual machine that does not have a reference to the object, and the code executed by the "example.java" is described in order. .
首先(步驟002),該JAVA虛擬機器指令"getstatic #9<Field java.io.PrintScream out>"使得該JAVA虛擬機器取回儲存在含有此範例finalize()方法之應用程式的classfile結構的第二索引中由CONSTANT_Fieldref_info constant_pool項目所指出的該靜態欄位的物件參照,並造成對該欄位中java.io.PrintStream物件之參照被放置(推入)在該目前執行之執行緒的目前方法訊框的堆疊上。First (step 002), the JAVA virtual machine instruction "getstatic #9<Field java.io.PrintScream out>" causes the JAVA virtual machine to retrieve the second of the classfile structure stored in the application containing the sample finalize() method. The object reference of the static field indicated by the CONSTANT_Fieldref_info constant_pool item in the index, and causes the reference to the java.io.PrintStream object in the field to be placed (pushed) in the current method frame of the currently executing thread On the stack.
接著(步驟003),該JAVA虛擬機器指令"ldc #24<String"Deleted...">"使得該JAVA虛擬機器載入該字串值"Deleted"到該目前方法訊框之堆疊上,並造成該字串值"Deleted"載入到該目前方法訊框之堆疊的最上方。Next (step 003), the JAVA virtual machine instruction "ldc #24<String"Deleted...">" causes the JAVA virtual machine to load the string value "Deleted" onto the stack of the current method frame, and Causes the string value "Deleted" to be loaded to the top of the stack of the current method frame.
接著(步驟004),該JAVA虛擬機器指令"invokevirtual #16<Method void println(java.lang.String)>"使得該JAVA虛擬機器推出該最上方項目離開該目前方法訊框的堆疊,並引起該"println"方法,傳送推出的項目到該新方法訊框做為其第一引數,並使得該"println"方法被引發。Next (step 004), the JAVA virtual machine instruction "invokevirtual #16<Method void println(java.lang.String)>" causes the JAVA virtual machine to push out the stack of the top method frame leaving the current method frame and cause the The "println" method sends the launched item to the new method frame as its first argument and causes the "println" method to be fired.
最後,該JAVA虛擬機器指令"return"(步驟005)使得該JAVA虛擬機器藉由傳回控制到先前的方法訊框來停止執行此finalize()方法,其並造成此最終化方法之執行的終止。Finally, the JAVA virtual machine instruction "return" (step 005) causes the JAVA virtual machine to stop executing the finalize() method by returning control to the previous method frame, which causes the termination of execution of the finalization method. .
由於這些在第1圖及第2圖中習用組態之單一機器上所操作的這些步驟,該JAVA虛擬機器可用一致性、調和及協調的方式來追跡該物件把柄計數,並在執行含有該println作業的finalize()方法中能夠保證不會發生不想要的行為(例如不成熟或超數目最終化作業,例如超過一次地執行一單一'example.java'物件之finalize()方法),例如可由不一致及/或不調和最終化狀態或把柄計數所造成。如果這些步驟要在第5圖及第8圖之組態中複數部機器上進行,並具有第9,10,11,12及13圖之記憶體更新及傳遞複製手段,且同步在該複數部機器M1...Mn之每一部上執行該應用程式碼50,在每一部機器上每個同步執行之應用程式事件的最終化作業將在任何其它機器上,不需要任何其它事件之間的協調即可進行。給定了橫跨複數部機器之一致性、協調及調和的最終化作業之目標,此先前技術配置將無法執行橫跨該複數部機器之這種一致性、協調的最終化作業,因為每部機器僅在本地執行最終化,且不會嘗試協調它們的本地最終化作業與在任何其它一部或多部機器上的任何其它類似的最終化作業。因此這種配置將會由於未協調、不一致及/或不調和的最終化狀態或把柄計數及相關的最終化作業而受到不想要或其它異常的行為。因此本發明的目的在於克服先前技術配置之限制。Due to these steps being performed on a single machine of the conventional configuration in Figures 1 and 2, the JAVA virtual machine can track the object handle count in a consistent, harmonic, and coordinated manner, and execute the println containing the println The job's finalize() method guarantees that unwanted behavior will not occur (such as immature or excessive number of finalization jobs, such as performing a single 'example.java' object's finalize() method more than once), for example by inconsistency And/or not reconciling the finalized state or the handle count. If these steps are to be performed on a plurality of machines in the configuration of Figures 5 and 8, and have the memory update and transfer copying means of Figures 9, 10, 11, 12 and 13, and synchronized in the complex part The application code 50 is executed on each of the machines M1...Mn, and the finalization of each synchronized application event on each machine will be on any other machine, without any other events. Coordination can be done. Given the goal of finalization of consistency, coordination, and reconciliation across multiple machines, this prior art configuration will not be able to perform this consistent, coordinated finalization of operations across the complex machine, as each The machine performs finalization only locally and does not attempt to coordinate their local finalization jobs with any other similar finalization jobs on any other machine or machines. This configuration will therefore be subject to unwanted or other anomalous behavior due to uncoordinated, inconsistent and/or non-harmonized finalized states or handle counts and associated finalization operations. It is therefore an object of the present invention to overcome the limitations of prior art configurations.
在表XVIII(附錄C3)之範例碼中,該碼已經被修正,所以其解決了在表XVI(附錄C1)之碼範例中無法解決的複數部機器M1...Mn之一致性、協調的最終化作業的問題。在此修正的finalize()方法碼中,一"aload_0"指令被插入在該"getstatic #9"指令之前,藉以為該finalize()方法之第一指令。此使得該JAVA虛擬機器載入該項目在該目前方法訊框的索引0處的本地變數陣列中,並儲存此項目在該目前方法訊框的堆疊上方,並使得在索引0處之「此」物件的物件參照中的物件被推入到該堆疊上。In the sample code of Table XVIII (Appendix C3), the code has been corrected, so it solves the consistency and coordination of the complex machines M1...Mn that cannot be solved in the code example of Table XVI (Appendix C1). The problem of finalizing the job. In the corrected finalize() method code, an "aload_0" instruction is inserted before the "getstatic #9" instruction, and is the first instruction of the finalize() method. This causes the JAVA virtual machine to load the project into the local variable array at index 0 of the current method frame and store the item above the stack of the current method frame and make the "this" at index 0 The object in the object reference of the object is pushed onto the stack.
再者,該JAVA虛擬機器指令"invokestatic #3<Method boolean isLastReference(java.lang.Object)>"被插入在該"0 aload_0"指令之後,所以該JAVA虛擬機器推出該最上方項目離開該目前方法訊框的堆疊(其根據先前"aload_0"指令為參照到此finalize()方法所屬的該物件),並引發該"isLastReference"方法,傳送該推出的項目到該新方法訊框做為其第一引數,並在由此"invokestatic"指令傳回一布林值到該堆疊上。此改變很明顯,因為其修正該finalize()方法來執行該"isLastReference"方法及相關的作業,對應於該finalize()方法之執行的開始,並傳回一布林引數(代表是否對應用此finalize()方法之類別在該複數部機器M1...Mn中每一部機器上類似同等物件之間的最後剩下的參照)到該finalize()方法之執行方法訊框的堆疊上。Furthermore, the JAVA virtual machine instruction "invokestatic #3<Method boolean isLastReference(java.lang.Object)>" is inserted after the "0 aload_0" instruction, so the JAVA virtual machine launches the topmost item leaving the current method. The stack of frames (which refers to the object to which the finalize() method belongs according to the previous "aload_0" instruction), and raises the "isLastReference" method, transmitting the launched item to the new method frame as its first The argument, and returns a Boolean value to the stack in this "invokestatic" instruction. This change is obvious because it corrects the finalize() method to execute the "isLastReference" method and related jobs, corresponding to the start of execution of the finalize() method, and returns a Boolean argument (representing whether to apply The category of the finalize() method is on the stack of execution method frames of the finalize() method on each machine of the plurality of machines M1...Mn, similar to the last remaining reference between the equivalent objects.
接著,兩個JAVA虛擬機器指令"ifne 8"及"return"被插入到該"1 invokestatic #3"指令之後及該"getstatic #9"指令之前的該碼串流中。這兩個指令的第一個為"ifne 8"指令,其使得該JAVA虛擬機器推出最上方項目離開該堆疊,並執行該推出的數值與零之間的比較。如果該執行的比較成功(即如果且僅如果該推出的數值不等於零時),則執行繼續到"8 getstaticw #9"指令。但是如果該執行的比較失敗(即如果且僅如果該推出的數值不等於零),則執行繼續到該碼串流中的下一個指令,其為該"7 return"指令。此改變特別明顯,因為其修正該finalize()方法來在當該"isLastReference"方法之傳回值為正值(即"true")時即繼續執行該finalize()方法(即指令8-16),或是當該"isAlreadyLoaded"方法為負值(即"false")時即中斷該finalize()方法之執行(即該"7 return"指令造成傳回控制給此finalize()方法之引起者)。Next, two JAVA virtual machine instructions "ifne 8" and "return" are inserted into the code stream after the "1 invoke static #3" instruction and before the "getstatic #9" instruction. The first of these two instructions is the "ifne 8" instruction, which causes the JAVA virtual machine to push the topmost item out of the stack and perform a comparison between the pushed value and zero. If the comparison of the execution is successful (ie if and only if the pushed value is not equal to zero), then execution continues to the "8 getstaticw #9" instruction. But if the comparison of the execution fails (i.e. if and only if the pushed value is not equal to zero), execution proceeds to the next instruction in the code stream, which is the "7 return" instruction. This change is particularly noticeable because it corrects the finalize() method to continue executing the finalize() method (ie, instructions 8-16) when the return value of the "isLastReference" method is positive (ie, "true"). Or when the "isAlreadyLoaded" method is negative (ie "false"), the execution of the finalize() method is interrupted (ie the "7 return" instruction causes the return control to be caused by the finalize() method) .
該方法void isLastReference(java.lang.Object),附錄C5之FinalClient碼之部份,及分散式執行時間系統(DRT)71之部份,其執行機器M1...Mn之間的通信作業,以協調該等機器M1...Mn之間的finalize()方法之執行。此範例的isLastReference方法傳送在第15圖之一機器X上執行之附錄C6的InitServer碼,藉由傳送一「清除狀態要求」到對應於正被「最終化」的該物件之機器X(即此finalize()方法所屬的該類別)。請參考第25圖及附錄C6,機器X接收對應於該finalize()方法所屬的物件之「清除狀態要求」,並造成清除計數或最終化狀態之一表格來決定該要求所對應之該物件的清除計數或最終化狀態。The method void isLastReference (java.lang.Object), part of the Final Client code of Appendix C5, and part of the Decentralized Execution Time System (DRT) 71, which performs communication operations between the machines M1...Mn, Coordinate the execution of the finalize() method between the machines M1...Mn. The isLastReference method of this example transmits the InitServer code of Appendix C6 executed on machine X of Figure 15, by transmitting a "clear status request" to the machine X corresponding to the object being "finalized" (ie, this The category to which the finalize() method belongs). Referring to Figure 25 and Appendix C6, Machine X receives the "Clear Status Requirement" corresponding to the object to which the finalize() method belongs, and causes a table to clear the count or finalize state to determine the object corresponding to the request. Clear the count or finalize the status.
如果在對應於該清除狀態要求之該等複數部機器M1...Mn中每一部上的該複數部類似同等物件被標示為除了該要求機器(即n-1機器)之外所有其它機器上的清除,則機器X將傳送一回應來代表該複數個類似同等物件被標示為在所有其它機器上為清除,並視需要更新對應於該指定的類似同等物件之一記錄登錄項來代表該類似同等物件為現在被清除。另外,如果對應於該清除狀態要求之該複數個類似同等物件並未對除了該要求機器(即小於n-1機器)之所有其它機器上為清除,則機器X將傳送一回應來代表該複數部類似同等物件並未標示為在所有其它機器上為清除,並增加對應於該指定的物件之"標示為清除計數器"記錄(或其它類似的最終化記錄手段),以記錄該要求機器已經標示了該等複數個類似同等物件要被清除中的一部。對應於決定出此清除狀態要求所相關的該複數部類似同等物件,即標示為除了該要求機器之外所有其它機器為清除,即產生一回覆,並傳送到該要求機器來代表該複數個類似同等物件被標示為除了該要求機器之外所有其它機器上為清除。此外及視需要地,機器X可更新對應於該清除狀態要求所相關的該物件之該登錄項來代表該複數個類似同等物件為現在「被清除」。在自機器X接收到這種訊息之後,代表該複數個類似同等物件被標示為在所有機器上為清除,該isLastReference()方法及作業即終止執行,並傳回一'true'數值到先前的方法訊框,其為該finalize()方法之執行方法訊框。另外,在自機器X接收到一訊息之後,代表該複數個類似同等物件並未被標示為在所有其它機器上為清除,該isLastReference()方法及作業即終止執行,並傳回一'false'數值到先前的方法訊框,其為該finalize()方法之執行方法訊框。在此傳回作業之後,該finalize()方法訊框之執行然後重新開始,如在步驟中附錄C3之碼序列中所指出。If the plural equivalent similar item on each of the plurality of machines M1...Mn corresponding to the purge state requirement is marked as all but the required machine (i.e., n-1 machine) On the clear, machine X will send a response to indicate that the plurality of similar objects are marked as cleared on all other machines, and update the record entry corresponding to one of the specified equivalent objects as needed to represent the Similar equivalents are now cleared. In addition, if the plurality of similar objects corresponding to the purge status requirement are not cleared on all other machines except the required machine (ie, less than the n-1 machine), machine X will transmit a response to represent the plural. A similar equivalent is not marked as clear on all other machines, and a "marked as clear counter" record (or other similar finalized recording means) corresponding to the specified item is added to record that the requested machine has been marked One of these multiple equivalent objects to be cleared. Corresponding to the equivalent object corresponding to the determination of the clearing state requirement, that is, all the machines except the required machine are cleared, that is, a reply is generated, and transmitted to the requesting machine to represent the plurality of similar Equivalent items are marked as cleared on all other machines except the required machine. Additionally and optionally, machine X may update the entry corresponding to the item associated with the purge status request to represent that the plurality of similar items are now "cleared". After receiving such a message from machine X, the plural equivalent object is marked as cleared on all machines, the isLastReference() method and the job are terminated, and a 'true' value is returned to the previous Method frame, which is the execution method frame of the finalize() method. In addition, after receiving a message from machine X, it means that the plurality of similar objects are not marked as cleared on all other machines, the isLastReference() method and the job are terminated, and a 'false' is returned. The value is passed to the previous method frame, which is the execution method frame of the finalize() method. After returning the job here, the implementation of the finalize() method frame is then restarted, as indicated in the code sequence in Appendix C3 of the step.
其將可瞭解到該修正的碼在具有複數部電腦或運算機器之一分散式運算環境中允許最終化例式或其它清除作業之協調的作業,所以關於在該複數部機器M1...Mn上未修正的碼或程序之作業的問題(例如像是錯誤、不成熟、多重最終化、或重新最終作業)在當應用該修正的碼或程序時並不會發生。It will be appreciated that the modified code allows for the finalization of the coordination of the routine or other cleaning operations in a distributed computing environment having a plurality of computer or computing machines, so that the machine M1...Mn in the complex part Problems with the work of an uncorrected code or program (such as, for example, an error, immature, multiple finalization, or re-finalization) do not occur when the modified code or program is applied.
其可觀察到附錄C2及表XVII中的碼為另一種選擇,但比附錄C3中的碼為較差的形式。基本上其功能上同等於附錄C3中的碼及方法。It can be observed that the codes in Appendix C2 and Table XVII are another option, but are inferior to the code in Appendix C3. Basically it is functionally equivalent to the codes and methods in Appendix C3.
由第15圖可看出,對於第8圖之一般性配置之修正提供了機器M1,M2...Mn皆如同以前,並在所有機器M1,M2...Mn上同時或同步地執行相同的應用碼50(或許多碼)。但是,先前的配置由一伺服器機器X的供應所修正,其方便地能夠供應管家函數,例如且特別是結構、資產及資源之清除。這種伺服器機器X可為一低價值商用電腦,例如PC,因為其運算負擔較低。如第15圖中虛線所示,兩部伺服器機器X及X+1可以為了冗餘的目的來提供,以增加該系統之整體可靠度。當提供這兩種伺服器機器X及X+1時,它們較佳地是操作成一不會失效環境中的冗餘機器。As can be seen from Fig. 15, the modification of the general configuration of Fig. 8 provides that the machines M1, M2...Mn are as before, and perform the same simultaneously or synchronously on all machines M1, M2...Mn The application code is 50 (or many codes). However, the previous configuration was modified by the provision of a server machine X, which was convenient to be able to supply housekeeper functions, such as, in particular, the removal of structures, assets and resources. This server machine X can be a low value commercial computer, such as a PC, because of its low computational load. As indicated by the dashed lines in Figure 15, the two server machines X and X+1 can be provided for redundancy purposes to increase the overall reliability of the system. When both server machines X and X+1 are provided, they are preferably operated as redundant machines in a non-failed environment.
其不需要提供一伺服器機器X,因為其運算負擔可以分散到機器M1,M2...Mn上。另外,由一部機器所操作的一資料庫(在一主控者/受控者種類作業中)可以用於管家功能。It does not need to provide a server machine X because its computational load can be spread over the machines M1, M2...Mn. In addition, a database operated by a machine (in a master/controlled class job) can be used for housekeeping functions.
第16圖所示為要遵循的一較佳泛用程序。在進行載入161之後,要執行的該等指令被視為在序列中,且所有清除例式被偵測成如步驟162中所示。在該JAVA語言中,這些為該等最終化例式或最終化方法(如finalize())。其它語言使用不同的術語。Figure 16 shows a preferred general procedure to follow. After the load 161 is performed, the instructions to be executed are considered to be in the sequence, and all of the clearing instances are detected as shown in step 162. In the JAVA language, these are the finalization or finalization methods (such as finalize()). Other languages use different terms.
當偵測到一清除例式時,其在步驟163中修正,藉以在橫跨該複數部機器M1,M2...Mn之間執行一致性、協調及調和的清除或最終化,其基本上藉由插入另外的指令到該清除例式中,用以例如決定如果含有此最終化例式之物件(或類別或其它資產)被標示為橫跨所有其它機器上所有類似同等本地物件可最終化,且如果是的話,即藉由重新開始執行該最終化例式來執行最終化,或如果不是的話,則中止該最終化例式之執行,或延遲或暫停該最終化例式之執行,直到所有其它機器已經標示了它們類似同等本地物件為可最終化。另外,該等修正的指令可被插入在該例式之前。一旦該修正已經完成,該載入程序由載入該修正的應用碼來取代該未修正的應用碼以繼續,如步驟164中所示。同時,該最終化例式僅要執行一次,且較佳地是僅由一部機器來代表所有機器M1...Mn,其對應於由所有機器M1...Mn來決定該特定物件為可最終化。When a clearing pattern is detected, it is modified in step 163 to perform a clearing or finalization of consistency, coordination, and reconciliation between the plurality of machines M1, M2...Mn, which is substantially By inserting additional instructions into the cleanup routine, for example, to determine if an object (or class or other asset) containing this finalized formula is marked as being able to be finalized across all similar native objects on all other machines. And if so, the finalization is performed by restarting execution of the finalization example, or if not, suspending execution of the finalization instance, or delaying or suspending execution of the finalization instance until All other machines have been marked as being equivalent to equivalent local objects for finalization. Additionally, the modified instructions can be inserted before the example. Once the correction has been completed, the loader continues by replacing the uncorrected application code with the modified application code, as shown in step 164. At the same time, the finalization example is only to be executed once, and preferably all machines M1...Mn are represented by only one machine, which corresponds to the determination of the specific object by all the machines M1...Mn. Finalized.
第17圖所示為一修正的特定形式。首先,該等結構、資產或資源(在JAVA術語中的類別或物件)50A,50X...50Y,其為被清除的可能候選者,其被配置一名稱或標籤(例如一通用名稱或標籤),或已經被配置一通用名稱或標籤,其可被用來識別相對應的類似同等本地結構、資產或資源(例如JAVA中的類別及物件)共同在每部機器M1,M2...Mn上,如步驟172所示。此較佳地是當該等類別或物件原始被初始化時即發生。此最為方便地是透過由伺服器機器X所維護的一表格來完成。此表格亦包括該類別或物件(或其它資產)的「清除狀態」。其將可瞭解到此表格或其它資料結構僅可儲存該清除狀態,或其亦可儲存其它狀態或資訊。在一具體實施例中,此表格亦包括一計數器,其儲存了識別出已經標示要刪除的此特殊物件、類別或其它資產的機器數目(並視需要有該等機器之識別,雖然其並不需要)。在一具體實施例中,該計數值會增加,直到該計數值等於機器的數目。因此,整個機器資產刪除計數值小於(n-1)時,其中n為Mn中機器的總數,其代表了該物件、類別或其它資產做為一網路(或機器群集)整體之「不要清除」狀態,因為小於n-1之機器資產刪除計數代表一或多部機器尚未標示它們類似的同等本地物件(或類別或其它資產)成為最終化,且該物件不能被清除,因勿會造成不想要或其它異常的行為。不同的敘述中,且藉由範例(但非限制),如果有六部機器且該資產刪除計數小於五,則其代表並非所有其它機器已經嘗試來最終化此物件(即並未標示此物件為可最終化),且因此該物件不能被最終化。但是如果該資產刪除計數為五,則其代表僅有一部機器尚未嘗試最終化此物件(即標示此物件為可最終化),因此該最後尚未標示該物件為可最終化之機器必須為嘗試來最終化該物件的目前機器(即標示該物件為可最終化,且因此造成該最終化表格做為在所有其它機器上此物件的最終化狀態)。在六部機器之組態中,該n-1=5之計數值代表五部機器必須先前已經標示該物件為刪除,且要標示此物件為刪除的第六部機器為實際上執行該完整最終化例式之機器。Figure 17 shows a specific form of correction. First, the structures, assets or resources (categories or objects in JAVA terminology) 50A, 50X...50Y, which are potential candidates that are cleared, are configured with a name or label (eg a generic name or label) ), or have been configured with a generic name or label that can be used to identify corresponding similar local structures, assets or resources (eg categories and objects in JAVA) common to each machine M1, M2...Mn Above, as shown in step 172. This preferably occurs when the categories or objects are originally initialized. This is most conveniently accomplished by a form maintained by the server machine X. This form also includes the "Clear Status" for that category or item (or other asset). It will be appreciated that this form or other data structure may only store the clear status, or it may store other status or information. In a specific embodiment, the form also includes a counter that stores the number of machines that identify the particular item, category, or other asset that has been identified for deletion (and, if desired, the identification of the machines, although it is not need). In a specific embodiment, the count value is increased until the count value is equal to the number of machines. Therefore, when the entire machine asset deletion count value is less than (n-1), where n is the total number of machines in Mn, which represents the object, category, or other asset as a network (or machine cluster) as a whole. State, because the machine asset deletion count less than n-1 represents that one or more machines have not been marked with similar equivalent local objects (or categories or other assets) to be finalized, and the object cannot be cleared because it does not cause To be or other unusual behavior. In different narratives, and by way of example (but not by way of limitation), if there are six machines and the asset deletion count is less than five, it represents that not all other machines have attempted to finalize the object (ie, the object is not marked as being Finalized), and therefore the object cannot be finalized. However, if the asset deletion count is five, it means that only one machine has not yet attempted to finalize the object (ie, the object is marked as finalizable), so the machine that has not yet marked the object as finalizable must be an attempt. The current machine that finalizes the item (ie, indicates that the item is finalizable, and thus causes the finalized form to be the finalized state of the item on all other machines). In the configuration of the six machines, the count value of n-1=5 represents that the five machines must have previously marked the object as deleted, and the sixth machine to mark the object as deleted is actually performing the complete finalization. Example machine.
如在第17圖中所示,如果該通用名稱或識別項在所有其它機器上(即除了提出要進行該清除或刪除例式之外的所有機器)並未標示為清除或刪除或其它最終化,則此代表該物件或類別(或其它資產)所提出的清除或最終化例式必須在其初始化之前被中止、停止、暫緩、暫停、延遲、或取消,或如果已經初始化,則到其完成時,如果其已經開始執行,因為該物件或類別仍為一或多部機器M1,M2...Mn所需要,如步驟175所示。As shown in Figure 17, if the generic name or identification is on all other machines (ie, all machines except the one that is to be cleared or deleted) is not marked as cleared or deleted or otherwise finalized. , then the purge or finalization stipulated by the object or category (or other asset) must be aborted, stopped, suspended, suspended, delayed, or cancelled before its initialization, or if it has been initialized, it is completed. If it has already begun execution, since the object or category is still required by one or more machines M1, M2...Mn, as shown in step 175.
在一具體實施例中,該清除或最終化例式被停止初始化或開始執行;但是,在一些實施中,其很難或實際上不可能來停止該清除或最終化例式做初始化或開始執行。因此,在另一具體實施例中,已經開始之最終化例式的執行被中止,使得其不會完成或並無法以其正常的方式完成。此另外的中止可被瞭解為包括一實際中斷、或一暫緩、或一延遲、或暫停一已經開始執行之最終化例式之執行(不論在完成之前的執行階段),因此要保證該最終化例式並未得到機會來執行,以完成該物件(或類別或其它資產)之清除,且因此該物件(或類別或其它資產)維持「未清除」(即「並未最終化」或「未刪除」)。In a specific embodiment, the cleanup or finalization instance is either initialized or begins to execute; however, in some implementations it is difficult or practically impossible to stop the cleanup or finalize the initialization or start execution. . Thus, in another embodiment, the execution of the finalized example that has begun is aborted such that it does not complete or does not complete in its normal manner. This additional suspension can be understood to include an actual interruption, or a suspension, or a delay, or a suspension of the execution of the finalization of the execution (regardless of the execution phase prior to completion), thus ensuring the finalization The example does not have an opportunity to execute to complete the removal of the item (or category or other asset), and therefore the item (or category or other asset) remains "not cleared" (ie "not finalized" or "not delete").
但是或另外,如果在在該複數部機器M1,M2...Mn上每一部的複數個類似同等本地物件之通用名稱或其它唯一編號或識別項被標示為在所有其它機器上為刪除,此代表沒有其它機器需要對應於該通用名稱或其它唯一編號或識別項之類別或物件(或其它資產)。由於清除例式及作業,或視需要的慣用或習用正常清除例式及作業,在步驟176中所指明者即可並必須被執行。But or in addition, if a common name or other unique number or identification of a plurality of similarly equivalent local items in each of the plurality of machines M1, M2...Mn is marked as deleted on all other machines, This means that no other machine needs a category or object (or other asset) that corresponds to the generic name or other unique number or identification. The conditions specified in step 176 may and must be performed as a result of clearing routines and operations, or routinely clearing routines and operations as needed.
第18圖所示為提出要執行一清除例式的機器(M1,M2...Mn之一)對於該伺服器機器X所做的查詢。此提出機器之作業被暫時中斷,如步驟181及182中所示,並對應於第17圖之步驟173。在步驟181中,該提出機器傳送一查詢訊息到機器X,以要求該物件(或類別或其它資產)的清除或最終化狀態要被清除。接下來,該提出機器等待來自對應於在步驟181中該提出機器所傳送之查詢訊息之機器X的一答覆,如步驟182所示。Figure 18 shows a query made by the machine (M1, M2...Mn) for performing a clearing example for the server machine X. The job of the proposed machine is temporarily interrupted, as shown in steps 181 and 182, and corresponds to step 173 of FIG. In step 181, the proposing machine transmits a query message to machine X to request that the purge or finalization state of the object (or category or other asset) be cleared. Next, the requesting machine waits for a reply from machine X corresponding to the query message transmitted by the requesting machine in step 181, as shown in step 182.
第25圖所示為回應於第18圖之步驟181之這種最終化或清除狀態查詢而由機器X所進行的活動。該最終或清除狀態之決定如步驟192所示,其可決定如果對應於通用名稱之清除狀態要求的物件(或類別或其它資產),即在步驟191(191A)中所接收者,即標示為除了啟始步驟191之清除狀態要求的查詢機器181之外的所有其它機器皆為刪除。在本文件中所使用的單一術語物件或類別(或在步驟191(192A)或其它圖面中所使用的資產或資源的同等術語)皆可瞭解為包含對應於在該複數部機器M1,M2,...Mn中每一部上相同通用名稱的所有類似同等物件(或類別、或資產或資源)。如果該步驟193(193A)之決定為判定該通用命名的資源並未標示("No")為在(n-1)機器上為刪除(即在別處使用),則傳送對於該效應的回應到該查詢機器194(194A),但該「標示為刪除」之計數器則會增加1,如步驟197(197A)中所示。類似地,如果對此決定之答案被標示為("Yes"),其代表該通用命名的資源即對除了該等待查詢機器182之外的所有其它機器為刪除,則傳送一對應回覆到該等待查詢機器182,其係來自啟始步驟191之清除狀態要求者,如步驟195(195A)所示。然後該等待查詢機器182即能夠依此回應,例如像是藉由:(i)中止(或暫停、或延遲)最終化例式之執行,當來自步驟182之機器X的回覆代表對應於提出要在步驟172中被最終化的該物件之通用名稱之複數部機器M1,M2,...Mn上該等類似同等本地物件仍可在別處使用(即除了提出要進行最終化的機器之外的所有其它機器上並未標示為刪除);或(ii)藉由繼續(或重新開始、或開始)執行該最終化例式,當來自步驟182之機器X的回覆指出代表對應於提出要在步驟172中被最終化的該物件之通用名稱之複數部機器M1,M2,...Mn上該等類似同等本地物件並未在別處使用(即對於除了提出進行最終化的機器之外的所有其它機器標示為刪除)。如第25圖中虛線所示,較佳地是除了步驟195中所示之"yes"回應之外,在機器X上所儲存或維持的該共用表格或清除的狀態即被更新,所以該通用命名的資產之狀態即被改變為「清除」,如步驟196所示。Figure 25 shows the activity performed by machine X in response to such a finalization or clear status query of step 181 of Figure 18. The final or clear state decision is as shown in step 192, which may determine if the object (or category or other asset) corresponding to the purge status requirement of the generic name, ie, the recipient in step 191 (191A), is marked as All other machines except the query machine 181 required to initiate the clear state of step 191 are deleted. The single term object or category (or equivalent of the asset or resource used in step 191 (192A) or other drawings) used in this document can be understood to include the corresponding machine M1, M2 in the complex machine. , ... all similar equivalents (or categories, or assets or resources) of the same generic name on each of Mn. If the decision of step 193 (193A) is to determine that the universally named resource is not marked ("No") as being deleted on the (n-1) machine (ie, used elsewhere), then the response to the effect is transmitted to The query machine 194 (194A), but the "marked as delete" counter is incremented by one, as shown in step 197 (197A). Similarly, if the answer to this decision is marked as ("Yes"), which represents the universally named resource, ie, deletes all other machines except the waiting query machine 182, a corresponding reply is sent to the wait. The machine 182 is queried from the clear state requester of the start step 191 as shown in step 195 (195A). The wait query machine 182 can then respond accordingly, such as by (i) aborting (or pausing, or delaying) the finalization of the instance, when the reply representative from machine X of step 182 corresponds to the proposed The similarly equivalent local objects on the plurality of machines M1, M2, ... Mn of the generic name of the object that was finalized in step 172 can still be used elsewhere (ie, except for the machine that is to be finalized) All other machines are not marked as deleted; or (ii) by continuing (or restarting, or starting) the finalization example, when the reply from machine X of step 182 indicates that the representative corresponds to the proposed step The equivalent local objects on the plurality of machines M1, M2, ... Mn of the general name of the object that was finalized in 172 are not used elsewhere (i.e., for all but the machine proposed for finalization) The machine is marked as deleted). As indicated by the dashed line in Fig. 25, it is preferable that the state of the shared form or the clearing stored or maintained on the machine X is updated in addition to the "yes" response shown in step 195, so the general purpose The state of the named asset is changed to "Clear", as shown in step 196.
請參考所附的附錄C,其中:附錄C1為來自一未修正最終化例式的一典型碼段落,附錄C2為關於一修正的最終化例式之同等者,而附錄C3為關於一修正的最終化例式之另一同等者。Please refer to Appendix C attached, where: Appendix C1 is a typical code paragraph from an uncorrected finalization example, Appendix C2 is the equivalent of a finalized version of a revision, and Appendix C3 is for a correction. The other equivalent of the finalized formula.
附錄C1及C2/C3在表XVI及XVII/XVIII中重覆者分別為一最終化例式之先前(預修正或未修正碼)及之後(或後修正或修正的碼)摘錄。加入到該方法之修正過的碼以粗體文字來強調。在附錄C1之原始碼範例中,在此物件的最終化(即刪除)的事件中該最終化方法印出"Deleted..."到該電腦操縱台。因此,若沒有管理在一分散式環境中的物件最終化,每部機器將重新最終化相同的物件,因此對於一單一通用命名的調和複數個類似同等物件會執行不止一次的最終化方法。清楚地是此並非一單一應用程式碼例證的程式師或使用者所預期要發生的。Appendices C1 and C2/C3 in Tables XVI and XVII/XVIII are respectively excerpted from the previous (pre-corrected or uncorrected) and subsequent (or later corrected or corrected) extracts of a finalized version. The corrected code added to the method is highlighted in bold text. In the source code example of Appendix C1, the finalization method prints "Deleted..." to the computer console in the event of finalization (ie, deletion) of the object. Thus, without the finalization of objects managed in a decentralized environment, each machine will re-finalize the same object, so a single universally named reconciliation of multiple equivalent objects will perform more than one finalization method. It is clear that this is not what a programmer or user of a single application code is expected to happen.
所以,藉由DRT的好處,該應用碼50被修正成其由改變該清除、刪除、或最終化例式或方法來載入到該機器中。其將可瞭解到該術語最終化基本上係用於存在於此說明之立案日期時相對於該JAVA虛擬機器規格的JAVA語言之內文中。因此,最終化以更為一般性的瞭解即代表物件及/或類別清除或刪除或再造或回收或任何同等形式的物件、類別、資產或資源清除。該術語最終化因此必須用於此廣義的表示,除非另有限制。所做的改變(以粗體強調)為該最終化方法所執行的該等初始指令。這些加入的指令檢查是否此特定物件為要被標示為可最終化的該複數部機器M1,M2...Mn上該複數個類似同等物件之最後剩下的物件,藉由呼叫一例式來決定要被最終化之物件的清除狀態,例如"isLastReference()"程序或DRT 71方法,其執行了第17圖之步驟172-176,其中尋求對於該特定物件之清除狀態的決定,且其決定了對應於是否在正在執行該決定程序之此特定機器上的特定物件的一真結果或一假結果為該等複數部機器M1,M2...Mn之最後一部,其每個具有一類似同等網點物件之一來要求最終化。回想一網點物件代表了在該等機器中不同者之上一類似同等物件,所以例如在具有八部機器的組態中,將會有八個網點物件(即在八部機器中每一部上有八個類似同等物件)。Therefore, with the benefit of DRT, the application code 50 is modified to be loaded into the machine by changing the clear, delete, or finalized instance or method. It will be appreciated that the terminating of the term is basically used in the context of the JAVA language relative to the JAVA virtual machine specification when it is dated on the filing date of this description. Therefore, finalization is a more general understanding of the removal or deletion or re-creation or recycling of objects and/or categories or the removal of any equivalent form of object, category, asset or resource. The terminology is finalized and must therefore be used in this broad sense unless otherwise limited. The changes made (in bold) are the initial instructions executed by the finalization method. These added instructions check whether the particular object is the last remaining object of the plurality of equivalent objects on the plurality of machines M1, M2...Mn to be finalized, by calling a case. The cleared state of the object to be finalized, such as the "isLastReference()" program or the DRT 71 method, which performs steps 172-176 of Figure 17, in which a decision is made regarding the clear state of the particular object, and which determines A true result or a false result corresponding to a particular object on the particular machine that is executing the decision procedure is the last of the plurality of machine M1, M2...Mn, each having a similar One of the outlet objects is required to finalize. Recall that a mesh object represents a similar object on a different one of the machines, so for example in a configuration with eight machines, there will be eight dot objects (ie on each of the eight machines) There are eight similar equivalents).
DRT 71之最終化決定程序或方法"isLastReference()"可視需要採用一引數,其可代表此物件的一唯一識別項(參見附錄C3及表XVIII)。例如,正被考慮最終化之物件的名稱,被質疑要最終化之物件的一參照,或是代表橫跨所有機器(或節點)之此物件要被用於決定此物件或類別或其它資產的最終化狀態的一唯一編號或識別。依此方式,該DRT可以同時支援多個物件(或類別或資產)之最終化,而不會混淆,因為該多重物件已經或尚未最終化者,已使用每個物件之唯一識別項來考慮在稍早參閱的最終化表格中的正確記錄。The finalization decision procedure or method of the DRT 71 "isLastReference()" may optionally employ an argument that represents a unique identifier for the object (see Appendix C3 and Table XVIII). For example, the name of the object being considered for finalization, a reference to the object being questioned, or the object that spans all machines (or nodes) to be used to determine the object or category or other asset. A unique number or identification of the finalized state. In this way, the DRT can simultaneously support the finalization of multiple objects (or categories or assets) without confusion, since the multiple objects have been or have not been finalized, and have been considered using the unique identification of each object. See the correct record in the finalized form earlier.
該DRT 71可有數種可能的方法來決定該物件之最終化狀態。較佳地是,它(該要求機器)可以依序要求每個其它要求的機器(例如藉由使用一電腦通信網路來在該要求機器及該被要求機器之間交換查詢及回應訊息),如果它們的要求機器之類似同等物件已經被標示為最終化,且如果任何要求的機器回覆為假,即代表它們的類似同等物件並未被標示為最終化,則傳回一假結果,其由該isLastReference()方法傳回,代表該本地物件不需要被最終化,否則即傳回一真結果,由該isLastReference()方法傳回,代表該本地物件必須被最終化。當然對於真或假結果之不同邏輯方案另可用相同的效果來實施。另外,在該本地機器上之DRT 71可考慮一共享的記錄表(可能在一獨立機器(如機器X),或在每部本地機器上一調和共享的記錄表,及被更新來維持實質上相同,或在一資料庫中),以決定是否在該複數個物件中每一個已經被標示為除了該目前要求機器之外的所有要求的機器皆為最終化。The DRT 71 can have several possible methods to determine the finalized state of the object. Preferably, it (the requesting machine) can sequentially request each of the other required machines (for example, by using a computer communication network to exchange query and response messages between the requesting machine and the requested machine), If their equivalent equivalents of the machine have been marked as finalized, and if any required machine response is false, ie, similar equivalents representing them are not marked as finalized, a false result is returned, which The isLastReference() method returns, indicating that the local object does not need to be finalized, otherwise a true result is returned, which is returned by the isLastReference() method, indicating that the local object must be finalized. Of course, different logic schemes for true or false results can be implemented with the same effect. In addition, the DRT 71 on the local machine may consider a shared record table (possibly on a separate machine (such as Machine X), or a shared and shared record table on each local machine, and updated to maintain substantial The same, or in a database, to determine whether each of the plurality of objects has been marked as being finalized except for all required machines other than the currently required machine.
如果該DRT 71之"isLastReference()"方法傳回真,則此代表此物件已經對在該虛擬或分散式運算環境中所有其它機器(即該複數部機器M1...Mn)為最終化,因此,該最終化方法之執行係要進行成考慮到在該複數部機器M1,M2...Mn上最後剩下的類似同等物件要被標示或宣告為可最終化。If the "isLastReference()" method of the DRT 71 returns true, then this means that the object has been finalized for all other machines (ie, the plurality of machines M1...Mn) in the virtual or decentralized computing environment. Therefore, the execution of the finalization method is carried out in consideration of the fact that the last equivalent equivalent items on the plurality of machines M1, M2...Mn are to be marked or declared finalizable.
另一方面,如果該DRT 71之"isLastReference()"方法傳回假,則此代表該複數個類似同等物件尚未對該分散式環境中所有其它機器標示為最終化,如物件之最終化狀態的機器X上的共享記錄表中所記錄者。在此例中,該最終化方法並不要被執行(或另外重新開始或繼續),因為其將可能無效化在那些機器上的物件,其係要繼續使用它們類似同等物件,且尚未標示它們的類似同等物件為最終化。因此,當DRT傳回假時,在該最終化方法開始時插入的四個指令可防止執行該最終化方法之剩餘的碼,其藉由透過使用一傳回指令來中止執行該最終化方法,然後中止此物件的Java虛擬機器之最終化作業。On the other hand, if the "isLastReference()" method of the DRT 71 returns false, then this means that the plurality of similar objects have not been marked as finalized for all other machines in the distributed environment, such as the finalized state of the object. The person recorded in the shared record table on machine X. In this case, the finalization method is not to be executed (or otherwise restarted or continued) because it will probably invalidate objects on those machines, which are to continue to use them like equivalents and have not yet labeled them. Similar equivalents are finalized. Therefore, when the DRT returns false, the four instructions inserted at the beginning of the finalization method can prevent the remaining code of the finalization method from being executed, by suspending execution of the finalization method by using a return instruction. Then the finalization of the Java virtual machine for this object is aborted.
給定測試的基本觀念為決定如果一最終化(像是一刪除或清除)已預備要在一類別、物件或其它資產上進行;且如果預備進行該最終化,且如果未預備好,則不會進行最終化,即有數種不同方法或具體實施例,其中可以實施此最終化觀念、方法及程序。The basic idea of a given test is to decide if a finalization (like a deletion or removal) is already made on a category, object or other asset; and if the finalization is to be done, and if not prepared, then Finalization will occur, ie there are several different methods or specific embodiments in which this finalization concept, method and procedure can be implemented.
在第一具體實施例中,一特定機器,如機器M2,載入該資產(例如類別或物件),其包括一修正它的清除例式,然後將修正物件(或類別或資產)載入到每一部其它的機器上M1,M3,...Mn(其可依序或同時,或根據任何其它順序、例式或程序)。請注意到對應於該應用碼中僅一個物件可以有一或複數個例式,或對應於在該應用碼中的複數個物件可有複數個例式。請注意到在一具體實施例中,被載入的該清除例式為二元化可執行物件碼。另外,被載入的該清除例式為可執行的中間碼。In a first embodiment, a particular machine, such as machine M2, loads the asset (e.g., category or object), which includes a clearing example that corrects it, and then loads the corrected object (or category or asset) into M1, M3, ... Mn on each of the other machines (which may be sequential or simultaneous, or according to any other order, exemplification or procedure). Please note that there may be one or more instances corresponding to only one object in the application code, or a plurality of instances corresponding to a plurality of objects in the application code. Please note that in a particular embodiment, the cleanup example loaded is a binary executable object code. In addition, the clearing example loaded is an executable intermediate code.
在一種配置中,其可使用術語「主控者/受控者」(或主要/次級),每部受控(或次級)機器M1,M3,...Mn載入該修正的物件(或類別),並包含由該主控(或主要)機器(例如機器M2,或某個其它機器,如第15圖中之機器X)在該電腦通信網路或其它通信鏈結上傳送給它的新修正的記憶體操縱作業。在對於此「主控者/受控者」或「主要/次級」配置的些微變化中,該電腦通信網路可由一共用的儲存裝置所取代,例如一共用的檔案系統、或一共用的文件/檔案儲存區,例如一共用的資料庫。In one configuration, the term "master/controller" (or primary/secondary) may be used, and each controlled (or secondary) machine M1, M3, ... Mn loads the modified object (or category), and is included in the computer communication network or other communication link sent by the master (or main) machine (such as machine M2, or some other machine, such as machine X in Figure 15) Its new revised memory manipulation job. In some minor changes to this "master/controller" or "primary/secondary" configuration, the computer communication network may be replaced by a shared storage device, such as a shared file system, or a shared File/file storage area, such as a shared database.
請注意到在每部機器或電腦上執行的修正不需要且經常不會是相同或類似。其所需要的是它們係以足夠類似的方式被修正,而其係根據此處所述之創新原理,該複數部機器之每一步對於其它機器為一致性且調和性地完成此處所述的作業及目的。再者,在此處所提供之說明之下將可瞭解到有大量的方法可以實施修正,例如可以根據該特定硬體、架構、作業系統、應用程式碼、或類似者或其它因素而定。其亦可瞭解到本發明之具體實施例可以在一作業系統內、或在任何作業系統之外或不具有其好處,在該虛擬機器內,在一EPROM內,在一軟體、韌體,或是這些的任何組合當中來實施。Please note that the corrections performed on each machine or computer are not required and often not the same or similar. What is needed is that they are modified in a sufficiently similar manner, and in accordance with the innovative principles described herein, each step of the plurality of machines performs consistently and harmonically for the other machines described herein. Homework and purpose. Furthermore, it will be appreciated from the description provided herein that there are numerous ways in which modifications can be implemented, such as depending on the particular hardware, architecture, operating system, application code, or the like or other factors. It will also be appreciated that embodiments of the present invention may or may not have the benefit of being within an operating system, or within any operating system, within an EPROM, in a software, firmware, or It is implemented in any combination of these.
在此「主控者/受控者」或「主要/次級」配置中另一個變化中,機器M2載入該資產(例如類別或物件),包含了在機器M2上未修正形式的一清除例式,然後(例如M2或每部本地化機器)刪除該未修正的清除例式,其已經存在於該機器上,其係整體或部份地來自該資產(例如類別或物件),並藉由一電腦通信網路載入該資產的修正碼,其利用在其它機器上新修正或刪除的清除例式。因此在此狀況下,在該修正並非該資產清除例式的一轉換、測試、轉譯或編譯時,而是在所有機器中除了一部之外之上刪除該初始化例式。在一具體實施例中,該最終化或清除例式之實際碼區塊在所有機器中除了一部之外皆被刪除,且因此最後機器為可以執行該最終化例式之唯一機器,因為所有其它機器已經刪除了該最終化例式。此方法的好處為在執行了相同最終化例式的多重機器之間不會產生衝突,因為僅有一部機器具有該例式。In another variation in the "master/controller" or "primary/secondary" configuration, machine M2 loads the asset (eg, category or object), including a cleanup of the uncorrected form on machine M2. For example, then (for example, M2 or each localization machine) deletes the uncorrected cleanup modality that is already present on the machine, either in whole or in part from the asset (eg, category or object), and borrows A correction code for the asset is loaded by a computer communication network that utilizes a clearing of new corrections or deletions on other machines. Therefore, in this case, when the correction is not a conversion, test, translation or compilation of the asset clearing example, the initialization routine is deleted on all but one of all machines. In a specific embodiment, the actual code block of the finalized or cleared instance is deleted except for one of all machines, and thus the last machine is the only machine that can execute the finalized example, since all The finalization example has been removed by other machines. The benefit of this approach is that there is no conflict between multiple machines that perform the same finalization example, as only one machine has this example.
整個刪除該清除例式之處理可以由該「主控」機器(例如機器M2或某個其它機器,例如第15圖之機器X)或另由每個其它機器M1,M3,...,Mn在收到該未修正資產時來執行。此「主控者/受控者」或「主要/次級」配置的額外變化係要使用一共享的儲存裝置,例如一共享的檔案系統,或一共享的文件/檔案儲藏處,例如一共享的資料庫,用於在機器M1,M2,...,Mn及選擇性第15圖之機器X之間交換該資產、類別或物件的碼(包括例如該修正的碼)。The entire process of deleting the clearing instance may be performed by the "master" machine (e.g., machine M2 or some other machine, such as machine X of Fig. 15) or by each of the other machines M1, M3, ..., Mn. Execute when the uncorrected asset is received. Additional changes to this "master/controlled" or "primary/secondary" configuration are to use a shared storage device, such as a shared file system, or a shared file/archive repository, such as a share A database for exchanging codes of the asset, category or object (including, for example, the modified code) between the machines M1, M2, ..., Mn and the machine X of the selective Fig. 15.
在又另外的具體實施例中,每部機器M1,...,Mn接收該未修正的資產(例如類別或物件),其中包含有一或多個最終化或清除例式,但修正該例式,然後載入包含有現在修正的例式之資產(例如類別或物件)。雖然一種機器(例如該主控或主要機器)可以顧客化或執行一不同的修正到傳送給每部機器之最終化或清除例式,此具體實施例更可立即使得由每部機器所進行之修正略微不同,並基於其特定的機器架構、硬體、處理器、記憶體、組態、作業系統或其它因素來改進、顧客化及/或最佳化,然而仍類似、調和並與其它機器一致於所有其它類似的修正及特性,其不需要一定類似或相同。In still other embodiments, each machine M1, . . . , Mn receives the uncorrected asset (eg, category or object) containing one or more finalized or cleared instances, but corrects the example And then load the asset (such as a category or object) that contains the example that is now fixed. While a machine (e.g., the master or primary machine) can customize or perform a different correction to the finalization or removal routine delivered to each machine, this particular embodiment can be immediately made by each machine. The fixes are slightly different and are improved, customized, and/or optimized based on their specific machine architecture, hardware, processor, memory, configuration, operating system, or other factors, yet still similar, reconciled, and other machines Consistent with all other similar corrections and features, they need not necessarily be similar or identical.
在另一配置中,一特定機器(如M1)載入該未修正的資產(例如類別或物件),其包括一或多個最終化或清除例式,且所有其它機器M2,M3,...,Mn執行一修正或刪除該資產的清除例式(例如類別或物件),並載入該修正的版本。In another configuration, a particular machine (such as M1) loads the uncorrected asset (eg, category or object), which includes one or more finalization or cleanup instances, and all other machines M2, M3, .. .Mn performs a correction or deletion of the asset's cleanup instance (such as a category or object) and loads the modified version.
在所述之所有具體實施例中,供應或傳送該資產碼(例如類別碼或物件碼)給該等機器M1,...Mn者,且視需要包含第15圖的一機器X,其可分支、分散或傳送於不同機器之任何組合或排列之間;例如藉由提供直接機器對機器通信(例如直接由M2供應每部M1,M3,M4等),或藉由提供或使用一串接或序列性通信(例如M2供應M1,其然後供應M3,然後供應M4,依此類推),或是該直接及串接及/或序列性的組合。In all of the specific embodiments described, the asset code (eg, a category code or an object code) is supplied or transmitted to the machines M1, . . . Mn, and a machine X of FIG. 15 is included as needed. Branching, decentralizing or transmitting between any combination or arrangement of different machines; for example by providing direct machine-to-machine communication (eg, supplying each M1, M3, M4, etc. directly from M2), or by providing or using a serial connection Or serial communication (eg, M2 supplies M1, which then supplies M3, then M4, and so on), or the combination of direct and concatenated and/or serial.
在又另一種配置中,該等機器M1到Mn可以傳送一些或所有載入要求到一額外的機器X(例如參見第15圖之具體實施例),其可執行對該應用碼50之修正(例如包含資產、及/或類別、及/或物件),包括最終化或清除例式,其透過上述任何一種方法,並傳回該修正的應用程式碼,其包括對於每部機器M1到Mn之現在修正的最終化或清除例式,且這些機器依序載入該修正的應用程式碼,其包括本地修正的例式。在此配置中,機器M1到Mn傳送所有載入要求到機器X,其傳回一修正的應用程式碼50到每部機器,其包括修正的最終化或清除例式。由機器X所執行的該等修正可包括本發明之範圍所涵蓋的任何修正。此配置在應用到其它機器之前當然可應用到此處所述的某些機器及其它配置。In yet another configuration, the machines M1 through Mn can transmit some or all of the loading requirements to an additional machine X (see, for example, the specific embodiment of Figure 15), which can perform an amendment to the application code 50 ( For example, including assets, and/or categories, and/or objects, including finalization or removal routines, by any of the above methods, and returning the modified application code, including for each machine M1 to Mn Corrected finalization or cleanup routines, and these machines sequentially load the modified application code, which includes a local modified example. In this configuration, machines M1 through Mn transfer all load requests to machine X, which returns a modified application code 50 to each machine, including a modified finalization or clearing routine. Such modifications performed by machine X may include any modifications encompassed by the scope of the invention. This configuration can of course be applied to some of the machines and other configurations described herein before being applied to other machines.
在運算技術中的專業人士將可知道多種可能的技術,其可用於修正電腦碼,其包括但不限於測試、程式轉換、轉譯、或編譯手段。Those skilled in the art will be aware of a variety of possible techniques that can be used to modify computer code including, but not limited to, testing, program conversion, translation, or compilation means.
一種這樣的技術係對該應用碼進行修正,而不需要該應用碼之語言的一先前或後續改變。另一種這樣的技術係要轉換該原始碼(例如JAVA語言原始碼)成為一中介表示(或中介碼語言或虛擬碼),例如JAVA位元組碼。一旦此轉換發生之後,對該位元組碼做修正,然後可倒轉該轉換。此提供了修正的JAVA碼所需要的結果。One such technique is to modify the application code without requiring a prior or subsequent change in the language of the application code. Another such technique is to convert the source code (eg, JAVA language source code) into an intermediary representation (or intermediate code language or virtual code), such as a JAVA byte code. Once this conversion occurs, the byte code is corrected and the conversion can be reversed. This provides the results needed for the modified JAVA code.
另一種可能的技術為轉換該應用程式為機器碼,其可直接由原始碼、或透過前述的中介語言、或透過某些其它中介手段。然後該機器碼在被載入及執行之前被修正。另一種這樣的技術為轉換該原始碼為一中介代表,因此被修正及後續被轉換成機器碼。Another possible technique is to convert the application to machine code, either directly from the source code, or through the aforementioned intermediate language, or through some other intermediary means. The machine code is then corrected before being loaded and executed. Another such technique is to convert the source code into an intermediary representation, thus being modified and subsequently converted to machine code.
本發明包含所有這些修正程序,以及兩個、三個或甚至更多這種程序的組合。The present invention encompasses all of these correction procedures, as well as combinations of two, three or even more such programs.
請再次回到第14圖,其所示為一單一先前技術電腦操作為一JAVA虛擬機器之架構圖。依此方法,一機器(由多家製造商中任何一家製造,並具有在多種不同語言中任何一種操作的一作業系統),其可在該應用程式碼50之特定語言中操作,在此例中為JAVA語言。也就是說,一JAVA虛擬機器72能夠操作在JAVA語言中的應用碼50,並利用無關於該機器製造商及該機器的內部細節之JAVA架構。Please return to Figure 14 again, which shows an architectural diagram of a single prior art computer operating as a JAVA virtual machine. In this way, a machine (manufactured by any of a number of manufacturers and having an operating system operating in any of a number of different languages) can operate in a particular language of the application code 50, in this case In the middle of the JAVA language. That is, a JAVA virtual machine 72 is capable of operating the application code 50 in the JAVA language and utilizing a JAVA architecture that is independent of the machine manufacturer and the internal details of the machine.
當實施在一非JAVA語言或應用碼環境中,該泛用化平台、及/或虛擬機器、及/或機器、及/或執行時間系統,皆能夠操作在該平台的語言中的應用碼50(可能包括例如(但不限於)任何一種或多種的原始碼語言、中介碼語言、物件碼語言、機器碼語言及任何其它碼語言),及/或虛擬機器、及/或機器、及/或執行時間系統環境,並利用該平台、及/或虛擬機器、及/或機器、及/或執行時間系統、及/或語言架構,而無關於該機器製造商及該機器的內部細節。其將亦可在此處所提供的說明中瞭解到該平台及/或執行時間系統可包括虛擬機器及非虛擬機器軟體及/或韌體架構,以及硬體及直接硬體編碼應用及實施。When implemented in a non-JAVA language or application code environment, the generalized platform, and/or virtual machine, and/or machine, and/or execution time system are capable of operating an application code 50 in the language of the platform. (may include, for example, but not limited to, any one or more of a source code language, a mediation code language, an object code language, a machine code language, and any other code language), and/or a virtual machine, and/or machine, and/or Execute the time system environment and utilize the platform, and/or virtual machine, and/or machine, and/or execution time system, and/or language architecture, regardless of the machine manufacturer and internal details of the machine. It will also be appreciated in the description provided herein that the platform and/or execution time system can include virtual machine and non-virtual machine software and/or firmware architectures, as well as hardware and direct hardware coding applications and implementations.
再者,第14圖之單一機器(非複數部連接或耦合的機器),或一更為一般性虛擬機器或摘要機器環境,例如像是(但不限於)一物件導向的虛擬機器,其能夠立即保證指定物件50X-50Z之多種不同及可能同步使用不會衝突或造成不想要的互動,當藉由使用互斥(如"mutex")運算子或作業(包含例如鎖定、信號、監視、阻障及類似者),例如像是在JAVA語言寫成的一電腦程式中由該程式師使用一同步化例式。因為在此範例中每個物件係單獨且僅在本地存在(此為在執行發生時該機器內的本地化),第14圖中在此單一機器內執行之單一JAVA虛擬機器72能夠保證一物件(或數個物件)可適當地被同步化,如由至少在此專利說明書的立案日期存在的JAVA虛擬機器及語言規格所定義,當指定要由該應用程式(或程式師)進行時,且因此要被同步化之物件或多個物件僅立即或同時由可能多個執行部份中一執行部份及該可執行應用碼50之可能同步執行部份,例如像是可能同步執行中的執行緒或處理。如果該可執行應用碼50之另一個執行部份及可能同步執行部份(例如像是但不限於一可能同步執行之執行緒或處理)想要專門使用相同的物件,而該物件為由一第一執行部份(如一第一執行緒或處理)的一互斥運算的主題,例如當第14圖之一多重部份處理機器的一第二執行部份(如一第二執行緒或處理)嘗試要在已經由一第一執行部份同步化的一相同物件上同步化,然後可能的衝突由該JAVA虛擬機器72解決,使得該第二及額外執行部份及可能同步執行部份或該應用程式50之部份必須等到該第一執行部份已經完成其同步化例式或其它互斥運算的執行。其可瞭解到在一習用狀況中,該應用程式或程式碼之一第二或多重執行部份(即一第二或多重執行緒)可以想要使用第14圖之多重執行緒處理機器中相同的物件。Furthermore, the single machine of Figure 14 (a machine that is not connected or coupled by a plurality of parts), or a more general virtual machine or abstract machine environment, such as, but not limited to, an object-oriented virtual machine capable of Immediately guarantee that the specified objects 50X-50Z are different and may be used synchronously without conflict or unwanted interactions by using mutually exclusive (eg "mutex") operators or jobs (including, for example, locking, signaling, monitoring, blocking) Barriers and the like), for example, a programmer using a synchronization example in a computer program written in the JAVA language. Since each object is unique and only localized in this example (this is localization within the machine when execution occurs), the single JAVA virtual machine 72 executing in this single machine in Figure 14 can guarantee an object. (or several objects) may be properly synchronized, as defined by the JAVA virtual machine and language specification present at least on the filing date of this patent specification, when specified by the application (or programmer), and Therefore, the object or objects to be synchronized are only immediately or simultaneously composed of an execution part of the plurality of execution parts and a possible synchronous execution part of the executable application code 50, such as, for example, execution in synchronous execution. Or processing. If the other executable portion of the executable application code 50 and possibly the synchronous execution portion (such as, but not limited to, a thread or process that may be executed synchronously) want to exclusively use the same object, the object is one a subject of a mutually exclusive operation of a first execution portion (such as a first thread or process), such as a second execution portion of a multi-part processing machine (such as a second thread or processing) Attempting to synchronize on a same object that has been synchronized by a first execution portion, and then possible conflicts are resolved by the JAVA virtual machine 72, such that the second and additional execution portions and possibly simultaneous execution portions or Portions of the application 50 must wait until the first execution portion has completed the execution of its synchronization routine or other mutually exclusive operations. It can be seen that in a conventional situation, the second or multiple execution portions of the application or code (ie, a second or multiple threads) may want to use the same in the multi-thread processing machine of FIG. Object.
對於一更為一般性的虛擬機器或摘要機器環境的組合,且對於目前及未來的電腦及/或運算機器及/或資訊家電或處理系統,且其可不利用或不需要利用到類別及/或物件,本發明之結構、方法及電腦程式及電腦程式產品仍將可應用。不會利用類別及/或物件之電腦及/或運算機器之範例包括例如由Intel公司及其它公司所製造的x86電腦架構,由Sun Microsystems公司及其它公司所製造的SPARC電腦架構,及由IBM公司及其它公司所製造的PowerPC電腦架構,及由Apple電腦公司及其它公司所製造的個人電腦產品。對於這些種類的電腦、運算機器、資訊家電,及並未利用類別或物件觀念而在其上實施的虛擬機器或虛擬運算環境,例如其可被一般化來包括基本資料型別(例如整數資料型別、浮點資料型別、長整數資料型別、雙重資料型別、字串資料型別、符號資料型別及布林資料型別)、結構化資料型別(例如陣列及記錄)衍生的型別,或其它程序性語言的其它碼或資料結構、或其它語言及環境,例如函數、指標、組件、模組、結構、參照及集合。For a more general combination of virtual machine or abstract machine environments, and for current and future computer and/or computing machines and/or information appliances or processing systems, and which may or may not utilize categories and/or The structure, method, computer program and computer program product of the present invention will still be applicable. Examples of computers and/or computing machines that do not utilize categories and/or objects include, for example, x86 computer architectures manufactured by Intel Corporation and others, SPARC computer architectures manufactured by Sun Microsystems and others, and by IBM Corporation. And the PowerPC computer architecture manufactured by other companies, as well as personal computer products manufactured by Apple Computer and other companies. For these types of computers, computing machines, information appliances, and virtual machines or virtual computing environments that are not implemented using categories or objects, for example, they can be generalized to include basic data types (eg, integer data types). Different, floating point data type, long integer data type, double data type, string data type, symbol data type and Bolling data type), structured data type (such as array and record) Type, or other code or data structure of other procedural languages, or other languages and environments, such as functions, indicators, components, modules, structures, references, and collections.
一類似程序應用了類別50A之適當修正(即具有適當或必要的變更)。特別是,當在一單一機器上使用JAVA語言及架構撰寫或產生一程式時,該電腦程式師(或如果當可應用時,一自動化或非自動化電腦程式產生器或產生手段),不僅需要使用一同步化例式,藉以提供避免衝突或不想要的互動。因此,一單一JAVA虛擬機器可追跡該等類別及物件(或其它資產)的獨特使用,並避免相對應問題(例如衝突、競賽狀況、不想要的互動、或其它由於關於事件相關時序的非預期性關鍵相依性造成的異常行為),為一不唐突方法中所需要。藉此獨特使用的唯一一個物件或類別之處理即稱之為JAVA語言中的同步化。在JAVA語言中,同步化通常可以用三種方式或手段中的一種來作業或實施。第一種方法或手段為透過使用一同步化方法描述,其係包含在由JAVA語言所寫成的一應用程式之原始碼。第二種方法或手段為包含了JAVA虛擬機器之一編譯過應用程式的方法描述器中一「同步化描述器」。而用於執行同步化之第三種方法或手段係藉由使用該JAVA虛擬機器之該指令監視進入(如"monitorenter")及監視離開(如"monitorexit"),其分別表示一同步化例式之開始及結束,其造成取得或執行一"lock"(或其它互斥運算子或作業),且一"lock"之分別釋放或終止(或其它互斥運算子或作業),其防止一資產成為在多重及可能同步使用之間的衝突之主題(或競賽狀況、或不想要的互動、或其它由於事件的相關時序中未預期的關鍵相依性的異常行為)。例如一資產可包括一類別或一物件,以及任何其它軟體/語言/執行時間/平台/架構或機器資源。這些資源可包括例如(但不限於)軟體程式(例如像是可執行軟體、模組、次程式、次模組、應用程式介面(API)、軟體庫、動態鏈結庫)及資料(例如像是資料型別、資料結構、變數、陣列、表列、結構、集合),及記憶體位置(例如像是命名的記憶體位置、記憶體範圍、位址空間、暫存器),及輸入/輸出(I/O)埠及/或介面,或其它機器、電腦或資訊家電資源或資產。A similar procedure applies the appropriate amendments to category 50A (ie, with appropriate or necessary changes). In particular, when writing or generating a program using a JAVA language and architecture on a single machine, the computer programmer (or an automated or non-automated computer program generator or means of production if applicable) requires not only A synchronization example to provide for avoiding conflicts or unwanted interactions. Thus, a single JAVA virtual machine can track the unique use of such categories and objects (or other assets) and avoid corresponding problems (such as conflicts, race conditions, unwanted interactions, or other unanticipated due to event-related timing) Abnormal behavior caused by sexual critical interdependence) is needed in an unobtrusive approach. The processing of the only object or category that is uniquely used is called synchronization in the JAVA language. In the JAVA language, synchronization can usually be done or implemented in one of three ways or means. The first method or means is described by using a synchronization method, which is included in the source code of an application written in the JAVA language. The second method or means is a "synchronization descriptor" in a method descriptor that includes an application compiled by one of the JAVA virtual machines. The third method or means for performing synchronization is to monitor entry (such as "monitorenter") and monitor leave (such as "monitorexit") by using the instruction of the JAVA virtual machine, which respectively represent a synchronization example. The beginning and the end, which result in the acquisition or execution of a "lock" (or other mutually exclusive operator or job), and the release or termination of a "lock" (or other mutually exclusive operation or job), which prevents an asset Become the subject of conflicts between multiple and possible simultaneous uses (or race conditions, or unwanted interactions, or other anomalous behaviors that are not expected due to critical timing in the relevant timing of the event). For example, an asset can include a category or an object, as well as any other software/language/execution time/platform/architecture or machine resource. These resources may include, for example, but are not limited to, software programs (such as executable software, modules, sub-programs, sub-modules, application interfaces (APIs), software libraries, dynamic link libraries) and materials (such as Is the data type, data structure, variables, arrays, tables, structures, collections), and memory locations (such as named memory locations, memory ranges, address spaces, scratchpads), and input / Output (I/O) and/or interface, or other machine, computer or information appliance resources or assets.
但是,在第8圖所例示的配置中(亦在第31-33圖中),其提供複數部個別電腦或機器M1,M2,...Mn,其每個係透過一通信網路53或其它通信鏈結來互連,且每部個別的電腦或機器具有一修正子51(請參見第5圖),並由例如該分散式執行時間(DRT)71(參見第8圖)所釋放,並載入有一共用應用碼50。該術語共用應用程式係要理解為代表一應用程式或應用程式碼,其寫成在單一機器上作業,並載入在該複數部電腦或機器M1,M2...Mn上整體或部份地執行,或視需要在該複數部電腦或機器M1,M2...Mn之某個子集合中每一個之上來執行。但有些不同地是,有一種共用應用程式,以應用碼50所代表,且此單一複本或可能是複數個相同複本係被修正來產生該應用程式或程式碼的一修正複本或版本,每個複本或例證係預備在該複數部機器上執行。在它們被修正之後,如果它們執行類似的作業,並彼此一致性及調和性地操作,即視為是共用。其將可瞭解到,實施本發明之特徵的複數部電腦、機器、資訊家電或類似者,可視需要連接或耦合到並未實施本發明之特徵的其它電腦、機器、資訊家電或類似者。However, in the configuration illustrated in Figure 8 (also in Figures 31-33), it provides a plurality of individual computers or machines M1, M2, ... Mn, each of which is transmitted through a communication network 53 or Other communication links are interconnected, and each individual computer or machine has a modifier 51 (see Figure 5) and is released, for example, by the Decentralized Execution Time (DRT) 71 (see Figure 8). And loaded with a shared application code 50. The term shared application is understood to mean an application or application code written to be executed on a single machine and loaded on the computer or machine M1, M2...Mn in whole or in part. Or, as needed, on each of the plurality of sub-sets of the plurality of computers or machines M1, M2...Mn. But somewhat differently, there is a shared application, represented by application code 50, and this single copy or possibly multiple identical copies are modified to produce a modified copy or version of the application or code, each A copy or illustration is prepared to be executed on the plurality of machines. After they are corrected, they are considered to be shared if they perform similar jobs and operate consistently and harmonically. It will be appreciated that a plurality of computers, machines, information appliances, or the like, embodying features of the present invention, may be coupled or coupled to other computers, machines, information appliances, or the like that do not implement the features of the present invention, as desired.
在一些具體實施例中,部份或所有的該複數部個別電腦或機器可以包含在單一外殼或機殼內(例如所謂刀鋒伺服器,由Hewlett-Packard Development公司、Intel公司、IBM公司及其它所製造),或是實施在一單一印刷電路板上,或甚至在一單一晶片或晶片組內。In some embodiments, some or all of the plurality of individual computers or machines may be contained within a single enclosure or enclosure (eg, a so-called blade server, by Hewlett-Packard Development, Intel Corporation, IBM Corporation, and others). Manufactured) either on a single printed circuit board or even in a single wafer or wafer set.
基本上該修正子51或DRT 71可保證當在一或多部機器上執行之修正過的應用程式50之一部份(例如一執行緒或處理)專門地利用(例如藉由一同步化例式或類似或同等的相互排除運算子或作業)一特定的本地資產,例如一物件50X-50Z或類別50A,在機器M2...Mn上沒有其它不同及可能同步地執行部份獨特地立刻或同時間利用對應於在其本地記憶體中類似的相等對應資產。Basically, the corrector 51 or DRT 71 can ensure that a portion of the modified application 50 (eg, a thread or process) executed on one or more machines is utilized exclusively (eg, by a synchronization example) Or a similar or equivalent mutual exclusion operator or operation) a specific local asset, such as an object 50X-50Z or category 50A, without any other difference on the machine M2...Mn and possibly performing a partially uniquely immediate Or at the same time utilize an equivalent corresponding asset corresponding to it in its local memory.
其將可瞭解到在此處的說明之下,該修正子51及該分散式執行時間71會有另外的實施。例如,該修正子51可以實施該分散式執行時間71之一個組件或在其內,因此該DRT 71可以實施該修正子51之功能及作業。另外,該修正子51之功能及作業可以在用於實施該DRT 71之結構、軟體、韌體或其它手段之外實施。在一具體實施例中,該修正子51及DRT 71係實施或寫入在電腦程式碼的單一段落中,而可提供該DRT及修正子之功能。因此該修正子功能及結構可能包含在該DRT中,並視為一選擇性組件。在如何實施之外,該修正子功能及結構係負責修正該應用碼程式之可執行碼,且該分散式執行時間功能及結構係負責實施該等電腦或機器之間的通信。在一具體實施例中的通信功能係透過在每部機器上之DRT的電腦程式碼內的一中間協定層來實施。例如該DRT可實施在該JAVA語言中的一通信堆疊,並使用該傳輸控制協定/網際網路協定(TCP/IP)來提供該等機器之間的通信或對話。實際上這些功能或作業是如何實施或分割在結構性及/或程序性元素之間,或是在本發明之電腦程式碼或資料結構之間,皆比它們所提供者要來得不重要。It will be appreciated that under the description herein, the modifier 51 and the distributed execution time 71 will have additional implementations. For example, the modifier 51 can implement or be within a component of the distributed execution time 71, such that the DRT 71 can implement the functions and operations of the modifier 51. In addition, the function and operation of the corrector 51 can be implemented in addition to the structure, software, firmware or other means for implementing the DRT 71. In a specific embodiment, the modifier 51 and the DRT 71 are implemented or written in a single paragraph of the computer code, and the functions of the DRT and the modifier are provided. Therefore, the modifier function and structure may be included in the DRT and be regarded as an optional component. In addition to how it is implemented, the modifier function and structure is responsible for modifying the executable code of the application code program, and the distributed execution time function and structure is responsible for implementing communication between the computers or machines. The communication functions in a particular embodiment are implemented by an intermediate protocol layer within the computer code of the DRT on each machine. For example, the DRT can implement a communication stack in the JAVA language and use the Transmission Control Protocol/Internet Protocol (TCP/IP) to provide communication or conversation between the machines. In fact, how these functions or operations are implemented or divided between structural and/or procedural elements, or between the computer code or data structure of the present invention, is less important than the ones they provide.
因此其將可在此處所提供說明之下瞭解到本發明另包括實施執行緒安全的任何手段,不論是否其透過使用鎖定(鎖定/解鎖)、同步化、監視器、SEMPHAFORES,互斥鎖,或其它機制。Accordingly, it will be appreciated that the invention may include any means of implementing thread security, whether through the use of lock (lock/unlock), synchronization, monitor, SEMPHAFORES, mutex, or Other mechanisms.
其將可瞭解到同步化代表或指明一資產或資源之「獨特使用」或「互斥」。用於實施單一電腦或機器之習用結構及方法已經發展出一些方法來在這種單一電腦或機器組態上進行同步化。但是,這些習用結構及方法並未提供在複數部電腦、機器或資訊家電之間同步化的解決方案。It will be understood that synchronization represents or indicates "unique use" or "mutual exclusion" of an asset or resource. Conventional structures and methods for implementing a single computer or machine have developed methods for synchronizing on such a single computer or machine configuration. However, these conventional structures and methods do not provide a solution for synchronizing between multiple computers, machines, or information appliances.
特別是,當一特定機器(例如像是機器M3)獨特地使用一物件或類別(或任何其它資產或資源),另一部機器(例如像是機器M5)亦可由該碼所指示,其係執行來獨特地同時或一重疊的時段內使用對應於機器M3上該類似同等物件或類別之本地類似同等物件或類別。因此,如果在每部機器M3及M5上相同相對應本地類似同等物件或類別係要由兩部機器皆獨特使用時,則該物件及應用整體的行為並未定義,意即當明確地由該電腦程式(程式師)指定時而缺少一物件(或類別)之適當的獨特使用時,有可能造成在機器M5及M3上由於事件的相對時序之非預期相依性造成的衝突、不想要的互動、異常行為,或類似同等物件之間的永久不一致性。因此將無法達成在每一部該等複數部機器M1,M2...Mn上相同應用程式碼之同步及協調的作業所需要之複數部機器之間同步化例式(或其它互斥運算)要達到或提供一致性、協調及調和作業的目的。In particular, when a particular machine (such as, for example, machine M3) uniquely uses an object or category (or any other asset or resource), another machine (such as, for example, machine M5) may also be indicated by the code. Execution to uniquely use a similarly similar item or category corresponding to the equivalent item or category on machine M3 during a simultaneous or overlapping period of time. Therefore, if the same corresponding equivalent object or category on each machine M3 and M5 is to be uniquely used by both machines, the behavior of the object and the application as a whole is not defined, that is, when explicitly When a computer program (programmer) specifies a proper unique use of an object (or category), it may cause conflicts, unwanted interactions on machines M5 and M3 due to unintended dependencies of the relative timing of events. , anomalous behavior, or a permanent inconsistency between similar objects. Therefore, it is impossible to achieve a synchronization example (or other mutual exclusion operation) between the plurality of machines required for the synchronization and coordination of the same application code on each of the plurality of machine M1, M2...Mn. To achieve or provide consistency, coordination, and reconciliation operations.
為了保證在機器M1,M2...Mn之間的一致性同步化,該應用碼50由尋找整個可執行應用碼50來分析或細查,藉以偵測在該應用碼50中的程式步驟(例如特定的指令或指令型態),其可定義或構成,或另外代表一同步化例式(或其它互斥運算)。在JAVA語言中,這些程式步驟例如可包含或具有開放監視輸入(如"monitorenter")指令,及一或多個關閉監視離開(如"monitorexit")指令。在一具體實施例中,一同步化例式可由執行一"monitorenter"指令開始,並以一配對的執行一"monitorexit"指令來結束。In order to ensure consistency synchronization between the machines M1, M2...Mn, the application code 50 is analyzed or scrutinized by looking for the entire executable application code 50 to detect the program steps in the application code 50 ( For example, a particular instruction or instruction type) may be defined or constructed, or otherwise represent a synchronization instance (or other mutually exclusive operation). In the JAVA language, these program steps may include, for example, or have open monitoring input (such as "monitorenter") instructions, and one or more closed monitoring and leaving (such as "monitorexit") instructions. In a specific embodiment, a synchronization example can be initiated by executing a "monitorenter" instruction and ending with a paired execution of a "monitorexit" instruction.
此該應用碼50之分析或細查可在載入該應用程式碼50之前、或在該應用程式碼50載入程序期間發生,或甚至在該應用程式碼50載入程序之後發生。其可類似於一安裝、程式轉換、轉譯、或編譯程序,其中該應用碼可用額外的指令來實施,及/或另可由意義保留程式操縱所修正,即/或選擇性地由一輸入碼語言轉譯到一不同的碼語言(例如像是由原始碼語言或中介碼語言轉譯到物件碼語言或機器碼語言),並瞭解到該術語編譯通常或習用上包含了碼或語言中的改變,例如由原始碼或物件碼,或由一種語言到另一種語言。但是,在本例中該術語「編譯」(及其文法上同等者)並沒有那麼多限制,且亦可在相同碼或語言內包括或含有修正。例如,該編譯及其同等者可瞭解為同時包含正常編譯(例如像是藉由例示而非限制,由原始碼到物件碼),且由原始碼編譯成原始碼,以及由物件碼編譯到物件碼,以及其中任何改變的組合。其亦可包括所謂的「中介語言」,其形式為「虛擬物件碼」。The analysis or scrutiny of the application code 50 may occur prior to loading the application code 50, or during loading of the application code 50, or even after the application code 50 loads the program. It can be similar to an installation, program conversion, translation, or compiler, where the application code can be implemented with additional instructions, and/or can be modified by meaning retention program manipulation, ie, or alternatively by an input code language. Translating into a different code language (for example, translation from a source code language or an intermediate code language to an object code language or a machine code language), and knowing that the term compilation usually or customally contains changes in the code or language, such as From source code or object code, or from one language to another. However, in this example the term "compilation" (and its grammatical equivalents) is not so limited and may include or contain amendments within the same code or language. For example, the compilation and its equivalents can be understood to include both normal compilation (eg, by way of illustration and not limitation, from source code to object code), and compiled from source code to source code, and compiled from object code to object. The code, and any combination of any of them. It may also include a so-called "intermediary language" in the form of "virtual object code".
藉由例示且並非限制,在一具體實施例中,該應用碼50之分析或細查可在載入該應用程式碼期間發生,例如藉由該作業系統由該硬碟或其它儲存裝置或來源讀取該應用碼,並將其複製到記憶體,並預備開始執行該應用程式碼。在另一具體實施例中,於JAVA虛擬機器中,該分析或細查可在該java.lang.ClassLoader loadClass方法(如java.lang.ClassLoader.loadClass())之類別載入程序期間發生。By way of illustration and not limitation, in one embodiment, analysis or scrutiny of the application code 50 may occur during loading of the application code, such as by the operating system from the hard disk or other storage device or source. The application code is read, copied to memory, and ready to begin execution of the application code. In another embodiment, in a JAVA virtual machine, the analysis or scrutiny can occur during a class loader of the java.lang.ClassLoader loadClass method (eg, java.lang.ClassLoader.loadClass()).
另外,該應用碼50之分析或細查可以甚至在該應用程式碼載入程序之後發生,例如在該作業系統已經載入該應用碼到記憶體之後,或選擇性地甚至在該應用程式碼之相關的對應部份已經開始或進行之後,例如像是在該JAVA虛擬機器已經載入該應用碼到該虛擬機器當中之後,其係透過"java.lang.ClassLoader.loadClass()"方法,且選擇性地進行執行。In addition, the analysis or scrutiny of the application code 50 can occur even after the application code loading program, for example, after the operating system has loaded the application code into the memory, or alternatively even in the application code. After the relevant part has been started or carried out, for example, after the JAVA virtual machine has loaded the application code into the virtual machine, it passes the "java.lang.ClassLoader.loadClass()" method, and Execute selectively.
請參考所附的附錄D,其中:附錄D1為在修正之前一同步化例式的一典型碼段落(如一範例性未修正同步化例式),而附錄D2為在修正之後相同的同步化例式(例如一範例性修正的同步化例式)。這些碼區段僅為範例性,並可識別一軟體碼手段,用以執行在一範例性語言中的修正。其將可瞭解到可以使用其它軟體/韌體或電腦程式碼來完成相同或類似的功能或作業,其皆不背離本發明。Please refer to the attached Appendix D, where: Appendix D1 is a typical code segment of a synchronization example before correction (such as an example uncorrected synchronization example), and Appendix D2 is the same synchronization example after correction. Equation (for example, an example of a modified synchronization). These code segments are merely exemplary and a software code means can be identified for performing the corrections in an exemplary language. It will be appreciated that other software/firmware or computer code can be used to accomplish the same or similar functions or operations without departing from the invention.
附錄D1及D2(亦在以下的表XX及表XXI中部份重現)為範例性碼表列,其提供應用程式50之一初始化例式的該習用或未修正的電腦程式軟體碼(例如可用於單一機器或電腦環境中),及相同初始化例式的一後修正摘錄,例如可用於本發明之具有多重機器的具體實施例中。加入到該同步化方法之修正過的碼以粗體文字來強調。本發明之其它具體實施例可提供要被加入、修改、移除、移動或重新組織、或另外改變的碼、或敘述、或指令。Appendices D1 and D2 (also partially reproduced in Tables XX and XXI below) are exemplary code list columns that provide the conventional or uncorrected computer program software code for one of the application 50 initialization examples (eg A post-correction excerpt of the same initialization equations, which can be used in a single machine or computer environment, for example, can be used in the specific embodiment of the invention having multiple machines. The corrected code added to the synchronization method is highlighted in bold text. Other embodiments of the invention may provide code, or narration, or instructions to be added, modified, removed, moved or reorganized, or otherwise altered.
其要注意到在該附錄中的編譯過的碼與在該表格中重複的部份採用的形式為檔案"example.java"之原始碼,其係包括在附錄D3中。列在該附錄及表格中的解碼編譯過的碼係採自該檔案"EXAMPLE.JAVA"中的編譯過原始碼。在附錄D1及表XX之程序中,步驟001之程序名稱"Method void run()"為編譯過應用碼之"example.java"之執行方法之顯示的解碼輸出的名稱。該名稱"Method void run()"為任選的,其對此範例選擇出來代表包含一同步化作業之一典型JAVA方法。該方法整體負責用一執行緒安全的方式透過使用一同步化敘述來增加一記憶體位置(「計數器」),並依序說明達到此目的之步驟。It should be noted that the compiled code in the appendix and the part in the form repeated in the table are in the form of the file "example.java", which is included in Appendix D3. The decoded compiled code listed in this appendix and table is compiled from the original code in the file "EXAMPLE.JAVA". In the procedures of Appendix D1 and Table XX, the program name "Method void run()" of step 001 is the name of the decoded output of the display of the execution method of "example.java" compiled with the application code. The name "Method void run()" is optional, and this example is chosen to represent a typical JAVA method that includes a synchronized job. The method as a whole is responsible for adding a memory location ("counter") by using a synchronized statement in a thread-safe manner, and sequentially illustrates the steps to achieve this.
首先(步驟002),該Java虛擬機器指令"getstatic #2<Field java.lang.Object LOCK>"使得該Java虛擬機器取得儲存在含有此範例run()方法之應用程式的classfile結構的第二索引中由CONSTANT_Fieldref_info constant-pool項目所指出的該靜態欄位之物件參照,並造成在該欄位中對該物件之參照(以下稱之為LOCK)被放置(推入)在該目前執行中執行緒之目前方法訊框的堆疊上。First (step 002), the Java virtual machine instruction "getstatic #2<Field java.lang.Object LOCK>" causes the Java virtual machine to retrieve the second index of the classfile structure stored in the application containing the example run() method. The object referenced by the static field indicated by the CONSTANT_Fieldref_info constant-pool item, and causes a reference to the object (hereinafter referred to as LOCK) to be placed (pushed) in the field in the current execution thread The current method frame is stacked on the stack.
接著(步驟003),該Java虛擬機器指令"dup"使得該Java虛擬機器來複製該堆疊之最上方項目,並推入該複製的項目到該目前方法訊框之堆疊的最上方位置,並造成在該堆疊的最上方之LOCK物件之參照被複製,並推入到該堆疊上。Next (step 003), the Java virtual machine instruction "dup" causes the Java virtual machine to copy the top item of the stack and push the copied item to the uppermost position of the stack of the current method frame, and causes The reference to the LOCK object at the top of the stack is copied and pushed onto the stack.
接著(步驟004),該Java虛擬機器指令"astore_1"使得該Java虛擬機器移除該目前方法訊框之堆疊的最上方項目,並儲存該項目到該目前方法訊框之索引1的本地變數陣列中,並造成該堆疊的最上方LOCK物件參照被儲存在該本地變數索引1中。Next (step 004), the Java virtual machine instruction "astore_1" causes the Java virtual machine to remove the topmost item of the stack of the current method frame and store the item to the local variable array of index 1 of the current method frame. And causing the topmost LOCK object reference of the stack to be stored in the local variable index 1.
然後(步驟005),該Java虛擬機器指令"monitorenter"使得該Java虛擬機器推出該最上方物件離開該目前方法訊框的堆疊,並取得在該推出的物件上之一排除鎖定,並造成一鎖定在該LOCK物件上被取得。Then (step 005), the Java virtual machine instruction "monitorenter" causes the Java virtual machine to push the top object away from the stack of the current method frame, and obtain one of the items on the pushed object to exclude the lock and cause a lock Obtained on the LOCK object.
該Java虛擬機器指令"getstatic #3<Field int counter>"(步驟006)使得該Java虛擬機器來取得含有此範例run()方法之應用程式的classfile結構之第三索引中由CONSTANT_Fieldref_info constant-pool項目所指出的該靜態欄位之整數值,並造成該欄位之整數值被放置(推入)在該目前執行中執行緒的目前方法訊框之堆疊上。The Java virtual machine instruction "getstatic #3<Field int counter>" (step 006) causes the Java virtual machine to retrieve the third index of the classfile structure of the application containing the example run() method from the CONSTANT_Fieldref_info constant-pool entry. The integer value of the static field is indicated, and the integer value of the field is placed (pushed) on the stack of the current method frame of the currently executing thread.
該Java虛擬機器指令"iconst_1"(步驟007)使得該Java虛擬機器載入一整數值"1"到該目前方法訊框的堆疊上,並使得該整數值1被載入到該目前方法訊框的堆疊之最上方。The Java virtual machine instruction "iconst_1" (step 007) causes the Java virtual machine to load an integer value "1" onto the stack of the current method frame and cause the integer value 1 to be loaded into the current method frame. At the top of the stack.
該Java虛擬機器指令"iadd"(步驟008)使得該Java虛擬機器來執行該目前方法訊框的堆疊之最上方兩個整數值之整數相加,並造成該加法作業之所得整數值被放置在該目前方法訊框之堆疊的最上方。The Java virtual machine instruction "iadd" (step 008) causes the Java virtual machine to perform an integer addition of the top two integer values of the stack of the current method frame, and causes the resulting integer value of the addition operation to be placed The top of the stack of the current method frame.
該Java虛擬機器指令"putstatic #3<Field int counter>"(步驟009)使得該Java虛擬機器來推出該最上方數值離開該目前方法訊框之堆疊,並儲存該數值在含有此範例run()方法之應用程式的classfile結構之第三索引中由CONSTANT_Fieldref_info constant-pool項目所指出的該靜態欄位中,並造成該目前方法訊框之堆疊的最上方整數值被儲存在名為"counter"之整數欄位中。The Java virtual machine instruction "putstatic #3<Field int counter>" (step 009) causes the Java virtual machine to push the topmost value out of the stack of the current method frame and store the value in the sample run() The third index of the application's classfile structure is in the static field indicated by the CONSTANT_Fieldref_info constant-pool item, and the uppermost integer value of the stack of the current method frame is stored in the name "counter". In the integer field.
該Java虛擬機器指令"aload_1"(步驟010)使得該Java虛擬機器載入該項目在該目前方法訊框之索引1處的本地變數陣列中,並儲存此項目在該目前方法訊框之堆疊的最上方,並造成儲存在索引1處的本地變數陣列中的物件參照被推入到該堆疊上。The Java virtual machine instruction "aload_1" (step 010) causes the Java virtual machine to load the project into the local variable array at index 1 of the current method frame and store the item in the stack of the current method frame. At the top, and causing object references in the local variable array stored at index 1 to be pushed onto the stack.
該Java虛擬機器指令"monitorexit"(步驟011)使得該Java虛擬機器推出該最上方物件離開該目前方法訊框的堆疊,並釋放在該推出的物件上的排除LOCK,並造成一鎖定在該LOCK物件上被釋放。The Java virtual machine instruction "monitorexit" (step 011) causes the Java virtual machine to push the stack of the topmost object away from the current method frame and release the excluded LOCK on the pushed object and cause a lock on the LOCK The object is released.
最後,該Java虛擬機器指令"return"(步驟012)使得該Java虛擬機器來藉由傳回控制到該先前方法訊框來停止執行此run()方法,並造成此run()方法執行的終止。Finally, the Java virtual machine instruction "return" (step 012) causes the Java virtual machine to stop executing the run() method by returning control to the previous method frame and causing the execution of the run() method to terminate. .
由於這些在第1圖及第2圖中習用組態的一單一機器上作業的步驟,包含該"counter"記憶體位置之增加作業的同步化敘述可保證此run()方法中不會有兩個或多個同步執行例證將會衝突,或另外造成不想要的互動,例如由於該一個"counter"記憶體位置處執行的該增加事件之相對時序之未預期的關鍵相依性的的競賽狀況或其它異常行為。如果這些步驟要在第5圖及第8圖之組態中複數部機器上進行,並具有第9,10,11,12及13圖之記憶體更新及傳遞複製手段,且同步執行該run()方法之兩個或多個例證或事件,其每個在該複數部機器M1,M2...Mn中不同的機器上,該run()方法之每個同步執行例證的互斥運算將會在該等機器之每個相對應者之上執行,而不需要那些機器之間的協調。Due to these steps of working on a single machine configured in the first and second figures, the synchronized description of the increase operation including the "counter" memory position ensures that there will be no two in the run() method. One or more simultaneous execution instances will conflict, or otherwise cause unwanted interactions, such as a race condition due to an unexpected critical dependency of the relative timing of the increased event performed at the location of the "counter" memory or Other abnormal behavior. If these steps are to be performed on a plurality of machines in the configurations of Figures 5 and 8, and have the memory update and transfer copying means of Figures 9, 10, 11, 12 and 13, and execute the run synchronously ( Two or more examples or events of the method, each of which is performed on a different machine in the plurality of machines M1, M2...Mn, and each of the run() methods simultaneously performs an exemplary mutual exclusion operation Execution is performed on each of the counterparts of the machines without the need for coordination between those machines.
給定橫跨複數部機器之一致性協調的同步化作業為目的,此先前技術配置將無法執行這種橫跨該複數部機器之一致性協調的同步化作業,因為每部機器僅在本地執行同步化,並沒有任何嘗試來協調它們的本地同步化作業,其係利用在任何一部或多部其它機器上的任何其它類似同步化作業。因此這種配置將會在該等機器M1,M2,...,Mn之間的衝突或其它不想要的互動(例如競賽狀況或由於在每部機器上該"counter"增加事件的相對時序之未預期的關鍵相依性之其它異常行為)。因此本發明的目標在於克服該先前技術配置的此限制。Given the consistency of synchronized operations across multiple machines, this prior art configuration would not be able to perform this coordinated synchronization of the machines across the complex machine because each machine is only executing locally Synchronization, without any attempt to coordinate their local synchronization jobs, utilizes any other similar synchronization jobs on any one or more other machines. So this configuration will be a conflict between these machines M1, M2, ..., Mn or other unwanted interactions (such as race conditions or due to the relative timing of events added to the "counter" on each machine) Other abnormal behaviors of unexpected critical dependencies). It is therefore an object of the present invention to overcome this limitation of this prior art configuration.
在表XXI(附錄D2)中的範例碼中,該碼已經被修正,所以其解決了複數部機器M1,M2,...,Mn之一致性協調的同步化作業之問題,其並未在來自表XX(附錄D1)之碼範例中被解決。在此修正的run()方法碼中,一"dup"指令被插入在該"4 astore_1"及"6 monitorenter"指令之間。此使得該Java虛擬機器複製該堆疊的最上方項目,並推入該複製的項目到該目前方法訊框之堆疊的最上方位置上,並造成對於位在該堆疊的最上方處該LOCK物件之參照被複製,並推入到該堆疊上。In the sample code in Table XXI (Appendix D2), the code has been corrected, so it solves the problem of the coordinated operation of the consistency of the complex machines M1, M2, ..., Mn, which is not The code example from Table XX (Appendix D1) is resolved. In the modified run() method code, a "dup" instruction is inserted between the "4 astore_1" and "6 monitorenter" instructions. This causes the Java virtual machine to copy the topmost item of the stack and push the copied item to the uppermost position of the stack of the current method frame and cause the LOCK object to be located at the top of the stack. The reference is copied and pushed onto the stack.
再者,該Java虛擬機器指令"invokestatic #23<Method void acquireLock(java.lang.Object)>"被插入在該"6 monitorenter"之後及該"10 getstatic #3<Field int counter>"敘述之前,所以該Java虛擬機器推出該最上方項目離開該目前方法訊框之堆疊,並引發該"acquireLock"方法,傳送該推出的項目到該新方法訊框做為其第一引數。此改變特別明顯,因為其修正該run()方法來執行該"acquireLock"方法及相關的作業,相對應於其之前的該"monitorenter"指令。Furthermore, the Java virtual machine instruction "invokestatic #23<Method void acquireLock(java.lang.Object)>" is inserted after the "6 monitorenter" and before the "10 getstatic #3<Field int counter>" statement. Therefore, the Java virtual machine launches the stack of the current method frame leaving the current method frame, and raises the "acquireLock" method, and transmits the launched item to the new method frame as its first argument. This change is particularly noticeable because it corrects the run() method to execute the "acquireLock" method and associated operations, corresponding to its previous "monitorenter" instruction.
附錄D1為附錄D3之example.java之同步化作業的解碼編譯的形式之修正之前的摘錄,其包含一啟始"monitorenter"指令及結束"monitorexit"指令。附錄D2為附錄D1之修正之後的形式,根據第26圖之步驟中附錄D6之LockLoader.java所修正。該等修正以粗體來強調。Appendix D1 is an excerpt from the revision of the decoding and compilation form of the synchronization operation of example.java of Appendix D3, which includes a start "monitorenter" instruction and an end "monitorexit" instruction. Appendix D2 is the form after the amendment of Appendix D1, as amended by LockLoader.java in Appendix D6 of the steps in Figure 26. These corrections are highlighted in bold.
該方法void acquireLock(java.lang.Object),附錄D4之LockClient碼之部份,及分散式執行時間系統(DRT)71之部份,其執行機器M1...Mn之間的通信作業,以協調該等機器M1...Mn之間的先前"monitorenter"同步化作業之執行。此範例的acquireLock方法通信於在第15圖之機器X上執行的附錄D5之LockServer碼,其藉由傳送一'acquire lock request"到對應於被鎖定之物件的機器X(即對應於該"monitorenter"指令的該物件),其在表XXI及附錄D2之內文中為該'LOCK'物件。請參考第29圖,機器X接收對應於該LOCK物件之'acquire lock request',並查閱一鎖定的表格來決定對應於在每部機器上該複數個類似同等物件之鎖定狀態,其在附錄D2之例子中為該複數個類似同等LOCK物件。The method void acquireLock (java.lang.Object), part of the LockClient code of Appendix D4, and part of the Decentralized Execution Time System (DRT) 71, which performs communication operations between the machines M1...Mn, Coordinate the execution of the previous "monitorenter" synchronization job between the machines M1...Mn. The applyLock method of this example communicates with the LockServer code of Appendix D5 executed on machine X of Figure 15, by transmitting an 'acquire lock request' to the machine X corresponding to the object being locked (ie corresponding to the "monitorenter" "The object of the instruction", which is the 'LOCK' object in the text of Table XXI and Appendix D2. Please refer to Figure 29, machine X receives the 'acquire lock request' corresponding to the LOCK object, and consults a locked The table determines the lock status corresponding to the plurality of similarly equivalent items on each machine, which in the example of Appendix D2 is the plurality of similar equivalent LOCK objects.
如果在每部機器M1...Mn上所有的該等複數個類似同等物件目前並未任何其它機器M1...Mn鎖定,則機器X將會記錄該物件為現在鎖定,並通知該鎖定之成功取得的要求機器。另外,如果一類似同等物件目前由該等機器M1...Mn中另一個所鎖定,則機器X將會加入此要求機器到等待要鎖定此複數個類似同等物件之機器佇列中,直到當機器X決定此要求機器能夠取得該鎖定為止。對應於由一要求機器之成功取得一鎖定,即產生一回覆,並傳送到該成功要求的機器通知該機器已成功取得該鎖定。在收到這種來自機器X之訊息而確認成功取得一要求的鎖定之後,該acquireLock方法及作業終止執行,並傳回控制到該先前方法訊框,其為附錄D2之內文,即為該run()方法之執行中方法訊框。直到當該要求機器接收到來自機器X的一回覆而確認成功取得該要求的鎖定時,該acquireLock方法及run()方法之作業被暫停,直到收到一確認回覆。在此傳回作業之後,該run()方法之執行即重新開始。該acquireLock方法之具體實施例的範例性原始碼即提供在附錄D4中。附錄D4亦提供額外的關於DRT 71功能之細節。If all of the plurality of similar equivalents on each machine M1...Mn are not currently locked by any other machine M1...Mn, then Machine X will record the object as now locked and notify the lock. The machine that was successfully obtained. In addition, if a similar equivalent is currently locked by the other of the machines M1...Mn, the machine X will join the requesting machine until it waits for the machine to lock the plurality of equivalent objects until Machine X determines that this requires the machine to acquire the lock. Corresponding to a lock obtained by the success of a requesting machine, a reply is generated, and the machine transmitted to the successful request informs the machine that the lock has been successfully obtained. After receiving such a message from machine X and confirming the successful acquisition of a required lock, the acquireLock method and the job terminate execution, and return control to the previous method frame, which is the text of Appendix D2, that is, The method frame in the execution of the run() method. Until the requesting machine receives a reply from machine X and confirms that the lock was successfully obtained, the operations of the acquireLock method and the run() method are suspended until a confirmation reply is received. After the job is returned here, the execution of the run() method is restarted. An exemplary source code for a particular embodiment of the acquireLock method is provided in Appendix D4. Additional details on the DRT 71 function are also provided in Appendix D4.
稍後,兩個敘述"dup"及"invokestatic #24<Method void releaseLock(java.lang.Object)>"被插入到該碼串流中,位在該"18 aload_1"敘述之後及該"23 monitorexit"敘述之前。這兩個敘述使得該Java虛擬機器複製在該堆疊上的項目,然後引發該releaseLock方法將該堆疊的最上方項目做為該方法呼叫的一引數,並造成該run()方法之修正來執行該"releaseLock"方法及相關的作業,其相對應於以下的"monitorexit"指令,於該程序離開及傳回之前。Later, the two narratives "dup" and "invokestatic #24<Method void releaseLock(java.lang.Object)>" are inserted into the code stream, after the "18 aload_1" statement and the "23 monitorexit" "Before the narrative. These two narratives cause the Java virtual machine to copy the project on the stack, and then raise the releaseLock method to use the topmost item of the stack as an argument to the method call, and cause the run() method to be modified to execute The "releaseLock" method and related operations correspond to the following "monitorexit" instructions before the program leaves and returns.
該方法void releaseLock(java.lang.Object),附錄D4之LockClient碼之部份,及分散式執行時間系統(DRT)71之部份,其執行機器M1...Mn之間的通信作業,以協調該等機器M1...Mn之間的之後"monitorexit"同步化作業之執行。此範例的releaseLock方法通信於在第15圖之機器X上執行的附錄D5之LockServer碼,其藉由傳送一'release lock request"到對應於未鎖定之物件的機器X(即對應於該"monitorexit"指令的該物件),其在表XXI及附錄D2之內文中為該'LOCK'物件。對應於第30圖,機器X接收對應於該LOCK物件之"release lock request",並更新該等鎖定的表格,以指明對應於該等類似同等'LOCK'物件之鎖定狀態成為現在的「未鎖定」。此外,如果有其它機器等待取得此鎖定,則機器X能夠選擇該等等待機器中的一部成為該鎖定的新擁有者,藉由更新該鎖定表格,以指定此選擇的一部等待中機器成為該新的鎖定擁有者,並通知該等等待機器中成功的一個藉由一確認回覆其已成功地鎖定該鎖定。然後該等等待機器中成功的一部即重新開始執行其同步化例式。在通知機器X鎖定釋放之後,該releaseLock方法終止執行,並傳回控制到該先前方法訊框,其在此例中為該run()方法之方法訊框。在此傳回作業之後,該run()方法之執行重新開始。The method void releaseLock (java.lang.Object), part of the LockClient code of Appendix D4, and part of the Decentralized Execution Time System (DRT) 71, which performs communication operations between the machines M1...Mn, Coordinate the execution of the "monitorexit" synchronization job between these machines M1...Mn. The releaseLock method of this example communicates with the LockServer code of Appendix D5 executed on machine X of Figure 15 by transmitting a 'release lock request' to machine X corresponding to the unlocked object (ie corresponding to the "monitorexit" "The object of the instruction", which is the 'LOCK' object in the text of Table XXI and Appendix D2. Corresponding to Figure 30, Machine X receives the "release lock request" corresponding to the LOCK object and updates the locks. a table to indicate that the lock status corresponding to the similar equivalent 'LOCK' object becomes the current "unlocked". In addition, if another machine is waiting to acquire the lock, the machine X can select one of the waiting machines to become the new owner of the lock, by updating the lock table to specify that the selected one of the selected machines becomes The new lock owner and notifies the one of the waiting machines that one of the successful machines has successfully locked the lock by a confirmation reply. Then wait for a successful part of the machine to resume execution of its synchronization example. After notifying the machine X lock release, the releaseLock method terminates execution and returns control to the previous method frame, which in this example is the method frame of the run() method. After the job is returned here, the execution of the run() method is restarted.
其將可瞭解到該修正的碼在具有複數部電腦或運算機器之一分散式運算環境中允許機器M1...Mn之間該同步化例式或其它互斥運算之協調的作業,所以關於在該複數部機器M1...Mn上未修正的碼或程序之作業的問題(例如像是衝突、不想要的互動、競賽狀況、或由於事件的相對時間上未預期之關鍵相依性的異常行為)在當應用該修正的碼或程序時並不會發生。It will be appreciated that the modified code allows for the coordination of the synchronization instance or other mutually exclusive operations between the machines M1...Mn in a distributed computing environment having a plurality of computers or computing machines, so Problems with uncorrected code or program operations on the plurality of machines M1...Mn (eg, such as conflicts, unwanted interactions, race conditions, or abnormalities due to unanticipated critical dependencies of events over time) Behavior) does not occur when the modified code or program is applied.
在附錄D1之未修正的碼範例中,該應用程式碼包括在一包覆同步化例式內本地記憶體(用於一計數器)中增加一記憶體位置的指令或作業。該同步化例式之目的在於保證在多重執行緒及多重處理應用及電腦系統中該計數器記憶體增加作業的執行緒安全。該術語執行緒安全或執行緒安全性代表由某種互斥而多重同步執行所重新進入或保護的碼。在本發明內文中多重執行緒的應用可以例如包括在每一部不同的機器上同步執行的操作兩個或多個執行緒之應用。因此,在包含或具有複數部機器的環境中沒有管理的協調同步化,每個執行係同步執行相同的應用程式之部份,並具有第9,10,11,12及13圖之一記憶體更新及傳遞複製手段,每部電腦或運算機器將獨立地執行同步化,藉此可能同時增加該共享的計數器,造成可能的衝突或不想要的互動,例如該等機器M1...Mn之間的競賽狀況及不調和的記憶體。其將可瞭解到雖然此具體實施例係使用一共享的計數器來說明,使用或提供這種共享的計數器或記憶體位置為選擇性,且對於本發明之同步化態樣並不需要。較佳地是該同步化例式之行為方式做為該程式化語言、執行時間系統或機器架構(或其任何組合)保證,也就是說停止該應用程式之兩個部份(例如兩個執行緒)來同步執行相同的同步化例式或相同的互斥運算或運算子。清楚地一致性、調和及協調的同步化行為即該應用程式碼50之程式師或使用者預期要發生者。In the unmodified code example of Appendix D1, the application code includes instructions or jobs for adding a memory location to a local memory (for a counter) in a overlay synchronization instance. The purpose of this synchronization example is to ensure that the counter memory increases the thread security of the job in multiple threads and multiprocessing applications and computer systems. The term thread security or thread security represents a code that is re-entered or protected by a mutually exclusive and multiple simultaneous execution. The application of multiple threads in the context of the present invention may, for example, include the application of two or more threads that are executed concurrently on each different machine. Therefore, there is no coordinated coordination of management in an environment that contains or has a plurality of machines, each of which executes a portion of the same application simultaneously, and has a memory of the 9, 10, 11, 12, and 13 graphs. Update and transfer replication means that each computer or computing machine will perform synchronization independently, thereby potentially increasing the shared counters simultaneously, causing possible conflicts or unwanted interactions, such as between these machines M1...Mn Competition status and irreconcilable memory. It will be appreciated that while this particular embodiment uses a shared counter to illustrate, the use or provision of such shared counter or memory locations is optional and is not required for the synchronized aspects of the present invention. Preferably, the behavior of the synchronization example is guaranteed by the stylized language, execution time system or machine architecture (or any combination thereof), that is, stopping the two parts of the application (eg, two executions) To perform the same synchronization example or the same mutex operation or operator synchronously. Clearly consistent, reconciled, and coordinated synchronization behavior is the program or user of the application code 50 expected to occur.
所以,藉由DRT 71的好處,該應用碼50被修正成其由改變該同步化例式來載入到該機器中。其將此處所提供的說明之下可瞭解到對每部機器所做的該等修正通常可類似到這種程度,因為它們必須較佳地是達到所有機器之間協調的同步化作業的一致性最終結果;但是,給定該發明同步化方法及相關的程序之廣義應用性,該等修正之性質通常可以改變,而不會改變所產生的效應。例如,在一簡單變化中,一或多個額外的指令或敘述可被插入,例如像是一「非作業」(nop)型態指令到該應用中,其將代表所做的該等修正為技術上不同,但該修正的碼仍符合於本發明。例如本發明的具體實施例可以藉由程式轉換、轉譯、編譯的多種形式、測試或藉由其它在此處所述或本技術中已知者來實施該等改變。所做的該等改變(以粗體強調)為該同步化例式所執行的該開始或初始指令及該結束指令,且其分別對應於該同步化例式之該登錄項(開始)及離開(最後)。這些加入的指令(或修正的指令串流)用於協調在該複數部機器M1...Mn之每一部或某個子集合上執行的該修正執行方法當中多個同步執行之例證或事件之間的同步化例式之執行,其係藉由引發對應於該同步化例式之開始執行的acquireLock方法,並藉由引發對應於該同步化例式之結束執行的releaseLock方法,藉此提供在橫跨該複數部機器M1,M2,...Mn上執行之修正的應用程式碼之同時作業所需要的同步化例式之一致性協調的作業(或其它互斥運算或運算子)。此亦較佳地是提供了以一協調方式橫跨該等機器之一應用程式之作業。Therefore, with the benefit of the DRT 71, the application code 50 is modified to be loaded into the machine by changing the synchronization example. It will be understood from the description provided herein that such corrections made to each machine can generally be similar to this extent, as they must preferably be consistent with the coordinated synchronization of operations between all machines. The end result; however, given the broad applicability of the inventive synchronization method and associated procedures, the nature of the corrections can generally be changed without altering the effects produced. For example, in a simple variation, one or more additional instructions or narratives can be inserted, such as, for example, a "nop" type of instruction into the application, which will represent the corrections made to Technically different, but the modified code still conforms to the present invention. For example, a particular embodiment of the invention can be implemented by various means of program conversion, translation, compilation, testing, or by other means described herein or as known in the art. The changes (in bold) are the start or initial instructions and the end instructions executed by the synchronization example, and respectively correspond to the entry (start) and departure of the synchronization example (At last). These added instructions (or modified instruction streams) are used to coordinate instances or events of multiple executions of the modified execution method performed on each or a subset of the complex machines M1...Mn. The execution of the synchronization instance is initiated by causing an acquireLock method corresponding to the start of the synchronization instance and by initiating a releaseLock method corresponding to the end of the synchronization example. A coherently coordinated operation (or other mutually exclusive operation or operator) of synchronization instances required to operate simultaneously across the modified application code executed on the complex machine M1, M2, ... Mn. It is also preferred to provide an operation that spans one of the machines in a coordinated manner.
該DRT 71之取得鎖定(如"acquireLock()")方法採用一個引數("(java.lang.Ojbect)"),其代表參照(或某個其它唯一識別項)到該特定本地物件,其中需要該通用鎖定(請參見附錄D2及表XXI),其係要取得橫跨在對應於該指定的本地物件之其它機器上之複數個類似同等物件的一通用鎖定。例如該唯一識別項可為該物件的名稱、對有問題之物件的一參照、或是代表橫跨所有節點之該複數個類似同等物件之唯一編號。藉由使用橫跨所有連接之機器的一通用唯一識別項來代表在該複數部機器上複數個類似同等物件,該DRT可以同時支援多個物件之同步化,而不會混淆,因為該複數個物件已經被同步化,且其不會有物件(或類別)識別項不是唯一的狀況,藉由使用每個物件的唯一識別項來查閱在該共享的同步化表格中正確的記錄。The DRT 71 is locked (eg, the "acquireLock()") method takes an argument ("(java.lang.Ojbect)"), which represents a reference (or some other unique identifier) to that particular local object, where This generic lock is required (see Appendix D2 and Table XXI) to obtain a common lock across a plurality of similar equivalents on other machines corresponding to the specified local object. For example, the unique identifier may be the name of the object, a reference to the object in question, or a unique number representing the plurality of similar objects across all nodes. By using a universally unique identifier across all connected machines to represent a plurality of similar objects on the complex machine, the DRT can simultaneously support synchronization of multiple objects without confusion because of the plurality of The object has been synchronized, and it does not have an object (or category) identification item that is not unique, by using the unique identification of each item to look up the correct record in the shared synchronization table.
使用此處的一通用識別項的另一個好處為可做為在每一部機器上所有類似同等本地物件之'meta-name'的形式。例如,除了必須追跡每部機器上每個類似同等本地物件之每個唯一本地名稱之外,其另可定義一通用名稱(如"globalname7787"),其中每個本地機器依序對映到一本地物件(如“globalname7787”對應到機器M1上的物件“localobject456”,而“globalname7787”對應到機器M2上的物件“localobject885”,而“globalname7787”對應到機器M3上的物件“localobject111”,依此類推)然後其較容易來簡單地稱之為「對globalname7787取得鎖定」,然後轉譯到機器1(M1)上來表示「對localobject456取得鎖定」,並轉譯到機器2(M2)上來表示「對localobject885取得鎖定」等等。Another benefit of using a generic identifier here is that it can be used as a 'meta-name' for all similar native objects on each machine. For example, in addition to having to trace each unique local name for each similarly equivalent local object on each machine, it can also define a common name (such as "globalname7787"), where each local machine is sequentially mapped to a local The object (such as "globalname7787" corresponds to the object "localobject456" on the machine M1, and "globalname7787" corresponds to the object "localobject885" on the machine M2, and "globalname7787" corresponds to the object "localobject111" on the machine M3, and so on. It is then easier to simply call "lock on globalname7787", then translate it to machine 1 (M1) to indicate "lock on localobject456" and translate it to machine 2 (M2) to indicate "lock on localobject885" "and many more.
可視需要被使用的該共享同步化表格為一種表格,其它儲存手段,或任何其它資料結構可以儲存每個物件(及/或類別或其它資產)之一物件(及/或類別或其它資產)識別項及該同步化狀態(或鎖定或未鎖定狀態)。該表格或其它儲存手段用來關連一物件(及/或類別或其它資產、或複數個類似同等物件或類別或資產)到一鎖定狀態及一未鎖定狀態之鎖定或未鎖定或某個其它實體或邏輯表示的狀態。舉例而言:該表格(或所想要使用的任何其它資料結構)較佳地是可包括一命名的物件識別項,及代表是否一命名的物件(即"globalname7787")為鎖定或未鎖定之記錄。在一具體實施例中,該表格或其它儲存手段儲存了一旗標或記憶體位元,其中當該旗標或記憶體位元儲存一"0"時該物件為未鎖定,而當該旗標或記憶體位元儲存一"1"時,該物件為鎖定。很清楚地,多重位元或位元組儲存可以使用,且可以使用不同的邏輯概念或指標,其皆不背離本發明。The shared synchronization form that may be used as needed may be a form, and other storage means, or any other data structure, may store an object (and/or category or other asset) of each object (and/or category or other asset). Item and the synchronization status (or locked or unlocked status). The form or other means of storage is used to associate an object (and/or category or other asset, or a plurality of similar items or categories or assets) to a locked state and an unlocked state that is locked or unlocked or some other entity Or the state of the logical representation. For example: the form (or any other data structure that is intended to be used) preferably includes a named object identification item and an object representing whether the name is (ie, "globalname7787") is locked or unlocked. recording. In a specific embodiment, the form or other storage means stores a flag or a memory bit, wherein when the flag or memory bit stores a "0", the object is unlocked, and when the flag or When the memory bit stores a "1", the object is locked. Clearly, multiple bit or byte storage can be used, and different logical concepts or indicators can be used without departing from the invention.
該DRT 71可用數種方法中的任何一種來決定該物件之同步化狀態。其可想到例如本發明可包括實施執行緒安全的任何手段,不論是否其透過使用鎖定(鎖定/解鎖)、同步化、監視器、SEMPHAFORES,互斥鎖,或其它機制。這些代表停止或限制同步執行一單一應用程式的執行中部份,藉以保證根據同步化、鎖定或類似者之規則的一致性。較佳地是,其可依序要求每部機器如果對應於要被鎖定之被尋找的該物件之它們的本地類似同等物件(或類別或其它資產或資源)目前被同步化,且如果任何機器回覆為真時,則可暫停該同步化例式之執行,並等待直到在其它機器上目前同步化的類似同等物件為未同步化,否則在本地同步化此物件,並重新開始執行該同步化例式之執行。每部機器可以依本身的方式實施同步化(或互斥運算或運算子),且此在不同機器上可以不同。因此,雖然提供了一些範例性實施細節,最終同步化(或互斥運算)要如何實施,或同步化或互斥狀態(或鎖定/未鎖定狀態)要如何精確地記錄在記憶體或其它儲存手段中,並非本發明之關鍵。藉由未同步化,我們通常代表未鎖定,或未受到一互斥運算,而藉由同步化,我們通常代表被鎖定,並受到一互斥運算。The DRT 71 can use any of several methods to determine the synchronization state of the object. It is contemplated that the present invention, for example, can include any means of implementing thread security, whether or not it uses lock (lock/unlock), synchronization, monitor, SEMPHAFORES, mutex lock, or other mechanism. These representatives stop or limit the execution of a single application's execution portion to ensure consistency based on synchronization, locking, or similar rules. Preferably, it is sequentially required that each machine is currently synchronized if its local similar equivalent (or category or other asset or resource) corresponding to the object being sought to be locked, and if any machine When the reply is true, the execution of the synchronization instance can be suspended, and wait until the similarly equivalent object currently synchronized on other machines is unsynchronized, otherwise the object is synchronized locally and the synchronization is restarted. Execution of the example. Each machine can implement synchronization (or mutual exclusion operations or operators) in its own way, and this can be different on different machines. Thus, while some example implementation details are provided, how the final synchronization (or mutex operation) is implemented, or how the synchronization or mutex state (or locked/unlocked state) is accurately recorded in memory or other storage Among the means, it is not the key to the invention. By not synchronizing, we usually represent unlocked or unmuted, and by synchronization, we usually represent being locked and subject to a mutually exclusive operation.
另外,在每部本地機器上的DRT 71可以查閱一共享的記錄表(可能在一獨立機器上(例如在不同於機器M1,M2,...,Mn)之機器X上),或可查閱在該等本地機器中每一部上的一調和共享的記錄表格,或是建立在一記憶體中或其它儲存的共享資料庫,以決定是否此物件已經被標示或識別為被任何機器同步化(或「鎖定」),如果是的話,則等待直到該物件的狀態被改變為未鎖定,然後在此機器上取得該鎖定,否則藉由在該共享的鎖定表中標示該物件為鎖定(視此機器的需要)來取得該鎖定。In addition, the DRT 71 on each local machine can consult a shared record sheet (possibly on a separate machine (eg on machine X other than machines M1, M2, ..., Mn), or can be consulted A toned and shared record form on each of the local machines, or a shared library in a memory or other storage to determine if the object has been marked or identified as being synchronized by any machine. (or "lock"), if so, wait until the state of the object is changed to unlocked, then take the lock on the machine, otherwise the object is locked by marking it in the shared lock table (view) This machine needs to) get the lock.
在該共享的記錄表被查閱的狀況中,此可視為一共享資料庫或資料結構之變化,其中每部機器具有一共享表格的一本地複本(此為一共享表格的複本),其被更新來維持該等複數部機器M1,...,Mn之調和性。In the case where the shared record table is viewed, this can be viewed as a change in a shared repository or data structure, where each machine has a local copy of the shared form (this is a copy of the shared form) that is updated To maintain the harmony of the plurality of machine parts M1, ..., Mn.
在一具體實施例中,該共享的記錄表代表可由所有機器M1,...,Mn存取的一共享表格,其可例如被定義或被儲存在一共用存取資料庫中,使得任何機器M1,...,Mn可以查閱或讀取此共享的資料庫表格中一物件的鎖定或未鎖定狀態。另一種配置為實施一共享的記錄表為一額外機器之記憶體中的一表格(我們稱之為「機器X」),其儲存了每個物件識別名稱及其鎖定狀態,並做為該中央儲存區,其可由所有其它機器M1,...,MN 查閱或決定一類似同等物件的鎖定狀態。In a specific embodiment, the shared record table represents a shared form accessible by all machines M1, . . . , Mn, which may, for example, be defined or stored in a shared access database such that any machine M1,..., Mn can refer to or read the locked or unlocked state of an object in this shared database table. Another configuration is to implement a shared record table as a table in an additional machine's memory (which we call "machine X"), which stores each object identification name and its lock status as the center. storage area, which may be all other machines M1, ..., M N Now the lock state or a similar level decision object.
在任何這些不同的選擇性實施中,在該方法中一部或複數個類似同等物件被標示或識別為同步化(或鎖定)或未同步化(或未鎖定)相對並不重要,且可利用多種儲存的記憶體位元或位元組或旗標來識別該兩種可能邏輯狀態之中的一種,其為本技術中所熟知。其將可瞭解到在本具體實施例中,該同步化非常類似於鎖定,且未鎖定非常類似於未鎖定。這些相同的考量可應用於類別,亦可應用於其它資產或資源。In any of these various alternative implementations, it is relatively unimportant and available to identify or identify one or more similar equivalents in the method as being synchronized (or locked) or unsynchronized (or unlocked). A plurality of stored memory bits or bytes or flags are used to identify one of the two possible logic states, which are well known in the art. It will be appreciated that in this particular embodiment, the synchronization is very similar to locking, and unlocking is very similar to unlocking. These same considerations can be applied to categories and to other assets or resources.
請考慮到DRT 71負責決定一物件(或類別、或其它資產,對應於複數個類似同等物件或類別或資產)之鎖定狀態,其在允許對應於取得該鎖定的同步化例式要進行之前被鎖定。在此處所述的範例性具體實施例中,該DRT查閱該共享的同步化記錄表,其在一具體實施例中係存在於一特殊「機器X」上,因此該DRT需要透過該網路或其它通信鏈結或路徑與此機器X通信,以進行查詢,並決定該物件(或類別、或其它資產,對應於複數個類似同等物件或類別或資產)之鎖定(或未鎖定)狀態。Consider that the DRT 71 is responsible for determining the locked state of an object (or category, or other asset, corresponding to a plurality of similar equivalent objects or categories or assets) that is allowed before the synchronization instance corresponding to the acquisition is allowed to proceed. locking. In the exemplary embodiment described herein, the DRT refers to the shared synchronization record table, which in a specific embodiment exists on a special "machine X", so the DRT needs to pass through the network. Or other communication link or path communicates with the machine X to make an inquiry and determine the locked (or unlocked) state of the object (or category, or other asset, corresponding to a plurality of similar equivalent objects or categories or assets).
如果在嘗試要執行一同步化例式或其它互斥運算的本地機器上的DRT決定了目前沒有其它機器具有此物件(即無其它機器已經同步化此物件)或複數個類似同等物件中任何其它者的一鎖定,則要在取得對應於所有其它機器上該複數個類似同等物件之此物件的鎖定,例如藉由修正尋求要被鎖定之該物件的鎖定狀態之共享表格中的相對應登錄項,或另外依序取得除了目前機器之外在所有其它機器上所有其它類似同等物件上的鎖定。請注意到此程序係要鎖定在所有其它機器M1,...,Mn上該複數個類似同等物件(或類別或資產),所以可以防止由兩部或多部機器同時或同步使用任何類似同等物件,並可使用任何可用的方法來完成此協調的鎖定。例如,不論是否機器M1指示M2來鎖定其類似同等本地物件,則指示M3鎖定其類似同等本地物件,然後指示M4等等;或如果M1指示M2鎖定其類似同等本地物件,則M2指示M3鎖定其類似同等本地物件,然後M3指示M4鎖定其類似同等本地物件,依此類推,其要想到的是在所有其它機器上該等類似同等物件之鎖定,所以可以防止兩部或多部機器同時或同步使用任何類似同等物件。僅有在當此機器已經成功地確認沒有其它機器目前已經鎖定一類似同等物件,且此機器相對應地已經鎖定其本地類似同等物件,即可開始執行該同步化例式或碼區塊。If the DRT on the local machine attempting to perform a synchronization or other mutual exclusion operation determines that no other machine currently has this object (ie no other machine has synchronized the object) or any of a number of similar equivalents A lock of the person is to obtain a lock corresponding to the object corresponding to the plurality of equivalent objects on all other machines, for example, by correcting the corresponding entry in the shared form that seeks the locked state of the object to be locked. Or, in addition, sequentially acquire locks on all other similar equivalents on all other machines except the current machine. Please note that this program is to lock the same number of equivalent items (or categories or assets) on all other machines M1,..., Mn, so that it is possible to prevent any similar or equivalent use of two or more machines simultaneously or simultaneously. Objects and can use any available method to accomplish this coordinated lock. For example, whether or not machine M1 instructs M2 to lock its similar peer local object, instructs M3 to lock it like an equivalent local object, then instructs M4, etc.; or if M1 instructs M2 to lock it like an equivalent local object, then M2 instructs M3 to lock it Similar to an equivalent local object, then M3 instructs M4 to lock its equivalent to an equivalent local object, and so on, it is thought of locking these similar objects on all other machines, so that two or more machines can be prevented from being simultaneously or simultaneously Use any similar equivalent. The synchronization example or code block can only be executed when the machine has successfully confirmed that no other machine has currently locked a similar object and that the machine has correspondingly locked its local equivalent.
另一方面,如果在將要執行一同步化例式的機器(如機器M1)內的DRT 71決定了另一部機器(如機器M4)已經同步化一類似同等物件,則此機器M1要延遲該同步化例式(或碼區塊)之持續的執行,直到當在機器M1上的DRT可以確認沒有其它機器(例如機器M2,M3,M4,或M5,...,Mn當中)目前正在對一相對應的類似同等本地物件執行一同步化例式,且此機器M1已經相對應地在本地同步化其類似同等物件。請注意本地同步化代表在一單一機器上先前技術的習用同步化,然而通用或協調的同步化代表在複數部機器M1...Mn中的一部之上橫跨類似同等本地物件及/或在其之間的協調之同步化。在該例中,該同步化例式(或碼區塊)不是要繼續執行,直到此機器M1可以保證沒有其它機器M2,M3,M4,...,Mn正在執行要被尋找來鎖定之本地類似同等物件之一同步化例式,因為其將可能會破壞了橫跨該等參與機器M1,M2,M3,...,Mn的物件,其係由於受到衝突或其它不想要的互動,例如競賽狀況、及由於同步化例式之同步執行所產生的類似問題。因此,當該DRT決定此物件或在另一部機器上一類似同等物件目前被「鎖定」,例如被機器M4(相對於所有其它機器),在機器M1上的DRT暫停該同步化例式之執行,其藉由暫停該取得鎖定(如acquireLock())之執行作業直到當一相對應釋放鎖定(如releaseLock())作業由該鎖定的目前擁有者(如機器M4)執行。On the other hand, if the DRT 71 in the machine (e.g., machine M1) that is about to execute a synchronization example determines that another machine (e.g., machine M4) has synchronized a similar object, the machine M1 is to delay the Synchronization of the continuous execution of the example (or code block) until the DRT on the machine M1 can confirm that no other machines (eg, machines M2, M3, M4, or M5, ..., Mn) are currently in the process A corresponding similar local object performs a synchronization example, and the machine M1 has correspondingly synchronized its similar equivalents locally. Note that local synchronization represents the prior art synchronization of synchronization on a single machine, whereas general or coordinated synchronization represents spanning similar equivalent local objects and/or over one of the complex machines M1...Mn. Synchronization of coordination between them. In this example, the synchronization example (or code block) is not to be executed until the machine M1 can guarantee that no other machines M2, M3, M4, ..., Mn are performing localizations to be sought to lock. Synchronization of a similar example of one of the equivalents, as it would potentially destroy objects across the participating machines M1, M2, M3, ..., Mn due to conflicts or other unwanted interactions, such as Contest status, and similar issues arising from simultaneous execution of synchronized instances. Therefore, when the DRT determines that the object or a similar object on another machine is currently "locked", for example by machine M4 (relative to all other machines), the DRT on machine M1 suspends the synchronization example. Execution, by suspending the execution of the lock (eg, acquireLock()) until a corresponding release lock (eg, releaseLock()) job is executed by the current owner of the lock (eg, machine M4).
因此,在執行一釋放鎖定(如releaseLock())作業時,目前「擁有」或保持一鎖定(即正執行一同步化例式)之機器M4指出其同步化例式的關閉,例如藉由標示此物件成為「未鎖定」在該共享的鎖定狀態表中,或另外依序釋放在所有其它機器上取得的鎖定。此時,等待要開始執行一暫停的同步化敘述之一不同機器即可宣稱此現在釋放的鎖定之擁有權,其藉由重新開始其延遲(即延後)的"acquireLock()"作業的執行,例如藉由標示其本身為執行在該共享的同步化狀態表格中此類似同等物件的一鎖定,或另外依序取得在每部其它機器上類似同等物件之本地鎖定。其要瞭解到該取得鎖定(如"acquireLock")之重新開始的執行即要包括該取得鎖定(如"acquireLock")執行之選擇性重新開始,此時執行即暫停,以及另外選擇性的配置,其中該取得鎖定(如"acquireLock")之執行作業被重複,藉以重新要求該鎖定。再次地,這些相同的考慮亦應用於類別,更概言之為應用到任何資產或資源。Therefore, when performing a release lock (such as a releaseLock()) job, the machine M4 that currently "owns" or keeps a lock (ie, is performing a synchronization routine) indicates that the synchronization instance is closed, for example by marking This object becomes "unlocked" in the shared lock status table, or otherwise releases the locks acquired on all other machines. At this point, waiting for a different machine to start executing a paused synchronization statement can claim ownership of the now released lock by restarting the execution of its delayed (ie, delayed) "acquireLock()" job. For example, by indicating itself as a lock on the equivalent object in the shared synchronization state table, or otherwise obtaining a local lock similar to the equivalent on each other machine. It is to be understood that the restart of the acquisition lock (such as "acquireLock") includes the selective restart of the acquisition lock (such as "acquireLock"), the execution is suspended, and the optional configuration, The execution of the lock (eg "acquireLock") is repeated to re-request the lock. Again, these same considerations apply to categories, and more generally to any asset or resource.
所以,根據至少一具體實施例及取得該DRT 71之作業的好處,該應用碼50被修正為藉由改變該同步化例式(包含至少一開始"acquire lock"型態指令(例如一JAVA"monitorenter"指令)及一結束"release lock"型態指令(例如一JAVA"monitorexit"指令)被載入到該機器中。"Acquire lock"型態指令進行一互斥運算的作業或執行,其通常對應於一特定資產,例如一特定記憶體位置或機器資源,並造成對應於該互斥運算之資產相對於一些或所有同時或同步使用的模式、執行或作業而鎖定。"Release lock"型態指令終止或是中斷進行一互斥運算的作業或執行,其通常對應於一特定資產,例如一特定記憶體位置或機器資源,並造成對應於該互斥運算之資產相對於一些或所有同時或同步使用的模式、執行或作業而解鎖。所做的改變(以粗體強調)為該同步化例式所執行的該等修正的指令。例如這些加入的指令檢查如果此鎖定已經被另一部機器取得。如果此鎖定尚未被另一部機器取得,則此機器之DRT通知所有其它機器此機器已經取得該指定的鎖定,藉此停止其它機器執行對應於此鎖定的同步化例式。Therefore, in accordance with at least one embodiment and the benefit of the operation of the DRT 71, the application code 50 is modified to change the synchronization example (including at least one start "acquire lock" type instruction (eg, a JAVA). The monitorenter "instruction" and an "release lock" type instruction (such as a JAVA "monitorexit" instruction) are loaded into the machine. The "Acquire lock" type instruction performs a mutually exclusive operation or execution, which is usually Corresponds to a particular asset, such as a particular memory location or machine resource, and causes the asset corresponding to the mutually exclusive operation to be locked with respect to some or all of the modes, executions, or jobs used simultaneously or synchronously. "Release lock" type An instruction terminates or interrupts a job or execution that performs a mutually exclusive operation, which typically corresponds to a particular asset, such as a particular memory location or machine resource, and causes the asset corresponding to the mutually exclusive operation to be relative to some or all of the simultaneous or Unlocked using the mode, execution, or job used synchronously. The changes made (in bold) are the instructions for the corrections performed by the synchronization example. For example, these added The instruction checks if the lock has been taken by another machine. If the lock has not been taken by another machine, the DRT of the machine notifies all other machines that the machine has obtained the specified lock, thereby stopping other machine executions corresponding to A synchronized example of this lock.
該DRT 71可決定並記錄類似同步物件之鎖定狀態,或其它複數部機器上相對應記憶體位置或機器或軟體資源,其可用多種方式,例如像是藉由例示但非限制:1.對應於機器M1中一同步化例式的該登錄項,機器M1之DRT個別地查閱或傳遞每部機器來確定如果此通用鎖定已經由不同於其本身的任何其它機器M2,...,Mn所取得。如果對應於此資產或物件之此通用鎖定為或已經由該等機器M2,...,Mn中另一部取得,則機器M1之DRT暫停在機器M1上同步化例式之執行,直到所有其它機器不再擁有在此資產或物件上的一通用鎖定(意即沒有其它機器不再擁有對應於此資產或物件之一通用鎖定),此時機器M1可成功地取得該通用鎖定,使得所有其它機器M2,...,Mn現在必須等待機器M1在一不同機器可以依序取得它之前釋放該通用鎖定。否則,當其決定出對應於此資產或物件之通用鎖定尚未由另一部機器M2,...,Mn取得時,該DRT繼續執行該同步化例式之執行,且使得所有其它機器M2,...,Mn現在必須等待機器M1在一不同機器可依序取得它之前來釋放該通用鎖定。The DRT 71 can determine and record the locked state of a similar synchronized object, or the corresponding memory location or machine or software resource on other plurality of machines, which can be used in a variety of ways, such as by way of example but not limitation: 1. Corresponding to In a synchronized instance of the entry in machine M1, the DRT of machine M1 individually consults or passes each machine to determine if this universal lock has been obtained by any other machine M2,..., Mn different from itself. . If the universal lock corresponding to this asset or object is or has been taken by another of the machines M2,..., Mn, the DRT of machine M1 suspends execution of the synchronized instance on machine M1 until all Other machines no longer have a universal lock on this asset or object (meaning that no other machine no longer has a universal lock corresponding to one of the assets or objects), at which point machine M1 can successfully acquire the universal lock, making all The other machines M2,..., Mn must now wait for the machine M1 to release the universal lock before a different machine can take it in sequence. Otherwise, when it determines that the universal lock corresponding to the asset or object has not been taken by another machine M2,..., Mn, the DRT continues to perform the execution of the synchronization example and causes all other machines M2, ..., Mn must now wait for machine M1 to release the universal lock before a different machine can acquire it in sequence.
另外,2.對應於一同步化例式之登錄項,該DRT查閱一共享的記錄表格(例如一共享的資料庫、或在每部參與機器上一共享表格的一複本),其代表如果任何機器目前「擁有」此通用鎖定。如果是的話,則該DRT暫停在此機器上的同步化例式之執行,直到沒有機器擁有在一類似同等物件上一通用鎖定。否則該DRT記錄此機器在該共享的表格中(或表格,如果有多個記錄表格,如在多重機器上)成為此通用鎖定的擁有者,然後繼續執行該同步化例式。In addition, 2. corresponding to a synchronization example of the entry, the DRT refers to a shared record form (such as a shared database, or a copy of a shared form on each participating machine), if any The machine currently "owns" this universal lock. If so, the DRT suspends the execution of the synchronization instance on this machine until no machine has a universal lock on a similar object. Otherwise the DRT records that the machine becomes the owner of this universal lock in the shared table (or table, if there are multiple record tables, such as on multiple machines), and then proceeds to the synchronization instance.
類似地,當釋放一通用鎖定時,也就是說,當一同步化例式之執行要結束時,該DRT可以「不記錄」,改變該狀態指標,及/或用許多其它方式來重置該機器之通用鎖定狀態,例如藉由例示而非限制:1.對應於一同步化例式的離開,該DRT個別地通知每部其它機器具不再擁有該通用鎖定。Similarly, when a general lock is released, that is, when the execution of a synchronization instance is about to end, the DRT can "not record", change the status indicator, and/or reset the status in many other ways. The general lock state of the machine, for example by way of illustration and not limitation: 1. Corresponding to the departure of a synchronized instance, the DRT individually informs each of the other appliances that they no longer possess the universal lock.
另外,2.對應於一同步化例式之離開,該DRT更新該記錄給此通用鎖定的資產或物件(例如像是複數個類似同等物件或資產)在該共享的記錄表格中,使得此機器不再記錄為擁有此通用鎖定。In addition, 2. corresponding to the departure of a synchronization example, the DRT updates the record to the universally locked asset or object (such as, for example, a plurality of similar objects or assets) in the shared record table, such that the machine It is no longer recorded as having this universal lock.
另外,該DRT可提供一取得通用鎖定佇列來排列需要取得一通用鎖定之機器,例如藉由例示但非限制:1.對應於由機器M1之對一同步化例式之登錄項,如機器M1的DRT,其通知該通用鎖定之目前擁有的機器M1(如機器M4)在由該目前擁有機器釋放時將會或需要來取得該相對應通用鎖定,藉以執行一作業。該指定的機器M4,如果沒有其它等待中機器,則儲存該要求機器的(如機器M1)有興趣或要求的記錄在一表格或表列中,使得機器M4可以知道後續要釋放該相對應通用鎖定,其中記錄在該表格或表列中的機器M1正等待要取得相同的通用鎖定,其在離開了對應於由機器M4所保有的該通用鎖定之同步化例式之後,即通知在該等等待機器記錄中所指定的該等待機器(即機器M1)可以取得該通用鎖定,且因此機器M1可以進行來取得該通用鎖定,並繼續執行其本身的同步化例式。In addition, the DRT can provide a universal lock queue to arrange for a machine to obtain a universal lock, for example by way of illustration but not limitation: 1. Corresponding to a log-in synchronization example of the machine M1, such as a machine The DRT of M1, which notifies the currently-owned machine M1 of the universal lock (such as machine M4), will or need to obtain the corresponding universal lock when released by the currently owned machine, thereby performing a job. The designated machine M4, if there is no other waiting machine, stores the records of the requested machine (such as the machine M1) that are of interest or demand in a table or list, so that the machine M4 can know that the corresponding corresponding release is to be released. Locking, wherein the machine M1 recorded in the table or table column is waiting for the same universal lock to be obtained, after leaving the synchronization instance corresponding to the universal lock held by the machine M4, Waiting for the waiting machine (ie machine M1) specified in the machine record to take the universal lock, and thus machine M1 can proceed to take the universal lock and continue to execute its own synchronization routine.
2.對應於由機器1之一同步化例式的該登錄項,該DRT通知該通用鎖定之目前擁有者(如機器M4)一特定機器(如機器M1)將會在由該機器(即機器M4)釋放時來取得該鎖定。該機器M4在其查詢此鎖定物件之等待機器之記錄之後找到已經有一或多部其它機器(如機器M2及M7)在等待,即加入機器M1到想要取得此鎖定的物件之該機器M2及M7之表列末端,或是另外傳送來自M1之要求到該第一等待中機器(即機器M2),或任何其它等待中機器(即機器M7),然後其依序記錄機器M1在等待中機器之它們的表格或記錄中。2. Corresponding to the entry by the synchronization instance of one of the machines 1, the DRT notifies the current owner of the universal lock (such as machine M4) that a particular machine (such as machine M1) will be in the machine (ie machine) M4) Release the lock to obtain. The machine M4 finds that one or more other machines (such as machines M2 and M7) are waiting after it has queried the record of the waiting machine for the locked object, that is, joining the machine M1 to the machine M2 that wants to acquire the locked object. The end of the M7 list, or otherwise transfer the request from M1 to the first waiting machine (ie machine M2), or any other waiting machine (ie machine M7), and then record the machine M1 in the waiting machine In their form or record.
在上述的範例中,例如該等記錄可以保持在機器M4上,並儲存一佇列或其它有順序的或索引的機器表列,其等待要在機器M4釋放其所保有之鎖定之後來取得該鎖定。然後此表列或佇列可由M4使用或參照,所以M4可傳送該鎖定到其它機器上,其係根據該要求順序或任何其它優先性的方案。另外,該表列可以為沒有順序,且機器M4可傳送該通用鎖定到該表列或記錄中的任何機器。In the above examples, for example, the records may remain on the machine M4 and store a queue or other ordered or indexed machine list that is waiting to be acquired after the machine M4 releases the lock it holds. locking. This list or queue can then be used or referenced by M4, so M4 can transfer the lock to other machines in accordance with the order of the requirements or any other preferred scheme. Additionally, the list of columns can be unordered, and machine M4 can transfer the generic lock to any machine in the list or record.
3.對應於一同步化例式之登錄項,該DRT記錄其本身在一共享的記錄表格中(例如儲存在可由所有機器存取的一共享資料庫中的一表格,或實質上類似的多個獨立表格)。3. Corresponding to a synchronization example entry, the DRT record itself in a shared record form (eg, stored in a shared database accessible by all machines, or substantially similar) Separate forms).
再者或另外,該DRT 71可通知被佇列之其它機器來取得對應於由此機器的一同步化例式之離開的此通用鎖定,其可用以下的數種方式,例如:1.對應於一同步化例式之離開,該DRT通知該等等待中機器中的一部(例如在該等待機器之佇列中的第一部機器)該通用鎖定被釋放。In addition or in addition, the DRT 71 can notify other machines that are queued to obtain this universal lock corresponding to the departure of a synchronization instance of the machine, which can be used in the following ways, for example: 1. Corresponding to Upon exit of a synchronization instance, the DRT notifies one of the waiting machines (e.g., the first machine in the queue of the waiting machine) that the universal lock is released.
2.對應於一同步化例式之離開,該DRT通知該等待中機器中的一部(例如在該等待機器之佇列中第一部機器)該通用鎖定被釋放,且額外地提供整個機器佇列的一複本(例如等待此通用鎖定的第二機器及後續機器)。依此方式,該第二機器由該第一機器繼承了該等待機器表列,並藉此保證該等待機器之佇列的連續性,成為在該表列中依序以下的每部機器取得並後續釋放相同的通用鎖定。2. Corresponding to the departure of a synchronization instance, the DRT notifies a part of the waiting machine (eg, the first machine in the queue of the waiting machine) that the universal lock is released and additionally provides the entire machine A copy of the queue (for example, the second machine and subsequent machines waiting for this universal lock). In this way, the second machine inherits the waiting machine list by the first machine, and thereby ensures the continuity of the queue of the waiting machine, and is obtained by each machine below the order in the table column. The same universal lock is subsequently released.
在上述的細查期間,"monitorenter"及"monitorexit"指令(或方法)初始時尋找,且在找到時,插入一修正碼,藉以喚起一修正的同步化例式。此修正的例式額外地取得及釋放該通用鎖定。有數種不同的模式,其中可以進行此修正及載入。During the above-mentioned scrutiny, the "monitorenter" and "monitorexit" instructions (or methods) are initially searched, and when found, a correction code is inserted to evoke a modified synchronization example. This modified example additionally acquires and releases the universal lock. There are several different modes in which this correction can be made and loaded.
由第15圖可看出,對於第8圖之一般性配置之修正提供了機器M1,M2...Mn皆如同以前,並在所有機器M1...Mn上同時或同步地執行相同的應用碼50(或許多碼)。但是,先前的配置由一伺服器機器X的供應所修正,其方便地能夠供應管家函數,例如且特別是結構、資產及資源之同步化。這種伺服器機器X可為一低價值商用電腦,例如PC,因為其運算負擔較低。如第15圖中虛線所示,兩部伺服器機器X及X+1可以為了冗餘的目的來提供,以增加該系統之整體可靠度。當提供這兩種伺服器機器X及X+1時,它們較佳地是但可視需要操作成一不會失效環境中的冗餘機器。As can be seen from Fig. 15, the modification of the general configuration of Fig. 8 provides that the machines M1, M2...Mn are as before, and the same application is executed simultaneously or synchronously on all machines M1...Mn. Code 50 (or many codes). However, the previous configuration was modified by the provision of a server machine X, which was convenient to be able to supply housekeeping functions, such as, in particular, synchronization of structures, assets and resources. This server machine X can be a low value commercial computer, such as a PC, because of its low computational load. As indicated by the dashed lines in Figure 15, the two server machines X and X+1 can be provided for redundancy purposes to increase the overall reliability of the system. When both server machines X and X+1 are provided, they are preferably, but can be operated as, redundant machines in a non-failed environment.
其不需要提供一伺服器機器X,因為其運算負擔可以分散到機器M1,M2...Mn上。另外,由一部機器所操作的一資料庫(在一主控者/受控者種類作業中)可以用於管家功能。It does not need to provide a server machine X because its computational load can be spread over the machines M1, M2...Mn. In addition, a database operated by a machine (in a master/controlled class job) can be used for housekeeping functions.
第16圖所示為要遵循的一較佳泛用程序。在已經進行載入161之後,要執行的該等指令被視為在序列中,且所有同步化例式被偵測成如步驟162中所示。在該JAVA語言中,這些為"monitorenter"及"monitorexit"指令,且方法標示為在該方法描述器中同步化。其它語言使用不同的術語。Figure 16 shows a preferred general procedure to follow. After the load 161 has been performed, the instructions to be executed are considered to be in the sequence, and all synchronization instances are detected as shown in step 162. In the JAVA language, these are "monitorenter" and "monitorexit" instructions, and the methods are marked as synchronized in the method descriptor. Other languages use different terms.
當一同步化例式被偵測162時,其在步驟163中被修正,藉以橫跨該複數部機器M1...Mn之一致性、協調、及調和的同步化作業(或其它互斥運算),基本上係藉由插入其它指令到該同步化(或其它互斥)例式,以例如在在該複數部機器M1...Mn中其它一或多部上類似同等同步化或其它互斥運算協調之間的同步化例式之作業,所以沒有兩部或多部機器立即或重疊地執行一類似同等同步化或其它互斥運算。另外,該等修正指令可以插入在該例式之前,例如像是在相關於一同步化例式之指令或作業之前。一旦該修正步驟163已經完成該載入程序,由載入該等修正的應用碼繼續,以取代該未修正的應用碼,如在步驟164中所指。該等修正較佳地是採用的形式為「在所有其它機器上取得鎖定」,及一「在所有其它機器上釋放鎖定」修正,如步驟163中所指。When a synchronization instance is detected 162, it is modified in step 163 to synchronize, coordinate, and reconcile the synchronization operations (or other mutual exclusion operations) across the complex machines M1...Mn. Basically, by inserting other instructions into the synchronization (or other mutually exclusive) example, for example, similar synchronization or other mutuals on the other one or more of the complex machines M1...Mn The operation of the synchronization example between the operations is coordinated, so no two or more machines perform a similar equal synchronization or other mutual exclusion operation immediately or overlappingly. In addition, the correction instructions can be inserted before the example, such as before an instruction or job related to a synchronization example. Once the modification step 163 has completed the loading procedure, the application code loaded with the corrections continues to replace the uncorrected application code, as indicated in step 164. The corrections are preferably in the form of "lock on all other machines" and a "release lock on all other machines" correction, as indicated in step 163.
第27圖所示為一修正的特定形式。首先,該等結構、資產或資產(在JAVA中稱之為類別或物件,例如50A,50X-50Y)或更概言之「鎖定」成為同步化,其已經被配置一名稱或標籤(例如一通用名稱或標籤),其可用來識別在每部機器M1...Mn上相對應的類似同等本地物件或資產或資源或鎖定,如步驟172所指。此較佳地是發生在當該等類別或物件原始被初始化時。此最為方便地是透過由伺服器機器X所維護的一表格來完成。此表格亦包括該類別或物件或鎖定的該同步化狀態。其將可瞭解到此表格或其它資料結構僅可儲存該同步化狀態,或其亦可儲存其它狀態或資訊。在該較佳具體實施例中,此表格亦包括一佇列配置,其儲存了已經要求使用此資產或鎖定的機器之識別。Figure 27 shows a specific form of a correction. First, the structures, assets or assets (referred to as categories or objects in JAVA, such as 50A, 50X-50Y) or more generally "locked" become synchronized, which have been configured with a name or label (eg one A generic name or label) that can be used to identify similar equivalent local objects or assets or resources or locks on each machine M1...Mn, as indicated by step 172. This preferably occurs when the categories or objects are originally initialized. This is most conveniently accomplished by a form maintained by the server machine X. This form also includes the synchronization status of the category or object or lock. It will be appreciated that this form or other data structure may only store the synchronized state, or it may store other states or information. In the preferred embodiment, the table also includes a queue configuration that stores the identification of the machine that has requested the use of the asset or lock.
如第27圖之步驟173中所示,接著一"acquire lock"要求被傳送到機器X,在其之後,該傳送機器等待確認鎖定取得,如步驟174中所示。因此,如果該通用名稱已經被鎖定(即一相對應類似本地資產由除了提出要取得該鎖定的該機器之外的另一部機器獨特地使用),則此代表該相對應物件或類別或資產或鎖定之提出的同步化例式必須被暫停,直到相對應物件或類別或資產或鎖定由目前擁有者解鎖。As shown in step 173 of Figure 27, an "acquire lock" request is then transmitted to machine X, after which the transfer machine waits for an acknowledgment lock acquisition, as shown in step 174. Thus, if the generic name has been locked (ie, a corresponding local asset is uniquely used by another machine other than the machine that is proposing the lock), then this represents the corresponding object or category or asset. Or the proposed synchronization instance of the lock must be suspended until the corresponding object or category or asset or lock is unlocked by the current owner.
另外,如果該通用名稱並未鎖定,此代表沒有其它機器獨特地使用一類似同等類別、物件、資產或鎖定,並確認立刻收到鎖定取得。在收到確認鎖定取得之後,該同步化例式之執行被允許來繼續,如步驟175中所示。In addition, if the generic name is not locked, this means that no other machine uniquely uses a similar category, object, asset, or lock, and confirms that the lock was received immediately. After receiving the acknowledgment lock acquisition, execution of the synchronization modality is allowed to continue, as shown in step 175.
第28圖顯示了由想要放棄一鎖定的應用程式執行機器所依循的程序。該初始步驟在步驟181中指出。此提出機器之作業係暫時地由步驟183,184中斷,直到該回覆自機器X接收到,對應於步驟184,並執行,然後重新開始,如步驟185中所指。視需要,並如步驟182中所示,要求釋放一鎖定的機器即進行尋找此鎖定之「通用名稱」,其在機器X進行一要求之前。依此方式,在多部機器上多重鎖定可被取得及釋放,而不會彼此干擾。Figure 28 shows the program followed by the execution of the machine by the application that wants to give up a lock. This initial step is indicated in step 181. The operation of the proposed machine is temporarily interrupted by steps 183, 184 until the reply is received from machine X, corresponding to step 184, and executed, and then restarted, as indicated in step 185. If desired, and as shown in step 182, the release of a locked machine is required to find the "common name" for the lock, before the machine X makes a request. In this way, multiple locks can be acquired and released on multiple machines without interfering with each other.
第29圖所示為回應於一"acquire lock"查詢(第27圖)而由機器X進行的活動。在步驟191中接收一"acquire lock"要求之後,該鎖定狀態於步驟192及193中決定,且如果否的話,該命名的資源並不自由,或另為「鎖定」,該查詢機器之識別在步驟194中被加入到(或形成)等待取得要求之佇列。另外,如果該答案為是,該命名的資源為自由及「未鎖定」,該相對應回覆在步驟197中被傳送。然後該等待查詢機器即能夠藉由進行第27圖之步驟175依此執行該同步化例式。除了該是的回應之外,該共享的表格在步驟196中被更新,所以該通用命名的資產之狀態即改變為「鎖定」。Figure 29 shows the activity performed by machine X in response to an "acquire lock" query (Figure 27). After receiving an "acquire lock" request in step 191, the locked state is determined in steps 192 and 193, and if not, the named resource is not free, or otherwise "locked", the query machine is identified Step 194 is added to (or formed) a queue waiting to be obtained. In addition, if the answer is yes, the named resource is free and "unlocked" and the corresponding reply is transmitted in step 197. The waiting query machine can then execute the synchronization example by performing step 175 of Figure 27 accordingly. In addition to the response to the yes, the shared form is updated in step 196, so the state of the universally named asset is changed to "locked".
第30圖所示為由機器X回應於第28圖之"release lock"要求而進行的活動。在步驟201中收到一"release lock"要求之後,機器X依需要及較佳地是確認要求要釋放該通用鎖定之機器的確是該鎖定的目前擁有者,如步驟202中所指。接著,該佇列狀態在步驟203中決定,且如果沒有一個在等待取得此鎖定,機器X標示此鎖定為「未擁有」(或「未鎖定」)在該共享表格中,如步驟207中所示,並視需要傳送一釋放的確認回到該要求中機器,如步驟208所示。此使得該要求中機器執行第28圖之步驟185。Figure 30 shows the activities performed by Machine X in response to the "release lock" requirement of Figure 28. After receiving a "release lock" request in step 201, machine X, as needed and preferably confirms that the machine that is required to release the universal lock is indeed the current owner of the lock, as indicated in step 202. Then, the queue status is determined in step 203, and if none is waiting to acquire the lock, machine X indicates that the lock is "not owned" (or "unlocked") in the shared table, as in step 207. And return a confirmation of the release to the requesting machine as needed, as shown in step 208. This causes the machine in the request to perform step 185 of Figure 28.
另外,如果是的話,也就是說其它機器正等待來取得此鎖定,機器X標示此鎖定成為現在由該佇列中下一部機器所取得,如步驟204中所示,然後傳送鎖定取得之確認到步驟205中該佇列的機器,然後自該等待機器之佇列中移除該新鎖定擁有者,如在步驟206中所示。In addition, if so, that is, other machines are waiting to acquire the lock, machine X indicates that the lock is now taken by the next machine in the queue, as shown in step 204, and then the confirmation of the transfer lock is obtained. The machine in the queue in step 205 is then removed from the queue of the waiting machine, as shown in step 206.
對於修正同步化例式(或其它互斥運算或運算子)來協調複數部機器M1...Mn之間的作業之基本觀念,有數種不同方式或具體實施例當中此協調、調和及一致性同步化(或其它互斥)作業觀念、方法及程序可以進行或實施。There are several different ways or specific embodiments for coordinating, reconciling, and cohering the basic concepts of correcting synchronization instances (or other mutually exclusive operations or operators) to coordinate operations between complex machines M1...Mn. Synchronization (or other mutually exclusive) job concepts, methods, and procedures can be implemented or implemented.
在第一具體實施例中,一特定機器,如機器M2,載入該資產(例如類別或物件),其包括一同步化例式,修正它,然後將修正的資產(或類別或物件)載入到每一部其它的機器上M1,M3,...Mn(其可依序或同時,或根據任何其它順序、例式或程序),其具有包含該新修正的同步化例式之修正的資產(或類別或物件)。請注意到對應於該應用碼中僅一個物件可以有一或複數個例式,或對應於在該應用碼中的複數個物件可有複數個例式。請注意到在一具體實施例中,被載入的該同步化例式為二元化可執行物件碼。另外,被載入的該同步化例式為可執行的中間碼。In a first embodiment, a particular machine, such as machine M2, loads the asset (e.g., category or object), which includes a synchronization example, fixes it, and then loads the modified asset (or category or object) Enter M1, M3, ... Mn (which may be sequential or simultaneous, or according to any other order, example or procedure) on each of the other machines, with corrections to the synchronization example containing the new correction Asset (or category or object). Please note that there may be one or more instances corresponding to only one object in the application code, or a plurality of instances corresponding to a plurality of objects in the application code. Please note that in a specific embodiment, the synchronized instance loaded is a binary executable object code. In addition, the synchronization example loaded is an executable intermediate code.
在此配置中,其可使用術語「主控者/受控者」,每部受控(或次級)機器M1,M3,...Mn載入該修正的物件(或類別),並包含由該主控(或主要)機器(例如機器M2,或某個其它機器,如第15圖中之機器X)在該電腦通信網路或其它通信鏈結或路徑上傳送給它的新修正的同步化例式。在對於此「主控者/受控者」或「主要/次級」配置的些微變化中,該電腦通信網路可由一共用的儲存裝置所取代,例如一共用的檔案系統、或一共用的文件/檔案儲存區,例如一共用的資料庫。In this configuration, the term "master/controller" can be used, and each controlled (or secondary) machine M1, M3, ... Mn loads the corrected object (or category) and contains Newly modified by the master (or primary) machine (eg machine M2, or some other machine, such as machine X in Figure 15) on the computer communication network or other communication link or path Synchronization example. In some minor changes to this "master/controller" or "primary/secondary" configuration, the computer communication network may be replaced by a shared storage device, such as a shared file system, or a shared File/file storage area, such as a shared database.
請注意到在每部機器或電腦上執行的修正不需要且經常不會是相同或類似。其所需要的是它們係以足夠類似的方式被修正,而其係根據此處所述之創新原理,該複數部機器之每一步對於其它機器為一致性且調和性地完成此處所述的作業及目的。再者,在此處所提供之說明之下將可瞭解到有大量的方法可以實施修正,例如可以根據該特定硬體、架構、作業系統、應用程式碼、或類似者或其它因素而定。其亦可瞭解到本發明之具體實施例可以在一作業系統內、或在任何作業系統之外或不具有其好處,在該虛擬機器內,在一EPROM內,在一軟體、韌體,或是這些的任何組合當中來實施。Please note that the corrections performed on each machine or computer are not required and often not the same or similar. What is needed is that they are modified in a sufficiently similar manner, and in accordance with the innovative principles described herein, each step of the plurality of machines performs consistently and harmonically for the other machines described herein. Homework and purpose. Furthermore, it will be appreciated from the description provided herein that there are numerous ways in which modifications can be implemented, such as depending on the particular hardware, architecture, operating system, application code, or the like or other factors. It will also be appreciated that embodiments of the present invention may or may not have the benefit of being within an operating system, or within any operating system, within an EPROM, in a software, firmware, or It is implemented in any combination of these.
在此「主控者/受控者」或「主要/次級」配置的另一種變化中,機器M2載入資產(例如類別或物件),包含一(或甚至一或多個)初始化例式,以未修正形式在機器M2上,然後(例如機器M2或每個本地機器)修正該類別(或物件或資產),藉由整體或部份自該資產(或類別或物件)中刪除該同步化例式,並藉由一電腦通信網路或其它通信鏈結或路徑載入該資產的修正碼,其在其它機器上具有現在修正或刪除的同步化例式。因此,在該修正並非該資產同步化例式的一轉換、測試、轉譯或編譯時,而是在所有機器中除了一部之外之上刪除該同步化例式。In another variation of the "master/controller" or "primary/secondary" configuration, machine M2 loads an asset (such as a category or object) containing one (or even one or more) initialization instances. , in uncorrected form on machine M2, and then (for example, machine M2 or each local machine) correct the category (or object or asset) by removing the synchronization from the asset (or category or object) in whole or in part A modified version of the asset is loaded by a computer communication network or other communication link or path, which has a synchronized version of the current correction or deletion on other machines. Therefore, when the correction is not a conversion, test, translation or compilation of the asset synchronization example, the synchronization example is deleted on all but one of all machines.
整個刪除該同步化例式之處理可以由該「主控」機器(例如機器M2或某個其它機器,例如第15圖之機器X)或另由每個其它機器M1,M3,...,Mn在收到該未修正資產時來執行。此「主控者/受控者」或「主要/次級」配置的額外變化係要使用一共享的儲存裝置,例如一共享的檔案系統,或一共享的文件/檔案儲藏處,例如一共享的資料庫,用於在機器M1,M2,...,Mn及選擇性第15圖之機器X之間交換該資產、類別或物件的碼(包括例如該修正的碼)。The entire process of deleting the synchronization instance may be performed by the "master" machine (e.g., machine M2 or some other machine, such as machine X of Fig. 15) or by each of the other machines M1, M3, ..., Mn is executed when the uncorrected asset is received. Additional changes to this "master/controlled" or "primary/secondary" configuration are to use a shared storage device, such as a shared file system, or a shared file/archive repository, such as a share A database for exchanging codes of the asset, category or object (including, for example, the modified code) between the machines M1, M2, ..., Mn and the machine X of the selective Fig. 15.
在又另外的具體實施例中,每部機器M1,...,Mn接收該未修正的資產(例如類別或物件),其中包含有一或多個同步化例式,但修正該例式,然後載入包含有現在修正的例式之資產(例如類別或物件)。雖然一種機器(例如該主控或主要機器)可以顧客化或執行一不同的修正到傳送給每部機器之同步化例式,此具體實施例更可立即使得由每部機器所進行之修正略微不同,並基於其特定的機器架構、硬體、處理器、記憶體、組態、作業系統或其它因素來改進、顧客化及/或最佳化,然而仍類似、調和並與其它機器一致於所有其它類似的修正及特性,其不需要一定類似或相同。In still other embodiments, each machine M1, . . . , Mn receives the uncorrected asset (eg, category or object), including one or more synchronization instances, but corrects the example, and then Load an asset (such as a category or object) that contains a current modified example. While a machine (e.g., the master or primary machine) can customize or perform a different correction to a synchronized instance delivered to each machine, this embodiment can immediately make minor corrections made by each machine. Different, and improved, customized, and/or optimized based on their specific machine architecture, hardware, processor, memory, configuration, operating system, or other factors, yet still similar, reconciled, and consistent with other machines All other similar corrections and features need not necessarily be similar or identical.
在另一配置中,一特定機器(如M1)載入該未修正的資產(例如類別或物件),其包括一或多個同步化例式,且所有其它機器M2,M3,...,Mn執行一修正或刪除該資產的同步化例式(例如類別或物件),並載入該修正的版本。In another configuration, a particular machine (e.g., M1) loads the uncorrected asset (e.g., category or object), which includes one or more synchronization instances, and all other machines M2, M3, ..., Mn performs a correction or deletion of the synchronization instance of the asset (eg, category or object) and loads the revised version.
在所述之所有具體實施例中,供應或傳送該資產碼(例如類別碼或物件碼)給該等機器M1,...Mn者,且視需要包含第15圖的一機器X,其可分支、分散或傳送於不同機器之任何組合或排列之間;例如藉由提供直接機器對機器通信(例如直接由M2供應每部M1,M3,M4等),或藉由提供或使用一串接或序列性通信(例如M2供應M1,其然後供應M3,然後供應M4,依此類推),或是該直接及串接及/或序列性的組合。In all of the specific embodiments described, the asset code (eg, a category code or an object code) is supplied or transmitted to the machines M1, . . . Mn, and a machine X of FIG. 15 is included as needed. Branching, decentralizing or transmitting between any combination or arrangement of different machines; for example by providing direct machine-to-machine communication (eg, supplying each M1, M3, M4, etc. directly from M2), or by providing or using a serial connection Or serial communication (eg, M2 supplies M1, which then supplies M3, then M4, and so on), or the combination of direct and concatenated and/or serial.
在又另一種配置中,該等機器M1到Mn可以傳送一些或所有載入要求到一額外的機器X(例如參見第15圖之具體實施例),其可執行對該應用碼50之修正,包括一個(及可能複數個)初始化例式,其透過上述任何一種方法,並傳回該修正的應用碼,其包括對於每部機器M1到Mn之現在修正的初始化例式,且這些機器依序載入該修正的應用碼,其包括本地修正的例式。在此配置中,機器M1到Mn傳送所有載入要求到機器X,其傳回一修正的應用程式碼50到每部機器,其包括修正的同步化例式。由機器X所執行的該等修正可包括本發明之範圍所涵蓋的任何修正。此配置在應用到其它機器之前當然可應用到此處所述的某些機器及其它配置。In still another configuration, the machines M1 through Mn can transmit some or all of the loading requirements to an additional machine X (see, for example, the specific embodiment of Figure 15), which can perform the correction of the application code 50, Including one (and possibly plural) initialization routines, which pass any of the above methods, and return the modified application code, including the current modified initialization equation for each machine M1 to Mn, and these machines are sequentially The modified application code is loaded, including a local modified example. In this configuration, machines M1 through Mn transfer all load requests to machine X, which returns a modified application code 50 to each machine, which includes a modified synchronization pattern. Such modifications performed by machine X may include any modifications encompassed by the scope of the invention. This configuration can of course be applied to some of the machines and other configurations described herein before being applied to other machines.
在運算技術中的專業人士將可知道多種可能的技術,其可用於修正電腦碼,其包括但不限於測試、程式轉換、轉譯、或編譯手段。Those skilled in the art will be aware of a variety of possible techniques that can be used to modify computer code including, but not limited to, testing, program conversion, translation, or compilation means.
一種這樣的技術係對該應用碼進行修正,而不需要該應用碼之語言的一先前或後續改變。另一種這樣的技術係要轉換該原始碼(例如JAVA語言原始碼)成為一中介表示(或中介碼語言或虛擬碼),例如JAVA位元組碼。一旦此轉換發生之後,對該位元組碼做修正,然後可倒轉該轉換。此提供了修正的JAVA碼所需要的結果。One such technique is to modify the application code without requiring a prior or subsequent change in the language of the application code. Another such technique is to convert the source code (eg, JAVA language source code) into an intermediary representation (or intermediate code language or virtual code), such as a JAVA byte code. Once this conversion occurs, the byte code is corrected and the conversion can be reversed. This provides the results needed for the modified JAVA code.
另一種可能的技術為轉換該應用程式為機器碼,其可直接由原始碼、或透過前述的中介語言、或透過某些其它中介手段。然後該機器碼在被載入及執行之前被修正。另一種這樣的技術為轉換該原始碼為一中介代表,因此被修正及後續被轉換成機器碼。Another possible technique is to convert the application to machine code, either directly from the source code, or through the aforementioned intermediate language, or through some other intermediary means. The machine code is then corrected before being loaded and executed. Another such technique is to convert the source code into an intermediary representation, thus being modified and subsequently converted to machine code.
本發明包含所有這些修正程序,以及兩個、三個或甚至更多這種程序的組合。The present invention encompasses all of these correction procedures, as well as combinations of two, three or even more such programs.
現在已經說明的結構、程序、電腦程式碼及工具,及一多重電腦系統及運算方法的其它態樣及特徵,其利用至少一個記憶體管理及複製物件初始化、最終化及同步化,其可立即瞭解到這些亦可視需要但較佳地是應用在任何組合中。Structures, programs, computer programs and tools, and other aspects and features of a multiple computer system and computing method, which utilize at least one memory management and copy object initialization, finalization, and synchronization, It is immediately understood that these may also be needed, but are preferably applied in any combination.
其亦可瞭解到本發明之記憶體管理、初始化、最終化及/或同步化態樣可被序列性或順序性或平行地實施或應用。例如,其中該碼正被細查或分析來識別或偵測關於初始化的特定碼段落,相同的分析或細查亦可嘗試來識別或偵測關於最終化(或例如同步化)之碼段落。另外,個別順序性(或可能重疊)分析及細查可用來個別地偵測關於初始化及最終化及同步化之碼。任何對該碼所需要的修正亦可組合地或獨立地執行,再者,部份可以共同地執行,而其它部份被獨立地執行。It can also be appreciated that the memory management, initialization, finalization, and/or synchronization aspects of the present invention can be implemented or applied serially or sequentially or in parallel. For example, where the code is being scrutinized or analyzed to identify or detect a particular code segment for initialization, the same analysis or scrutiny may also attempt to identify or detect a code segment regarding finalization (or, for example, synchronization). In addition, individual sequential (or possibly overlapping) analysis and scrutiny can be used to individually detect codes for initialization and finalization and synchronization. Any modifications required for the code may also be performed in combination or independently, and further, portions may be performed collectively while other portions are executed independently.
現在已經說明了該記憶體管理及複製、初始化、最終化及同步化的態樣之後,現在將注意力導引到一範例性作業方案,其例示的方法中在兩部電腦上應用程式可用一致性調和的方式來同時執行相同的應用程式。Now that the memory management and replication, initialization, finalization, and synchronization aspects have been described, attention is now directed to an exemplary work scenario in which the application is consistent on both computers. A sexually harmonized way to execute the same application at the same time.
在此方面,請注意到第31-33圖,所示為兩部膝上型電腦101及102。該等電腦101及102不需要相同,且實際上其可為一IBM或IBM複製品,而另一個可為一APPLE電腦。該等電腦101及102具有兩個螢幕105,115,兩個鍵盤106,116,但僅有單一滑鼠107。該兩部機器101,102藉由一單一同軸電纜或雙絞線纜線314來互連。In this regard, please note Figures 31-33 showing two laptops 101 and 102. The computers 101 and 102 need not be identical, and in fact they may be an IBM or IBM replica and the other may be an APPLE computer. The computers 101 and 102 have two screens 105, 115, two keyboards 106, 116, but only a single mouse 107. The two machines 101, 102 are interconnected by a single coaxial cable or twisted pair cable 314.
兩個簡單應用程式被下載到每部機器101,102上,該等程式被修正成它們如上述地被載入。在此具體實施例中,該第一應用為一簡單計算機程式,並造成一計算機108之影像被顯示在該螢幕105上。該第二程式為一繪圖程式,其顯示了四種顏色的區塊109,其為不同顏色,並在一長方形方塊310內隨機移動。再次地,於載入之後,該方塊310即顯示在螢幕105上。每個應用獨立地作業,所以該等區塊109在該螢幕105上隨機移動,然而在該計算機108內的數字可與一數學運算子(例如加法或乘法)一起被選擇(利用滑鼠107),所以該計算機108顯示該結果。Two simple applications are downloaded to each of the machines 101, 102, and the programs are modified so that they are loaded as described above. In this embodiment, the first application is a simple computer program and causes an image of a computer 108 to be displayed on the screen 105. The second program is a drawing program that displays blocks 109 of four colors, which are of different colors, and are randomly moved within a rectangular block 310. Again, after loading, the block 310 is displayed on the screen 105. Each application operates independently, so the blocks 109 are randomly moved on the screen 105, however the numbers in the computer 108 can be selected along with a mathematical operator (e.g., addition or multiplication) (using the mouse 107) So the computer 108 displays the result.
該滑鼠107可用來「抓取」該方塊310,並移動它到右邊而橫跨該螢幕105並到該螢幕115上,藉以到達在第32圖中所例示的狀況。在此配置中,該計算機應用在機器101上執行,然而該繪圖應用造成在方塊310之顯示正在機器102上進行。The mouse 107 can be used to "grab" the block 310 and move it to the right across the screen 105 and onto the screen 115 to arrive at the condition illustrated in Figure 32. In this configuration, the computer application is executed on machine 101, however the drawing application causes the display at block 310 to be on machine 102.
但是,如在第33圖中所示,其有可能藉由該滑鼠107來拖曳該計算機108到右方,如第32圖所示,藉以使得該計算機108的一部份由每個螢幕105,115顯示。類似地,該方塊310可藉由該滑鼠107拖曳到左方,如第32圖所示,所以該方塊係由每個螢幕105,115部份顯示,如第33圖所示。在此組態中,該計算機運算的部份正在機器101及機器102上的一部份之上執行,然而該繪圖應用之部份正在進行該機器101,且其餘的則在機器102上進行。However, as shown in Fig. 33, it is possible to drag the computer 108 to the right by the mouse 107, as shown in Fig. 32, whereby a portion of the computer 108 is provided by each screen 105, 115. display. Similarly, the block 310 can be dragged to the left by the mouse 107, as shown in Fig. 32, so the block is partially displayed by each of the screens 105, 115, as shown in Fig. 33. In this configuration, the portion of the computer operation is being executed on a portion of machine 101 and machine 102, however, part of the drawing application is in progress with machine 101 and the remainder is performed on machine 102.
前述僅說明本發明的一些具體實施例及修正,本技術專業人士將可瞭解到,其可在不背離本發明之範圍之下來進行。例如,參照到JAVA同時包括JAVA語言,以及JAVA平台及架構。The foregoing description is only illustrative of specific embodiments and modifications of the invention, and it will be understood by those skilled in the art that the invention can be practiced without departing from the scope of the invention. For example, reference to JAVA includes both the JAVA language and the JAVA platform and architecture.
在所有做說明的修正例證中,其中該應用碼50在之前修正、或在載入期間、或甚至在載入之後但在執行該未修正應用碼已經進行了執行之前,其要瞭解到該修正的應用碼被載入來取代及執行來取代該未修正的應用碼,再後續到要被執行的該等修正。In all of the illustrated illustrative examples, where the application code 50 was previously modified, or during loading, or even after loading but before the execution of the unmodified application code has been performed, it is understood that the correction is known. The application code is loaded to replace and execute to replace the uncorrected application code, and then to the corrections to be performed.
另外,在修正是發生在載入之後及已經進行了該未修正應用碼的執行之後的狀況中,其要瞭解到該未修正的應用碼可以由整個修正的應用碼取代,對應於正在執行的修正,或另外該未修正的應用碼可以部份取代,或遞增地成為要逐漸在該執行中未修正的應用碼時執行該等修正。不論如何使用這些修正程序,後續要被執行的該等修正即執行來取代該未修正的應用碼。In addition, in the case that the correction occurs after the loading and after the execution of the unmodified application code has been performed, it is understood that the unmodified application code can be replaced by the entire modified application code, corresponding to the ongoing execution. The correction, or otherwise the uncorrected application code, may be partially replaced, or incrementally implemented as an application code that is to be gradually unmodified in the execution. Regardless of how these correction procedures are used, subsequent amendments to be executed are executed to replace the uncorrected application code.
使用在本發明中所述的一通用識別項的好處的形式為在該複數部機器M1,...,Mn的每一部上所有類似同步本地物件(或類別或資產或資源或類似者)的"meta-name"或"meta-identity"。例如,除了必須追跡在該複數個類似同等物件的每一部機器上每個類似同等本地物件的每個唯一本地名稱或識別項,其另可定義或使用對應於在每部機器上該複數個類似同等物件的一通用名稱(如"globalname7787"),並瞭解到每部機器關連該通用名稱到一特定本地名稱或物件(如對應於機器M1上物件"localobject456"之"globalname7787",及對應於機器M2上物件"localobject885"之"globalname7787",及對應於機器M3上物件"localobject111"之"globalname7787"等等)。The benefit of using a universal identification item as described in the present invention is in the form of all similarly synchronized local objects (or categories or assets or resources or the like) on each of the plurality of machines M1, ..., Mn. "meta-name" or "meta-identity". For example, in addition to having to trace each unique local name or identification of each similarly equivalent local object on each of the plurality of equivalent objects, it may additionally be defined or used corresponding to the plurality of machines on each machine. a generic name like the equivalent object (such as "globalname7787"), and know that each machine associates the common name to a specific local name or object (such as "globalname7787" corresponding to the object "localobject456" on machine M1, and corresponds to "globalname7787" of the object "localobject885" on the machine M2, and "globalname7787" corresponding to the object "localobject111" on the machine M3, etc.).
那些在程式領域中的專業人士將可知道當額外的碼或指令被插入到一既有碼或指令組當中來修正相同、既有碼或指令組時,將會需要另外的修正(例如像是藉由重新編號序列的指令),所以可滿足偏移、分支、屬性、記上及類似者。Those skilled in the programming field will know that when additional code or instructions are inserted into an existing code or instruction set to correct the same, existing code or instruction set, additional corrections will be required (eg, By renumbering the sequence of instructions, offsets, branches, attributes, notes, and the like can be satisfied.
類似地,在該JAVA語言中,記憶體位置包括例如欄位及陣列型態。上述的說明處理了欄位,且陣列型態所需要的改變基本上為相同的適當修正。同時本發明可同等應用到類似的程式化語言(包括程序化、宣告化及物件導向)到JAVA,包括Microsoft.NET平台及架構(Visual Basic,Visual C/C+ + ,and C#)FORTRAN,C/C+ + ,COBOL,BASIC等)。Similarly, in the JAVA language, memory locations include, for example, field and array types. The above description deals with the fields, and the changes required for the array pattern are essentially the same appropriate corrections. Meanwhile, the invention can equally be applied to similar stylized language (including procedural, object-oriented and declaring of) to JAVA, including Microsoft.NET platform and architecture (Visual Basic, Visual C / C + +, and C #) FORTRAN, C /C + + , COBOL, BASIC, etc.).
前述的配置中更新記憶體位置或欄位值之JAVA碼被修正,其係基於假設該執行時間系統(如以C及JAVA寫成的JAVA HOTSPOT VIRTUAL MACHINE)或該作業系統(例如以C及組合語言寫成的LINUX)。其每部機器M1...Mn將通常更新在該本地機器(如M2)上的記憶體,但並未在任何相對應的其它機器上(M1,M3...Mn)。其有可能留下該JAVA碼,其可更新記憶體位置或未修改的欄位數值,且另外修改該LINUX或HOTSPOT例式可在本地更新記憶體,所以其相對應地亦更新在所有其它機器上的記憶體。為了包含這種配置,此處所使用的術語「更新傳遞例式」配合維持基本上相同的所有機器M1...Mn之記憶體,其可瞭解到包含在其範圍內同時該JAVA putfield及putstatic指令及相關的作業,及該JAVA putstatic及putstatic之「組合」以及執行記憶體更新之LINUX或HOTSPOT碼段落。The JAVA code for updating the memory location or field value in the aforementioned configuration is modified based on the assumption that the execution time system (such as JAVA HOTSPOT VIRTUAL MACHINE written in C and JAVA) or the operating system (for example, in C and combined language) Written as LINUX). Each of its machines M1...Mn will typically update the memory on the local machine (eg M2), but not on any other machine (M1, M3...Mn). It is possible to leave the JAVA code, which can update the memory location or the unmodified field value, and additionally modify the LINUX or HOTSPOT instance to update the memory locally, so it is correspondingly updated on all other machines. The memory on it. In order to include such a configuration, the term "update transfer modality" as used herein is used in conjunction with memory that maintains substantially the same machine M1...Mn, which can be understood to be included in its range while the JAVA putfield and putstatic instructions And related operations, and the "combination" of the JAVA putstatic and putstatic and the LINUX or HOTSPOT code paragraph to perform memory update.
前述的具體實施例中該JAVA初始化例式之碼被修正,其係係基於假設該執行時間系統(如以C及JAVA寫成的JAVA HOTSPOT VIRTUAL MACHINE)或該作業系統(例如以C及組合語言寫成的LINUX),其每部機器M1...Mn將會呼叫該JAVA初始化例式。其有可能不修訂該JAVA初始化例式,而另外修訂該LINUX或HOTSPOT例式會呼叫該JAVA初始化例式,所以如果已經載入該物件或類別,則該JAVA初始化例式並不會被呼叫。為了包含這種配置,該術語「初始化例式」要瞭解為在其範圍內同時包含JAVA初始化例式及該JAVA初始化例式與該LINUX或HOTSPOT碼段落之「組合」,其將呼叫或初始化該JAVA初始化例式。In the foregoing specific embodiment, the code of the JAVA initialization example is modified based on the assumption that the execution time system (such as JAVA HOTSPOT VIRTUAL MACHINE written in C and JAVA) or the operating system (for example, written in C and combined language) LINUX), each machine M1...Mn will call the JAVA initialization example. It is possible not to revise the JAVA initialization example, and otherwise modify the LINUX or HOTSPOT instance to call the JAVA initialization example, so if the object or category has already been loaded, the JAVA initialization instance will not be called. In order to include such a configuration, the term "initialization routine" is understood to include both a JAVA initialization routine and a "combination" of the JAVA initialization instance with the LINUX or HOTSPOT code segment within its scope, which will call or initialize the JAVA initialization example.
前述的具體實施例中該JAVA最終化例式或清除例式之碼被修正,其係係基於假設該執行時間系統(如以C及JAVA寫成的JAVA HOTSPOT VIRTUAL MACHINE)或該作業系統(例如以C及組合語言寫成的LINUX),其每部機器M1...Mn將會呼叫該JAVA最終化例式。其有可能不修訂該JAVA最終化例式,而另外修訂該LINUX或HOTSPOT例式,其會呼叫該JAVA最終化例式,所以如果並不是要刪除該物件或類別,則該JAVA最終化例式並不會被呼叫。為了包含這種配置,該術語「最終化例式」要瞭解為在其範圍內同時包含JAVA最終化例式及該JAVA最終化例式與該LINUX或HOTSPOT碼段落之「組合」,其將呼叫或初始化該JAVA最終化例式。In the foregoing specific embodiment, the code of the JAVA finalization or clearing example is modified based on the assumption that the execution time system (such as JAVA HOTSPOT VIRTUAL MACHINE written in C and JAVA) or the operating system (for example, C and the combined language written in LINUX), each machine M1...Mn will call the JAVA finalization example. It is possible not to revise the JAVA finalization example, but to modify the LINUX or HOTSPOT instance, which will call the JAVA finalization example, so if the object or category is not to be deleted, the JAVA finalization example Will not be called. In order to include such a configuration, the term "finalization" is to be understood to include both the JAVA finalization modality and the "combination" of the JAVA finalization modality with the LINUX or HOTSPOT code segment within its scope, which will call Or initialize the JAVA finalization example.
前述的具體實施例中該JAVA同步化例式之碼被修正,其係係基於假設該執行時間系統(如以C及JAVA寫成的JAVA HOTSPOT VIRTUAL MACHINE)或該作業系統(例如以C及組合語言寫成的LINUX),其每部機器M1...Mn通常將會取得在該本地機器上的該鎖定(如M2),但不會在任何其它機器(M1,M3...Mn)上。其有可能留下該JAVA同步化例式未修訂,且另修訂在本地取得該鎖定之LINUX或HOTSPOT例式,所以其相對應地亦取得在所有其它機器上的該鎖定。為了包含這種配置,該術語「同步化例式」要瞭解為在其範圍內同時包含JAVA同步化例式及該JAVA同步化例式與該LINUX或HOTSPOT碼段落之「組合」,其將會執行鎖定取得及釋放。The code of the JAVA synchronization example is modified in the foregoing specific embodiment, and the system is based on the assumption that the execution time system (such as JAVA HOTSPOT VIRTUAL MACHINE written in C and JAVA) or the operating system (for example, in C and combined language) Write LINUX), each machine M1...Mn will usually get the lock on the local machine (such as M2), but not on any other machine (M1, M3...Mn). It is possible to leave the JAVA synchronization example unmodified, and to revise the LINUX or HOTSPOT instance that obtains the lock locally, so it correspondingly also obtains the lock on all other machines. In order to include such a configuration, the term "synchronization example" is understood to include both a JAVA synchronization instance and a "combination" of the JAVA synchronization pattern and the LINUX or HOTSPOT code segment within its scope. Perform lock acquisition and release.
此處所使用的術語物件及類別係由JAVA環境中得到,且要包括由不同環境得到的類似術語,例如動態鏈結庫(DLL),或物件碼包裝、或功能單元或記憶體位置。The terms and categories used herein are derived from the JAVA environment and include similar terms derived from different environments, such as dynamic link libraries (DLLs), or object code packages, or functional units or memory locations.
多種手段相對於本發明之具體實施例來做說明,其包括例如但不限於鎖定手段,分散的執行時間手段、修正子或修正手段、傳遞手段、分散更新手段、計數器手段、同步化手段及類似者。在本發明至少一具體實施例中,這些多種手段中任何一個或每一個皆可由電腦程式碼敘述或指令來實施(可能包括有複數個電腦程式碼敘述或指令),其可在電腦邏輯電路、處理器、ASIC、微處理器、微控制器或其它邏輯之內執行,以修正這種邏輯或電路之作業,以完成所引述的作業或功能。在另一具體實施例中,這些多種手段中任何一個或每一個皆可實施成韌體,且在其它具體實施例中這些可實施成硬體。再者,在本發明至少一具體實施例中,這些多種手段中任何一個或每一個皆可由電腦程式軟體、韌體及/或硬體之組合所實施。Various means are described with respect to specific embodiments of the present invention, including, but not limited to, locking means, decentralized execution time means, corrector or correction means, transfer means, distributed update means, counter means, synchronization means, and the like. By. In at least one embodiment of the present invention, any one or each of these various means may be implemented by computer code descriptions or instructions (which may include a plurality of computer code descriptions or instructions), which may be in a computer logic circuit, Execution within a processor, ASIC, microprocessor, microcontroller, or other logic to modify the operation of such logic or circuitry to perform the recited operations or functions. In another embodiment, any or each of these various means can be implemented as a firmware, and in other embodiments these can be implemented as a hardware. Furthermore, in at least one embodiment of the invention, any or each of these various means can be implemented by a combination of computer software, firmware and/or hardware.
前述之方法、程序及/或程式中任何或每一個皆可較佳地是實施成為一電腦程式及/或電腦程式產品,而可儲存在任何有形的媒體上,或存在於電子、信號或數位形式。這種電腦程式或電腦程式產品分別包含指令,及/或組織成模組、程式、子例式、或以任何其它方式來在處理邏輯中執行,例如在一處理器中、或一電腦、電腦機器或資訊家電的微處理器中;該電腦程式或電腦程式產品修正該電腦之作業,其中其執行或在一電腦上,而與其結合、連接或是以信號通信之電腦上存在有或執行該電腦程式或電腦程式產品。這種電腦程式或電腦程式產品修正該電腦、電腦機器及/或資訊家電之作業及架構性結構,以改變該電腦之技術作業,並實現了此處所述的技術效應。Any or each of the foregoing methods, procedures and/or programs may preferably be implemented as a computer program and/or computer program product, and may be stored on any tangible medium or in an electronic, signal or digital position. form. The computer program or computer program product includes instructions and/or organized into modules, programs, sub-examples, or in any other manner for execution in processing logic, such as in a processor, or a computer or computer. In a microprocessor of a machine or information appliance; the computer program or computer program product corrects the operation of the computer, wherein the computer is executed or executed on a computer, coupled to, connected to, or otherwise communicated with the computer Computer program or computer program product. The computer program or computer program product corrects the operation and architectural structure of the computer, computer machine and/or information appliance to change the technical operation of the computer and achieve the technical effects described herein.
因此本發明可包括一電腦程式產品,其包含一組儲存在一儲存媒體上的程式指令,或電子式存在於任何形式中,並可用來允許複數部電腦來執行任何的方法、程序、例式或類似者,如此處所述,並包含在申請專利範圍中的任一項。Accordingly, the present invention may comprise a computer program product comprising a set of program instructions stored on a storage medium, or electronically stored in any form, and operable to allow a plurality of computers to execute any method, program, or example. Or similar, as described herein, and included in any of the scope of the patent application.
再者,本發明可包括複數部電腦,其透過一通信網路或其它通信鏈結或路徑來互連,且其每一個用實質上同時或同步執行一應用程式碼的相同或不同的部份,其係撰寫來僅在電腦之相對應的不同一部上的一單一電腦上作業,其中該電腦被程式化來執行在本說明書中所述之任何一種方法、程序或例式,或是在任何的申請專利範圍中所提出,或在載入有一電腦程式產品者。Furthermore, the present invention can include a plurality of computers interconnected by a communication network or other communication link or path, each of which performs the same or different portions of an application code substantially simultaneously or simultaneously. , which is written to work only on a single computer on a different part of the computer, where the computer is programmed to perform any of the methods, procedures, or examples described in this specification, or Anyone who claims to be in the scope of the patent application or who is loaded with a computer program product.
如在此處所使用之該術語「包含」(及其文法之變化形)係用於做為「具有」或「包括」的意含,且並不排除「僅包含有」的排除性意義。The term "comprising" (and variations of its grammar) as used herein is used to mean "having" or "including" and does not exclude the exclusive meaning of "including".
本專利說明書及附錄形成為其一部份,其包含有受到著作權保護的內容。該著作權擁有者(即為申請人)不拒絕為了檢閱的目的而由公開取得的相關專利局檔案來重製此專利說明書或相關的內容,但另外保留所有相關的著作權。特別是,該等多種指令並不能在沒有著作權擁有者的特定書面允許之下被輸入到一電腦中。This patent specification and appendices form part of it, which contains copyrighted content. The copyright owner (ie, the applicant) does not refuse to reproduce the patent specification or related content from publicly available related patent office files for review purposes, but retains all related copyrights. In particular, such instructions cannot be entered into a computer without the specific written permission of the copyright owner.
附錄appendix
A,B,C,DA, B, C, D
附錄AAppendix A
下述為JAVA語言中的程式表列:The following is a list of programs in the JAVA language:
A1.該第一摘錄為根據第10圖之步驟92及103之修正子51的修正碼之例示的一部份。其搜尋整個應用程式碼50之碼陣列,且當其偵測到一記憶體操縱指令(即JAVA語言及虛擬機器環境中一putstatic指令(opcode 178))時,其由插入一"alert"例式來修正該應用程式碼。A1. This first excerpt is a part of the illustration of the correction code of the corrector 51 according to steps 92 and 103 of FIG. It searches the code array of the entire application code 50, and when it detects a memory manipulation instruction (ie, a write static instruction (opcode 178) in the JAVA language and the virtual machine environment), it inserts an "alert" instance. To fix the application code.
A2.此第二摘錄為DRT.alert()方法之一部份,其實施了第12圖之步驟125及箭頭127。此DRT.alert()方法要求第12圖之DRT處理環境的一或多個執行緒來更新及傳遞對應於附錄A1之作業的改變的記憶體位置之數值及識別。A2. This second excerpt is part of the DRT.alert() method, which implements step 125 and arrow 127 of Figure 12. The DRT.alert() method requires one or more threads of the DRT processing environment of Figure 12 to update and communicate the value and identification of the changed memory location corresponding to the job of Appendix A1.
A3.此第三摘錄為DRT 71的一部份,其對應於第12圖之步驟128。此碼區段顯示出DRT在一獨立執行緒,例如第12圖之執行緒121/1,其係在步驟125及陣列127通知或要求之後,並在橫跨該網路53傳送該改變的數值及改變的數值位置/識別到複數部機器M1...Mn之其它機器上。A3. This third excerpt is part of the DRT 71, which corresponds to step 128 of Figure 12. This code segment shows the DRT in a separate thread, such as thread 12/1 of Figure 12, after the notification or request at step 125 and array 127, and transmits the changed value across the network 53. And the changed numerical position/identification to other machines of the plurality of machines M1...Mn.
A4.該第四摘錄為DRT 71之一部份,並對應於第13圖之步驟135及136。此為程式碼的一區段來接收由另一個DRT71在網路上所傳送之傳遞的識別及數值配對,並寫入該改變的數值到該識別的記憶體位置。A4. This fourth excerpt is part of DRT 71 and corresponds to steps 135 and 136 of Figure 13. This is a section of the code that receives the identification and value pairing of the transfer transmitted by the other DRT 71 over the network and writes the changed value to the identified memory location.
// START // START
A5.該第五摘錄為附錄A7的example.java應用之一解碼的編譯過形式,其執行一記憶體操縱作業(putstaic及putfield)。A5. This fifth excerpt is a compiled form of one of the example.java applications of Appendix A7, which performs a memory manipulation job (putstaic and putfield).
A6.該第六摘錄為附錄A5中相同的範例性應用之解碼的編譯過形式,其係在由附錄A11之FieldLoader.java所執行的修正之後,其係根據此發明之第9圖。該等修正以粗體 強調。A6. This sixth excerpt is a compiled version of the decoding of the same exemplary application in Appendix A5, which is based on the modification performed by FieldLoader.java of Appendix A11, which is based on Figure 9 of the present invention. These amendments are highlighted in bold .
A7.該第七摘錄為在摘錄A5及A6所所使用之 example.java應用之原始碼。此範例應用具有兩個記憶體位置(staticValue及instanceValue),並執行兩個記憶體位置作業。A7. The seventh excerpt is used in the excerpts A5 and A6. The source code of the example.java application. This sample application has two memory locations (staticValue and instanceValue) and performs two memory location jobs.
} }
A8.該第八摘錄為FieldAlert.java之原始碼,其對應於第12圖之步驟125及箭頭127,且其要求執行該「分散式執行時間」71之FieldSend.java之執行緒121/1來傳遞一改變的數值及識別配對到其它機器M1...Mn。A8. The eighth excerpt is the source code of FieldAlert.java, which corresponds to step 125 and arrow 127 of FIG. 12, and it is required to execute the thread 121/1 of FieldSend.java of the "decentralized execution time" 71. Pass a changed value and identify the pairing to other machines M1...Mn.
A9.該第九摘錄為對應於第12圖之步驟128的FieldSend.java原始碼,並等待對應於步驟125及箭頭127之A8的FieldAlert.java所產生的一要求/通知,且其透過網路53傳遞由FieldAlert.java所要求之改變的數值/識別配對。A9. The ninth excerpt is the FieldSend.java source code corresponding to step 128 of Figure 12, and waits for a request/notification generated by FieldAlert.java corresponding to step A15 and arrow A127 of A8, and it passes through the network. 53 Pass the value/identification pair changed by FieldAlert.java.
A10.該第十摘錄為FieldReceive.java之原始碼,其對應於第13圖之步驟135及136,且其接收在網路上53透過附錄A9之FieldSend.java所傳送給它之傳遞的改變數值及識別配對。A10. The tenth excerpt is the source code of FieldReceive.java, which corresponds to steps 135 and 136 of Figure 13, and receives the change value transmitted by the field 53 via FieldSend.java of Appendix A9 and Identify the pairing.
A11.FieldLoader.java. A11. FieldLoader.java.
此摘錄為FieldLoader.java之原始碼,其修正了一應用程式碼,例如附錄A7之example.java應用碼,當其根據第10圖之步驟90,91,92,103,及94正被載入到一JAVA虛擬機器上時。FieldLoader.java在修正一編譯過的JAVA期間利用了附錄A12到A36之習用類別。This excerpt is the source code of FieldLoader.java, which fixes an application code, such as the example.java application code in Appendix A7, when it is loaded into a sequence according to steps 90, 91, 92, 103, and 94 of Figure 10. When on JAVA virtual machine. FieldLoader.java utilizes the abuse categories of Appendix A12 through A36 during the revision of a compiled JAVA.
A12.Attribute_info.java A12. Attribute_info.java
用於在ClassFiles內代表attribute_info結構之合宜類別。Used to represent the appropriate category of the attribute_info structure within ClassFiles.
A13.ClassFile.java A13. ClassFile.java
用於代表ClassFile結構之合宜類別。Used to represent the appropriate category of the ClassFile structure.
A14.Code_attribute.java A14. Code_attribute.java
用於在ClassFiles內代表Code_attribute結構之合宜類別。Used to represent the appropriate category of the Code_attribute structure within ClassFiles.
A15.CONSTANT_Class_info.java A15. CONSTANT_Class_info.java
用於在ClassFiles內代表CONSTANT_Class_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_Class_info structure within ClassFiles.
A16.CONSTANT_Double_info.java A16. CONSTANT_Double_info.java
用於在ClassFiles內代表CONSTANT_Double_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_Double_info structure within ClassFiles.
} }
A17.CONSTANT_Fieldref_info.java A17. CONSTANT_Fieldref_info.java
用於在ClassFiles內代表CONSTANT_Fieldref_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_Fieldref_info structure within ClassFiles.
A18.CONSTANT_Float_info.java A18. CONSTANT_Float_info.java
用於在ClassFiles內代表CONSTANT_Float_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_Float_info structure within ClassFiles.
A19.CONSTANT_Integer_info.Java A19. CONSTANT_Integer_info.Java
用於在ClassFiles內代表CONSTANT_Integer_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_Integer_info structure within ClassFiles.
A20.CONSTANT_InterfaceMethodref_info.java A20. CONSTANT_InterfaceMethodref_info.java
用於在ClassFiles內代表CONSTANT_InterfaceMethodref_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_InterfaceMethodref_info structure within ClassFiles.
} }
A21.CONSTANT_Long_info.java A21. CONSTANT_Long_info.java
用於在ClassFiles內代表CONSTANT_Long_info結構之合宜類別。A suitable category for representing the CONSTANT_Long_info structure within ClassFiles.
A22.CONSTANT_Methodref_info.java A22. CONSTANT_Methodref_info.java
用於在ClassFiles內代表CONSTANT_Methodref_info結構之合宜類別。A suitable category for representing the CONSTANT_Methodref_info structure within ClassFiles.
A23.CONSTANT_NameAndType_info.java A23. CONSTANT_NameAndType_info.java
用於在ClassFiles內代表CONSTANT_NameAndType_info結構之合宜類別。A suitable category for representing the CONSTANT_NameAndType_info structure within ClassFiles.
A24.CONSTANT_String_info.java A24. CONSTANT_String_info.java
用於在ClassFiles內代表CONSTANT_String_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_String_info structure within ClassFiles.
} }
A25.CONSTANT_Utf8_info.java A25. CONSTANT_Utf8_info.java
用於在ClassFiles內代表CONSTANT_Utf8_info結構之合宜類別。Used to represent the appropriate category of the CONSTANT_Utf8_info structure within ClassFiles.
A26.ConstantValue_attribute.java A26. ConstantValue_attribute.java
用於在ClassFiles內代表ConstantValue_attribute結構之合宜類別。A suitable category for representing the ConstantValue_attribute structure within ClassFiles.
A27.cp_info.java A27. cp_info.java
用於在ClassFiles內代表cp_info結構之合宜類別。Used to represent the appropriate category of the cp_info structure within ClassFiles.
A28.Deprecated_attribute.java A28. Deprecated_attribute.java
用於在ClassFiles內代表Deprecated_attribute結構之合宜類別。Used to represent the appropriate category of the Deprecated_attribute structure within ClassFiles.
} }
A29.Exceptions_attribute.java A29. Exceptions_attribute.java
用於在ClassFiles內代表Exceptions_attribute結構之合宜類別。A suitable category for representing the Exceptions_attribute structure within ClassFiles.
} }
A30.field_info.java A30. field_info.java
用於在ClassFiles內代表field_info結構之合宜類別。Used to represent the appropriate category of the field_info structure within ClassFiles.
} }
A31.InnerClasses_attribute.java A31. InnerClasses_attribute.java
用於在ClassFiles內代表InnerClasses_attribute結構之合宜類別。Used to represent the appropriate category of the InnerClasses_attribute structure within ClassFiles.
A32.LineNumberTable_attribute.java A32. LineNumberTable_attribute.java
用於在ClassFiles內代表LineNumberTable_attribute結構之合宜類別。Used to represent the appropriate category of the LineNumberTable_attribute structure within ClassFiles.
import java.lang.*; Import java.lang.*;
A33.LocalVariableTable_attribute.java A33. LocalVariableTable_attribute.java
用於在ClassFiles內代表LocalVariableTable_attribute結構之合宜類別。A suitable category for representing the LocalVariableTable_attribute structure within ClassFiles.
A34.method_info.java A34 .method_info.java
用於在ClassFiles內代表method_info結構之合宜類別。Used to represent the appropriate category of the method_info structure within ClassFiles.
A35.SourceFile_attribute.java A35. SourceFile_attribute.java
用於在ClassFiles內代表SourceFile_attribute結構之合宜類別。Used to represent the appropriate category of the SourceFile_attribute structure within ClassFiles.
import java.lang.*; Import java.lang.*;
A36.Synthetic_attribute.java A36. Synthetic_attribute.java
用於在ClassFiles內代表Synthetic_attribute結構之合宜類別。A suitable category for representing Synthetic_attribute structures within ClassFiles.
附錄BAppendix B
附錄B1為附錄B9之example.java應用之<clinit>方法之解碼的編譯形式之修正前的摘錄。附錄B2為附錄B1之修正後的形式,其根據第20圖之步驟由附錄B10之InitLoader.java所修正。附錄B3為附錄B9之example.java應用之<init>方法的解碼之編譯的形式的修正之前摘錄。附錄B4為附錄B3的修正後形式,根據第21圖之步驟由附錄B10之InitLoader.java所修正。附錄B5為附錄B1的另一種修正後形式,根據第20圖之步驟由附錄B10之InitLoader.java所修正。且附錄B6為附錄B3之另一種修正後形式,根據第21圖之步驟由附錄B10之InitLoader.java所修正。該等修正以粗體 來強調。Appendix B1 is an excerpt from the pre-correction of the compiled form of the decoding of the <clinit> method of the example.java application of Appendix B9. Appendix B2 is the revised form of Appendix B1, which is modified by InitLoader.java of Appendix B10 according to the steps in Figure 20. Appendix B3 is an excerpt from the revision of the compiled form of the decoding of the <init> method of the example.java application of Appendix B9. Appendix B4 is the revised form of Appendix B3, and the steps according to Figure 21 are corrected by InitLoader.java of Appendix B10. Appendix B5 is another modified form of Appendix B1, which is modified by InitLoader.java in Appendix B10 according to the steps in Figure 20. And Appendix B6 is another modified form of Appendix B3. The steps according to Figure 21 are corrected by InitLoader.java of Appendix B10. These corrections are highlighted in bold .
B1B1
B2B2
B3B3
B4B4
B5B5
B6B6
附錄B7Appendix B7
此摘錄為InitClient.java之原始碼,其對應於第17圖之步驟171,172,173,174,175及176,與第18圖之步驟181與182,且其查詢一「初始化伺服器」,例如第15圖之機器X,其執行附錄B8之InitServer.java,藉以決定尋求被初始化之相關類別或物件之初始化狀態。This excerpt is the source code of InitClient.java, which corresponds to steps 171, 172, 173, 174, 175 and 176 of FIG. 17, and steps 181 and 182 of FIG. 18, and queries an "initialization server", such as machine X of FIG. It executes InitServer.java in Appendix B8 to determine the initialization state of the relevant category or object that is being sought to be initialized.
附錄B8Appendix B8
此摘錄為InitServer.java之原始碼,其對應於第19圖之步驟191,192,193,194,195及196,其在一「初始化伺服器」上作業,例如第15圖的機器X,並自網路53接收該複數部機器M1...Mn上複數個類似同等物件或類別之一指定的物件或類別的一「初始化狀態要求」,並由執行附錄B7的InitClient.java機器所傳送,並回應而傳回該指定的類別或物件之相對應初始化狀態。This excerpt is the source code of InitServer.java, which corresponds to steps 191, 192, 193, 194, 195 and 196 of Figure 19, which operates on an "initialization server", such as machine X of Figure 15, and receives the complex part from network 53. An "initialization state requirement" of a plurality of objects or categories specified by one of the equivalent objects or categories on the machine M1...Mn, transmitted by the InitClient.java machine executing Appendix B7, and returned in response to the specified The corresponding initialization state of the category or object.
附錄B9Appendix B9
此摘錄為在修正之前/之後的摘錄B1-B6中所使用之example.java應用之原始碼的摘錄。此範例應用具有兩個初始化例式<clinit>及<init>,其係根據本發明由附錄B10之InitLoader.java做修正。This excerpt is an excerpt of the source code of the example.java application used in the excerpts B1-B6 before/after the correction. This example application has two initialization instances <clinit> and <init>, which are modified according to the invention by InitLoader.java of Appendix B10.
} }
附錄B10Appendix B10
InitLoader.javaInitLoader.java
此摘錄為InitLoader.java之原始碼,其修正了一應用程式碼,例如附錄B9之example.java應用碼,當其根據第16圖之步驟161-164,及第20圖之201-204,及第21圖之步驟201,212,213及204載入到一JAVA虛擬機器上時。InitLoader.java在修正一編譯過的JAVA期間利用了附錄A12到A36之習用類別。This excerpt is the source code of InitLoader.java, which fixes an application code, such as the example.java application code of Appendix B9, when it is according to steps 161-164 of Figure 16, and 201-204 of Figure 20, and Steps 201, 212, 213 and 204 of Fig. 21 are loaded onto a JAVA virtual machine. InitLoader.java utilizes the abuse categories of Appendix A12 through A36 during the revision of a compiled JAVA.
附錄CAppendix C
附錄C1為附錄C4之example.java應用之finalize()方法之解碼的編譯形式之修正前的摘錄。附錄C2為附錄C1之修正之後形式,其由附錄C7之FinalLoader.java利用第22圖之步驟所修正。附錄C3為附錄C1的另一個修正之後形式,其由附錄C7之FinalLoader.java根據第22圖之步驟所修正。該等修正以粗體 強調。Appendix C1 is an excerpt from the pre-correction of the compiled form of the decoding of the finalize() method of the example.java application of Appendix C4. Appendix C2 is the revised form of Appendix C1, which is corrected by the procedure of Figure 22 using FinalLoader.java in Appendix C7. Appendix C3 is another post-correction form of Appendix C1, which is modified by the procedure of Figure 22 in Final Loader.java of Appendix C7. These amendments are highlighted in bold .
C1.一單一機器之典型的先前技術最終化C1. Typical prior art finalization of a single machine
C2.多重機器之較佳的最終化C2. Better finalization of multiple machines
C3.多重機器之較佳的最終化(其它方案)C3. Better finalization of multiple machines (other solutions)
附錄C4Appendix C4
此摘錄為在修正之前/之後的摘錄C1-C3中所使用之example.java應用之原始碼的摘錄。此範例應用具有一單一最終化例式,該finalize()方法根據本發明由附錄C7之FinalLoader.java所修正。This excerpt is an excerpt of the source code of the example.java application used in the excerpts C1-C3 before/after the correction. This example application has a single finalization example that is modified according to the present invention by FinalLoader.java of Appendix C7.
附錄C5Appendix C5
此摘錄為FinalClient.java之原始碼,其對應於第23圖之步驟171,172A,173A,174A,175A及176A,且其查詢一「初始化伺服器」,例如第15圖之機器X,其執行附錄C6之InitServer.java,藉以決定尋求被最終化之相關類別或物件之最終化狀態。This excerpt is the source code of FinalClient.java, which corresponds to steps 171, 172A, 173A, 174A, 175A and 176A of Fig. 23, and queries an "initialization server", such as machine X of Fig. 15, which executes the appendix C6's InitServer.java, which determines the finalization status of the relevant category or object that is sought to be finalized.
附錄C6Appendix C6
此摘錄為FinalServer.java之原始碼,其對應於第25圖之步驟191A,192A,193A,194A,195A,196A及197A,其在一「最終化伺服器」上作業,例如第15圖的機器X,並自網路53接收該複數部機器M1...Mn上複數個類似同等物件或類別之一指定的物件或類別的一「清除狀態要求」,並由執行附錄C5的FinalClient.java機器所傳送,並回應而傳回該指定的類別或物件之相對應最終化狀態。This excerpt is the source code of FinalServer.java, which corresponds to steps 191A, 192A, 193A, 194A, 195A, 196A and 197A of Figure 25, which operate on a "finalization server", such as the machine of Figure 15. X, and receiving a "clear state request" from the network 53 for a plurality of objects or categories specified by one of the equivalent objects or categories on the plurality of machines M1...Mn, and by executing the FinalClient.java machine of Appendix C5 The corresponding finalized state of the specified category or object is transmitted and returned.
附錄C7Appendix C7
FinalLoader.javaFinalLoader.java
此摘錄為FinalLoader.java之原始碼,其修正了一應用程式碼,例如附錄C4之example.java應用碼,當其根據第22圖之步驟161A,162A,163B及164A正被載入到一JAVA虛擬機器上時。FinalLoader.java在修正一編譯過的JAVA期間利用了附錄A12到A36之習用類別。This excerpt is the source code of FinalLoader.java, which fixes an application code, such as the example.java application code of Appendix C4, when it is loaded into a JAVA according to steps 161A, 162A, 163B and 164A of Figure 22. When on a virtual machine. FinalLoader.java utilizes the abuse categories of Appendix A12 through A36 during the revision of a compiled JAVA.
附錄D1Appendix D1
附錄D1為附錄D3之example.java之同步化作業的解碼編譯的形式之修正之前的摘錄,其包含一啟始"monitorenter"指令及結束"monitorexit"指令。附錄D2為附錄D1之修正之後的形式,根據第26圖之步驟中附錄D6之LockLoader.java所修正。該等修正以粗體 來強調。Appendix D1 is an excerpt from the revision of the decoding and compilation form of the synchronization operation of example.java of Appendix D3, which includes a start "monitorenter" instruction and an end "monitorexit" instruction. Appendix D2 is the form after the amendment of Appendix D1, as amended by LockLoader.java in Appendix D6 of the steps in Figure 26. These corrections are highlighted in bold .
附錄D2Appendix D2
Method void run() Method void run()
附錄D3Appendix D3
此摘錄為在修正摘錄D1及D2之前/之後中所使用之example.java應用之原始碼。此範例應用具有一單一同步化作業例式,其包含一開始"monitorenter"指令及一結束 "monitorexit"指令,其根據本發明由附錄D6之LockLoader做修正。This excerpt is the source code of the example.java application used before/after the correction of the excerpts D1 and D2. This sample application has a single synchronization job instance that includes a start "monitorenter" instruction and an end The "monitorexit" instruction, which is modified according to the invention by the LockLoader of Appendix D6.
附錄D4Appendix D4
此摘錄為LockClient.java之原始碼,其對應於第27圖之步驟171B,172B,173B,174B,及175B,及第28圖之步驟181B,182B,183B,184B及185B,且其查詢一「同步化伺服器」,例如第15圖之機器X,其執行附錄D5之LockServer.java,藉以同步化(即藉由一取得鎖定及釋放鎖定要求配對)尋求要被同步化之相關類別或物件(即尋求要被「鎖定」)。This excerpt is the source code of LockClient.java, which corresponds to steps 171B, 172B, 173B, 174B, and 175B of FIG. 27, and steps 181B, 182B, 183B, 184B, and 185B of FIG. 28, and the query is " Synchronization server, such as machine X of Figure 15, which performs LockServer.java of Appendix D5, thereby synchronizing (ie, pairing by a lock and release lock request) to seek related categories or objects to be synchronized ( That is, seeking to be "locked").
附錄D5Appendix D5
此摘錄為LockServer.java之原始碼,其對應於第29圖之191B,192B,193B,194B,195B,196B,197B及198B,及第30圖之步驟201,202,203,204,205,206,207及208,其在一「同步化伺服器」上作業,例如第15圖之機器X,並自網路53接收在複數部機器M1...Mn上複數個類似同等物件或類別之一指定的物件或類別之一「取得鎖定要求」或一「釋放鎖定要求」,並由執行附錄D4之LockClient.java的機器傳送,並回應來傳回一「取得鎖定要求」之擁有權的相對應確認,或視需要為該指定的類別或物件之「釋放鎖定要求」的確認。This excerpt is the source code of LockServer.java, which corresponds to 191B, 192B, 193B, 194B, 195B, 196B, 197B and 198B of FIG. 29, and steps 201, 202, 203, 204, 205, 206, 207 and 208 of FIG. 30, which are in a "synchronized servo" Work on the machine, such as machine X in Figure 15, and receive one of the plurality of objects or categories specified in one of the equivalent items or categories on the plurality of machines M1...Mn from the network 53 "Getting the lock request" Or a "release lock request" and transmitted by the machine executing LockClient.java of Appendix D4, and responding to return a corresponding confirmation of the ownership of a "lock-up request", or as needed for the specified category or object Confirmation of "release lock request".
附錄D6Appendix D6
LockLoader.javaLockLoader.java
此摘錄為LockLoader.java之原始碼,其修正了一應用程式碼,例如附錄D3之example.java應用碼,當其根據第26圖之步驟161B,162B,163B及164B正被載入到一JAVA虛擬機器上時。LockLoader.java在修正一編譯過的JAVA檔案類別期間利用了附錄A12到A36之習用類別。This excerpt is the source code of LockLoader.java, which fixes an application code, such as the example.java application code of Appendix D3, when it is loaded into a JAVA according to steps 161B, 162B, 163B and 164B of Figure 26 When on a virtual machine. LockLoader.java utilizes the abuse categories of Appendix A12 through A36 during the revision of a compiled JAVA file category.
1...單一機器1. . . Single machine
2...中央處理單元2. . . Central processing unit
3...記憶體3. . . Memory
4...匯流排4. . . Busbar
5...螢幕5. . . Screen
6...鍵盤6. . . keyboard
7...滑鼠7. . . mouse
12...CPU12. . . CPU
13...通用記憶體13. . . General purpose memory
14...網路14. . . network
50...應用50. . . application
50A...類別50A. . . category
50X...第一物件50X. . . First object
50Y...第二物件50Y. . . Second object
50Z...第三物件50Z. . . Third object
51...修正子51. . . Corrector
53...網路53. . . network
61...Java虛擬機器61. . . Java virtual machine
71...分散式執行時間71. . . Decentralized execution time
72...Java虛擬機器72. . . Java virtual machine
75...箭頭75. . . arrow
83...箭頭83. . . arrow
101...電腦101. . . computer
102...電腦102. . . computer
105...螢幕105. . . Screen
106...鍵盤106. . . keyboard
107...滑鼠107. . . mouse
108...計算機108. . . computer
109...區塊109. . . Block
115...螢幕115. . . Screen
116...鍵盤116. . . keyboard
120...處理環境120. . . Processing environment
121...執行緒121. . . Thread
310...長方形方塊310. . . Rectangular square
314...雙絞纜線314. . . Twisted pair cable
現在將參照圖面說明本發明之具體實施例,其中:第1圖為一習用電腦之內部架構圖;第2圖所示為已知的對稱性多處理器之內部架構圖;第3圖為習用分散式運算之架構圖;第4圖為習用使用叢集之網路運算之架構圖;第5圖所示為根據本發明第一具體實施例之操作相同應用程式之複數部機器的架構方塊圖;第6圖所示為一先前技術電腦之架構圖,用以操作JAVA碼,藉此構成一JAVA虛擬機器;第7圖所示類似於第6圖,但例示根據該較佳具體實施例之程式碼的初始載入;第8圖類似於第5圖,但例示出複數部電腦之互連接,其每個用第7圖所例示之方式操作JAVA碼;第9圖所示為在該網路中每部機器上載入相同應用程式期間之後的一範例性程序的流程圖;第10圖所示為關於第9圖之一修正程序的流程圖;第11圖所示為利用記憶體更新的一第一具體實施例在第8圖的機器上執行之多執行緒處理之架構圖;第12圖為類似於第11圖的架構,但例示另一具體實施例;第13圖例示第8圖之電腦的範例性多執行緒記憶體更新;第14圖所示為配置成在JAVA碼中作業之一電腦的架構圖,並藉此構成一JAVA虛擬機器;第15圖所示為執行該應用程式之n部機器,並由一額外伺服器機器X服務的架構圖;第16圖所示為初始化例式之修正的流程圖;第17圖所示為初始化例式之持續或中止之流程圖;第18圖所示為傳送到該伺服器機器X之查詢的流程圖;第19圖所示對於第18圖之請求的該伺服器機器X之回應的流程圖;第20圖所示為該類別初始化資產型別<clinit>指令之修正的初始化例式的流程圖;第21圖所示為該物件初始化資產型別<init>指令之修正的初始化例式的流程圖;第22圖所示為「清除」或最終化例式之修正的流程圖;第23圖所示為最終化例式之持續或中止之流程圖;第24圖所示為傳送到該伺服器機器X之查詢的流程圖;第25圖所示對於第24圖之請求的該伺服器機器X之回應的流程圖;第26圖所示為該監視進入及離開例式之修正的流程圖;第27圖所示為在處理機器請求取得一鎖定之後該處理之流程圖;第28圖所示為請求釋放一鎖定的流程圖;第29圖所示對於第27圖之請求的該伺服器機器X之回應的流程圖;第30圖所示對於第28圖之請求的該伺服器機器X之回應的流程圖;第31圖為互連的兩部膝上型電腦同時執行複數應用程式之架構圖,其中兩個應用程式在單一電腦上執行;第32圖類似於第31圖,但顯示出第31圖之設備具有一應用程式在每部電腦上作業;及第33圖類似於第31圖及第32圖,但顯示出第31圖之設備上兩個應用程式同時在兩部電腦上作業。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A specific embodiment of the present invention will now be described with reference to the drawings, wherein: FIG. 1 is an internal architecture diagram of a conventional computer; FIG. 2 is an internal architecture diagram of a known symmetric multiprocessor; An architectural diagram of a distributed computing operation; FIG. 4 is an architectural diagram of a network operation using a cluster of conventional use; and FIG. 5 is a block diagram of an architecture of a plurality of machines operating the same application according to the first embodiment of the present invention; Figure 6 is a block diagram of a prior art computer for operating a JAVA code to form a JAVA virtual machine; Figure 7 is similar to Figure 6, but is illustrated in accordance with the preferred embodiment. The initial loading of the code; Figure 8 is similar to Figure 5, but illustrates the interconnection of the plurality of computers, each of which operates the JAVA code in the manner illustrated in Figure 7; Figure 9 shows the network in the Figure 9 A flowchart of an exemplary program after loading the same application period on each machine in the road; FIG. 10 is a flowchart showing a modification procedure of FIG. 9; and FIG. 11 is a memory update A first embodiment of the machine of Figure 8 Figure 12 is an architecture diagram similar to the 11th diagram, but illustrates another embodiment; FIG. 13 illustrates an exemplary multi-thread memory update of the computer of FIG. 8; Figure 14 shows the architecture of a computer configured to work in a JAVA code, and thereby constitutes a JAVA virtual machine; Figure 15 shows the n machines that execute the application, and is composed of an additional server machine. Schematic diagram of the X service; Figure 16 shows the flowchart of the modification of the initialization example; Figure 17 shows the flow chart of the initialization or suspension of the initialization example; Figure 18 shows the transmission to the server machine. Flowchart of the query of X; Figure 19 is a flow chart showing the response of the server machine X of the request of Fig. 18; and Fig. 20 is the initialization of the correction of the class of the initial asset type <clinit> A flow chart of the example; FIG. 21 is a flow chart showing the initialization example of the modification of the asset type <init> instruction of the object; and FIG. 22 is a flow of the modification of the "clearing" or finalization example. Figure; Figure 23 shows the continuation or abort of the finalization Flowchart; Figure 24 is a flow chart showing the query transmitted to the server machine X; Figure 25 is a flow chart showing the response of the server machine X of the request of Figure 24; A flowchart for the correction of the entry and exit of the routine; FIG. 27 is a flow chart of the processing after the processing machine requests to acquire a lock; and FIG. 28 is a flow chart for requesting release of a lock; Figure 5 is a flow chart showing the response of the server machine X requested in Figure 27; Figure 30 is a flow chart showing the response of the server machine X requested in Figure 28; Figure 31 is the interconnection The two laptops simultaneously execute the architecture diagram of the multiple applications, two of which are executed on a single computer; the 32nd image is similar to the 31st, but the device shown in Figure 31 has an application in each The operation on the computer; and Figure 33 is similar to the 31st and 32nd, but shows that the two applications on the device of Figure 31 work on both computers at the same time.
50‧‧‧應用50‧‧‧Application
53‧‧‧網路53‧‧‧Network
71‧‧‧分散式執行時間71‧‧‧Distributed execution time
72‧‧‧Java虛擬機器72‧‧‧Java Virtual Machine
83‧‧‧箭頭83‧‧‧ arrow
Claims (44)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
AU2005902027A AU2005902027A0 (en) | 2005-04-21 | Modified Computer Architecture with Coordinated Objects |
Publications (2)
Publication Number | Publication Date |
---|---|
TW200638266A TW200638266A (en) | 2006-11-01 |
TWI467491B true TWI467491B (en) | 2015-01-01 |
Family
ID=52784735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW95102934A TWI467491B (en) | 2005-04-21 | 2006-01-25 | Method, system, and computer program product for modified computer architecture with coordinated objects |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI467491B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10102098B2 (en) | 2015-12-24 | 2018-10-16 | Industrial Technology Research Institute | Method and system for recommending application parameter setting and system specification setting in distributed computation |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013095665A1 (en) * | 2011-12-23 | 2013-06-27 | Intel Corporation | Tracking distributed execution on on-chip multinode networks without a centralized mechanism |
US9166865B2 (en) * | 2012-11-07 | 2015-10-20 | International Business Machines Corporation | Mobility operation resource allocation |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6049809A (en) * | 1996-10-30 | 2000-04-11 | Microsoft Corporation | Replication optimization system and method |
US20020001009A1 (en) * | 1997-06-04 | 2002-01-03 | Hewlett-Packard Company | Ink container having a multiple function chassis |
US6625751B1 (en) * | 1999-08-11 | 2003-09-23 | Sun Microsystems, Inc. | Software fault tolerant computer system |
US20030225852A1 (en) * | 2002-05-30 | 2003-12-04 | International Business Machines Corporation | Efficient method of globalization and synchronization of distributed resources in distributed peer data processing environments |
TW200404433A (en) * | 2002-07-19 | 2004-03-16 | Ibm | Employing a resource broker in managing workloads of a peer to peer computing environment |
US6760903B1 (en) * | 1996-08-27 | 2004-07-06 | Compuware Corporation | Coordinated application monitoring in a distributed computing environment |
-
2006
- 2006-01-25 TW TW95102934A patent/TWI467491B/en active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6760903B1 (en) * | 1996-08-27 | 2004-07-06 | Compuware Corporation | Coordinated application monitoring in a distributed computing environment |
US6049809A (en) * | 1996-10-30 | 2000-04-11 | Microsoft Corporation | Replication optimization system and method |
US20020001009A1 (en) * | 1997-06-04 | 2002-01-03 | Hewlett-Packard Company | Ink container having a multiple function chassis |
US6625751B1 (en) * | 1999-08-11 | 2003-09-23 | Sun Microsystems, Inc. | Software fault tolerant computer system |
US20030225852A1 (en) * | 2002-05-30 | 2003-12-04 | International Business Machines Corporation | Efficient method of globalization and synchronization of distributed resources in distributed peer data processing environments |
TW200404433A (en) * | 2002-07-19 | 2004-03-16 | Ibm | Employing a resource broker in managing workloads of a peer to peer computing environment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10102098B2 (en) | 2015-12-24 | 2018-10-16 | Industrial Technology Research Institute | Method and system for recommending application parameter setting and system specification setting in distributed computation |
Also Published As
Publication number | Publication date |
---|---|
TW200638266A (en) | 2006-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7788314B2 (en) | Multi-computer distributed processing with replicated local memory exclusive read and write and network value update propagation | |
CN1965308B (en) | Modified computer architecture with coordinated objects | |
US7844665B2 (en) | Modified computer architecture having coordinated deletion of corresponding replicated memory locations among plural computers | |
Chin et al. | Distributed, object-based programming systems | |
US8788569B2 (en) | Server computer system running versions of an application simultaneously | |
US8707287B2 (en) | Method, computer program product, and system for non-blocking dynamic update of statically typed class-based object-oriented software | |
US5359721A (en) | Non-supervisor mode cross address space dynamic linking | |
US8984534B2 (en) | Interfacing between a receiving component of a server application and a remote application | |
US20020129177A1 (en) | System and method for class loader constraint checking | |
US20060095483A1 (en) | Modified computer architecture with finalization of objects | |
US20040107416A1 (en) | Patching of in-use functions on a running computer system | |
US20050262513A1 (en) | Modified computer architecture with initialization of objects | |
US20090276660A1 (en) | Server computer component | |
WO2007113539A1 (en) | Interactive development tool and debugger for web services | |
Van Der Burg et al. | Disnix: A toolset for distributed deployment | |
TWI467491B (en) | Method, system, and computer program product for modified computer architecture with coordinated objects | |
Coetzee et al. | A model and framework for reliable build systems | |
Renouf | Pro (IBM) WebSphere Application Server 7 Internals | |
Milano | Programming Safely with Weak (And Strong) Consistency | |
AU2006238334A1 (en) | Modified computer architecture for a computer to operate in a multiple computer system | |
Mishra | Approaches to Shared State in Concurrent Programs | |
Ma et al. | Improving automatic centralization by version separation | |
AU2005236087B2 (en) | Modified computer architecture with coordinated objects | |
Kim | Applying dynamic software updates to computationally-intensive applications | |
Gross | . NET Runtime-and Framework-Related Solutions |