Method for prevention of system execution malfunction

A method for prevention of system execution malfunction is provided. First, an IDL (Interface Definition Language) file is compiled using an IDL compiler to generate a compiled IDL file. The compiled IDL file is converted by defining additional operations corresponding to a specific operator in the compiled IDL file. When a program comprising the converted file is executed with the specific operator, the additional operations are performed before original operations thereof.

BACKGROUND

The invention relates to system management, and particularly to methods for prevention of system execution malfunction.

In system management, it is critical to prevent execution malfunction. Since runtime errors may cause system shutdown, manufacturing systems, such as a MES (manufacturing execution system) require smooth and reliable execution environment, for production stability. Most 300 mm MESs, for example, adapt a CORBA (Common Object Request Broker Architecture). CORBA provides a dynamic container called Sequence as an array data structure for storing data. However, the structure is unstable since the system can shut down if a program accesses un-initialized memory on the system. It is difficult to block unsafe programs on MESs based on CORBA in a foundry.

IBM provides a fault tolerance mechanism for handling system execution malfunction. As shown inFIG. 1A, a system100provides three processes to serve corresponding programs simultaneously. InFIG. 1A, processes S1and S2are active to serve programs P1and P2respectively, and process P3is idle. When process P2causes the process P2to shut down, the system automatically cancels process P2, wakes process P3to re-serve process P2, and launches a new process P4in idle status to handle new requests.

However, the IBM mechanism does not solve system shutdown problem by simply using another process to re-confront the program. For a complete solution, problematic codes have to be reviewed and revised line by line. This measure is inefficient and time-consuming, and errors can persist, thereby further jeopardizing the system.

Additionally, system shutdown problems also exist in network environments. The version of data transmitted from clients must match that recognized and accepted by a server. If the data version does not match, the system can shut down.FIG. 2illustrates a mechanism to solve system shutdown problems in a network environment. For transmission from a server220, a client210first transmits a data version to a version unit221of the server220(S1). The version unit221then determines whether the data version matches that used thereon, and returns an acknowledgement to the client210(S2). If the data version matches, the client210transmits data to a processing kernel222of the server220(S3). Otherwise, the client210cancels the transmission. This conventional mechanism, however, requires several network transmissions, making it also inefficient and time-consuming.

SUMMARY

According to an embodiment of the invention, a prevention method for system execution malfunctions is provided. First, an IDL (Interface Definition Language) file is compiled using an IDL compiler. Then, the compiled IDL file is converted by defining additional operations corresponding to a specific operator therein. When a program comprising the converted file is executed with the specific operator, the additional operations are performed before the original operations thereof.

A header file is further generated during compilation of the IDL file, and a source code file is compiled with the header file, using a source code compiler. The converted file and the compiled source code file are combined to generate the program.

The specific operation comprises a subscribe operator of CORBA. The additional operations comprise determining whether a parameter value of the subscribe operator is within an initialized value, allowing the original operations of the subscribe operator to be performed if the parameter value is within the initialized value, and canceling the execution of the original operations of the subscribe operator if the parameter value is not within the initialized value. The additional operations comprise determining whether the subscribe operator requires access of un-initialized memory, allowing the original operations of the subscribe operator to be performed if the subscribe operator does not require access of un-initialized memory, and canceling execution of the original operations of the subscribe operator if the subscribe operator requires access of un-initialized memory.

An error message is returned if the parameter value is not within the initialized value or the subscribe operator requires access of un-initialized memory.

The prevention method for use in a network environment is also provided. First, a packet is received via a network. The packet is encoded with a data version and data by an encoder in advance. Then, the packet is decoded by a decoder to obtain the data version and data. It is determined whether the received data version matches a predetermined version, and, if so, operations are performed according to the received data. Otherwise, the packet is discarded.

The above-mentioned method may take the form of program code embodied in a tangible media. When the program code is loaded into and executed by a machine, the machine can become an apparatus for practicing the disclosed methods.

DESCRIPTION

In an embodiment of the invention, a conventional CORBA compiling procedure is modified to efficiently prevent system shutdown problems.

CORBA enables segments of programs, or objects, to communicate with one another regardless of their native programming language or operating system. CORBA provides a mechanism by which objects transparently communicate with other objects on different platforms in heterogeneous distributed environments. In this model, clients request services from objects through a well-defined interface. This interface is specified in IDL. A client accesses an object by issuing a request. The request, an event, carries information including an operation, the object reference of the service provider, and actual parameters.

FIG. 3is a schematic diagram illustrating a conventional CORBA compiling procedure. As shown inFIG. 3, an IDL file301, by an IDL compiler302, generates a compiled IDL file303and a header file304. It is understood that an IDL file contains one or more interface definitions. Each interface definition is composed of an interface header and an interface body. The interface header is demarcated by square brackets. The interface body is contained in parentheses.

Additionally, a source code file305, with the header file304, by way of a source code compiler306, generates a compiled source code file307. It is understood that the source code file305may be a file coded using C++, JAVA, or other programming language, and the source code compiler306may be CORBA-based C++, JAVA, or other compiler. The compiled IDL file303and source code file307are then combined to generate a program308.

FIG. 4is a schematic diagram illustrating a compiler product according to an embodiment of the invention. The compiler product400comprises an IDL compiler302, a source code compiler306, and a conversion compiler410. Detailed descriptions of the components follow.

FIG. 5is a schematic diagram illustrating a method for prevention of system execution malfunction according to an embodiment of the invention. Similar components inFIGS. 3,4, and5are referred to using like designations. First, an IDL file301is compiled using the IDL compiler302(S501) to generate a compiled IDL file303and a header file304(S502aand A502b). Then, the compiled IDL file303is converted by the conversion compiler410by defining additional operations corresponding to a specific operator therein (S503), generating a converted file411(S504).

Additionally, a source code file305is compiled with the header file304by a source code compiler306(S505) to generate a compiled source code file307(S506). Then, the converted file411and the compiled source code file307are combined to generate a program308. It is understood that when the program308, comprising the converted file411, is executed with the specific operator, the additional operations are performed before original operations thereof. The specific operation may comprise a subscribe operator of CORBA. The additional operations may be, but not limited to, protected operations comprising determining whether the subscribe operator requires access of un-initialized memory, determining whether a parameter value of the subscribe operator is within an initialized value. Original operations of the subscribe operator, well defined in CORBA are omitted here.

FIG. 6is a flowchart showing the process of program execution according to an embodiment of the invention. When a program is executed with the subscribe operator, first, in step S601, it is determined whether the subscribe operator requires access of un-initialized memory. Similarly, it is determined whether a parameter value of the subscribe operator is within an initialized value. If not (“No” in step S610), in step S611, the original operations of the subscribe operator are allowed to take place according to corresponding parameters. If so (“Yes” in step S610), in step S612, execution of the original operations of the subscribe operator is canceled, and in step S613, an error message is returned to the computer system or related personnel for further action.

FIG. 7is a diagram of a storage medium storing a computer program providing the method for prevention of system execution malfunction according to an embodiment of the present invention. The computer program product comprises a storage medium710having computer readable program code embodied therein for use in a computer system700. The computer readable program code comprises at least computer readable program code711compiling an IDL file using an IDL compiler to generate a compiled IDL file, and computer readable program code712converting the compiled IDL file by defining additional operations corresponding to a specific operator therein. When a program comprising the converted file is executed with the specific operator, the additional operations are performed before original operations thereof.

The program further comprises computer readable program code (not shown) determining whether the specific operator requires access of un-initialized memory, computer readable program code (not shown) allowing the original operations of the specific operator to be performed if the specific operator does not require access of un-initialized memory, and computer readable program code (not shown) canceling execution of the original operations of the specific operator if the specific operator requires access of un-initialized memory. The program further comprises computer readable program code (not shown) issuing and returning an error message if the specific operator requires access of un-initialized memory.

FIG. 8is a schematic diagram illustrating the architecture of a method for prevention of system execution malfunction in a network environment according to another embodiment of the invention. The environment comprises an encoder803and a decoder806on at least one client and a server respectively.

First, a data version (or format)802on the client and data801is encoded by the encoder803(S811) to generate a packet804(S812), and the packet804is transmitted to the server via a network805(S813). After receiving which, the packet804is decoded by the decoder806(S814) to obtain data version802and data801(S815). Then, it is determined whether the data version802matches a predetermined version on the server, and, if so, operations are performed accordingly.

FIG. 9is a diagram of a storage medium storing a computer program providing the method for prevention of system execution malfunction according to an embodiment of the present invention. The computer program product comprises a storage medium910having computer readable program code embodied therein for use in a computer system900. The computer readable program code comprises at least computer readable program code911receiving a packet via a network, computer readable program code912decoding the packet to obtain a data version and data, computer readable program code913determining whether the received data version matches a predetermined version, and computer readable program code914performing operations accordingly if the received data version matches the predetermined version.

Embodiments of the invention may thus provide efficient prevention of system execution malfunctions, saving related time and manpower, and enhancing reliability of the system.

Embodiments of the method and system, or certain aspects or portions thereof, may take the form of program code (i.e., executable instructions) embodied in tangible media, such as floppy diskettes, CD-ROMS, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine thereby becomes an apparatus for practicing the embodiment. Embodiments of the method and system may also be embodied in the form of program code transmitted over some transmission medium, such as electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the embodiments. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates analogously to application specific logic circuits.

Although the present invention has been described according to predefined embodiment, it is not intended to limit the invention thereto. Those skilled in this technology can still make various alterations and modifications without departing from the scope and spirit disclosed.