Computer system and methods for acquiring dump information and system recovery

Dump information acquiring and system recovery methods for a computer system using a virtual memory. The computer system has a plurality of external storage units normally used as a paging device unit for holding the contents of the virtual memory to be paged out. When fault occurs, a program for acquiring dump information outputs the contents of the main storage to a dump file. The identifier of the external storage unit set to definition information defining the external storage unit is changed from the identifier of the external storage unit to the identifier of another external storage unit. Thereafter, the computer system is restarted. The contents of the virtual memory held in the paging device unit at the time of fault output to the dump file.

BACKGROUND OF THE INVENTION

The present invention relates to a method of acquiring dump information of a computer system necessary for investigating the cause of fault of the computer system.

With recent improvement on a processor performance, the process amount of a program to be executed by one computer and the amount of data to be processed show a steady increase. In order for one computer system to efficiently process data, it is necessary to store a large amount of data directly in a main memory or to develop a large amount of data into a virtual memory. In order to realize this, it is necessary to expand the address spaces of the main memory and virtual memory.

Such expansion of the address spaces of the main and virtual memories increases the amount of information to be acquired to investigate the cause of fault of a system (such information is described hereinafter as dump information).

As the dump information increases, a time taken to acquire the dump information prolongs. This causes a delay of a start time when the system with fault starts again. Therefore, restart of processes is eventually delayed.

Techniques of avoiding a restart delay of a system with fault are known disclosed, for example, in JP-A-7-234808 and JP-A-10-333944.

JP-A-7-234808 discloses a method of acquiring dump information of a computer system having duplicated main memories. According to this disclosed method, when fault occurs in the system, data held in one of the duplicated main memories is used as the dump information, and the system is restarted by using the other main memory to avoid a delay of the restart of the system.

According to the technique disclosed in JP-A-10-333944, prior to restart of the system, dump information in a memory area where a kernel of an operating system is loaded is acquired. Thereafter, a program for restarting the system and a program for sequentially acquiring dump information from another memory area from which the dump information is still not acquired, are executed in parallel. If the dump information in a memory area necessary for system restart is not still acquired, the program for restarting the system restarts the system while dumping the dump information held in the memory area before using. In this manner, the technique disclosed in JP-A-10-333944 shortens the time taken to restart the system.

SUMMARY OF THE INVENTION

According to the above-described techniques, data stored in a main memory is used as dump information when fault occurs. However, if fault occurs in a computer system adopting virtual memory management, it becomes necessary in some cases to acquire dump information paged out to a paging device unit.

In the computer system adopting virtual memory management, in some cases, data in some virtual memory area is output (page-out) to an external storage unit, and when data in the virtual memory area is referred to or updated, the virtual memory area is accessed after the data is input (page-in) to a main memory. The above-described techniques do not consider acquisition of dump information which was paged out and is not stored in the main memory as yet.

Namely, with the above-described techniques, when fault occurs in a computer system, it is not possible to restart the system until the whole dump information paged out in an external storage unit is acquired.

It is an object of the present invention to shorten a time taken to restart a computer system and resume processing jobs, if data in the whole virtual memory area is to be acquired when fault occurs in the system.

In order to achieve the above object of the invention, in a computer system having a processing unit, a computer with a main memory connected to the processing unit, and external storage units connected to the computer, the computer system utilizing virtual memory management realized by mapping an area of a virtual memory used by the processing unit onto the main memory, in response to a fault occurrence of the computer system, data held in the main memory is output to a dump file. Thereafter, the external storage unit which holds the contents of a page of the virtual memory to be paged out from the main memory, is changed from a first external storage unit used before the fault occurs to a second external storage unit. The computer system is restarted by using the second external storage unit as the paging device unit.

According to another aspect of the present invention, a computer system is provided which comprises a processing unit; a main memory; first and second external storage units having an area of a virtual memory used by a program to be executed by the processing unit, the first and second external storage units being used as a paging device unit for holding the contents of the virtual memory area, the contents being paged out from the main memory; and a switching unit interposed between the processing unit and the first and second external storage units, the switching unit accessing one of the first and second external storage units as the paging device unit in response to an access request for the paging device unit issued upon paging of the virtual memory by the program executed by the processing unit, and switching the first and second external storage units as the paging device unit from the one of the first and second external storage units to the other of the first and second external storage units in response to a fault occurrence of a process under execution by the processing unit.

DESCRIPTION OF THE EMBODIMENTS

FIG. 1is a block diagram showing the outline structure of a computer system according to an embodiment of the invention.

The computer system of this embodiment has a computer100and external storage units600,700(710,720) and800typically a magnetic disk.

The computer100has a processor (CPU)200for performing various operations and a main memory400. CPU200has registers300such as a control register and a general register. The control register holds various control information such as a start real address of an address translation table to be used for accessing the virtual memory. The general register is used for various operations.

The external storage600stores therein a definition file610and an operating system620. The operating system620is software which manages hardware resources constituting the computer system and a schedule of programs to be executed on the computer100. The operating system620is first loaded when the computer system starts. The definition file610stores therein various parameters necessary for the operating system or the like to run the computer system, such as identification information of the external storage units used as paging device units. The external storage unit700is used as a paging device unit. In this embodiment, the paging device unit includes a primary paging device unit710used as a paging device unit during a normal operation and a secondary paging device unit720used as a substitution. The definition file610defines an identifier of the external storage unit710as the primary paging device unit and an identifier of the external storage unit720as the secondary paging device unit. The external storage unit800has a dump file810. The dump file810stores the whole dump information of the computer system including the dump information in the main memory400when fault occurs in the system.

The main memory400has a register save area410in a predetermined memory area. The register save area410is used for saving the contents held in each register of the registers300when any fault occurs during system running. Configuration information420held in the main memory400includes the identifier of an external storage unit currently used as the paging device unit. The main memory400stores programs to be executed by CPU200for realizing a paging device unit use process430, a main memory information acquiring process440and a switching process450.

The paging device unit use process430acquires the identifier, contained in the configuration information420, of an external storage unit currently used as the paging device unit and executes a paging process by using the identified external storage unit. The paging process is a process of outputting data in the main memory400in an area having a small access frequency to the paging device unit when a use factor of the main memory400becomes high and an empty area becomes small, and a process of inputting data in a virtual memory area in the main memory400if the data in the virtual memory area to be accessed by CPU200was output to the paging device unit.

The main memory information acquiring process440is a process of acquiring the contents held in the main memory400sequentially in an ascending order starting from an address0and outputting the contents to the dump file810, when fault occurs in the system. The switching process450is called and executed when the main memory information acquiring process440is completed. The switching process450acquires the identifier of the external storage unit700currently used as the paging device unit from the configuration information420, and changes the setting of the identifier of an external storage unit so that the secondary paging device unit720is used as a primary paging device unit when the computer system restarts. In this manner, the external storage unit710used as a primary paging device unit until the fault occurs is prevented from being used as a secondary paging device unit after the restart of the computer system.

FIG. 2is a diagram illustrating a method of translating a virtual address into a real address and the relationship between a virtual memory and a main memory.

A virtual memory900is partitioned into units having a predetermined size. This partitioned unit is generally called a page. InFIG. 2, the virtual memory900is constituted of n+1 pages. The pages include page0, page1, page2, . . . , page n, as counted from the start page of the virtual memory. Areas of the virtual memory900are allocated in the page unit to the main memory400or primary paging device unit710.

The area of the main memory400is also partitioned into units having the same size as the page of the virtual memory900. The page sizes of the virtual memory900and main memory400are made equal so that each page in the virtual memory900can be easily referred to a corresponding page in the main memory400. The address translation table500manages to which area of the main memory400or primary paging device unit710each page of the virtual memory900is allocated. The address translation table500is disposed in continuous areas of the main memory400, and has n+1 entries corresponding to the pages of the virtual memory900. In this embodiment, the order of pages of the virtual memory900corresponds to the order of pages of the address translation table500. For example, the entry of the address translation table900corresponding to the m-th page (page m−1) of the virtual memory900is the m-th entry. The real address of the start entry of the address translation table900is held in a control register310of the register group300.

FIG. 3shows the data structure of one entry of the address translation table. Each entry of the address translation table500holds information including an invalid bit510, a real address520, and a page-out destination address530.

The invalid bit510indicates whether the real address520is invalid or not. If the invalid bit510is set to “1” it means that the real address520is invalid. More specifically, the page of the virtual memory900corresponding to this entry is not used or data in this page was paged out into the primary paging device unit710at the page-out destination address530.

If the invalid bit510is set to “0”, the real address520is valid and data in the page of the virtual memory corresponding to this entry is already held in the main memory400at the real address520. For example, it is assumed as shown inFIG. 2that “Q” is set as the real address520in the entry corresponding to the page m−1 of the address translation table, “Q+a” (where a is the size of one page) is set as the real address520in the entry corresponding to the page m, “P” is set as the real address520in the entry corresponding to the page m+1, and “0” is set as the invalid bit of these entries. In this case, data in pages m−1 and m of the virtual memory900are stored in continuous areas of the main memory at addresses starting from the real address Q, and data in page m+1 is stored in an area at addresses starting from the real address P.

FIG. 4is a diagram illustrating the outline of a virtual memory information acquiring process.

The virtual memory information acquiring process460is executed by using, as its input information, the contents of the register save area and address translation table output to the dump file801by the main memory information acquiring process440and the contents held in the external storage unit710used as the paging device unit before fault occurs in the computer system. In accordance with the input information, the virtual memory information acquiring process460acquires page data in the virtual memory900paged out into the paging device unit710and outputs the page data to the dump file801, when the fault occurs in the computer system.

After the process by the main memory information acquiring process440is completed, the virtual memory information acquiring process460may be executed by the computer system used before the fault occurs or another computer system.

FIG. 5is a flow chart illustrating a restart operation of the computer system to be executed when fault occurs in the computer system.

When fault occurs in the computer system while the paging device unit use process430is executed for the virtual memory, the main memory information acquiring process440is activated to start acquiring dump information (Step5000). Next, the contents of the registers300are saved in the register save area410of the main memory400(Step5010). Thereafter, the main memory information acquiring process440reads the contents of the main memory400sequentially starting from address “0” and stores the read contents in the dump file810(Step5020).

After the contents of the main memory400are output to the dump file810, the switching process450is activated (Step5030). By referring to the configuration information, the switching process450changes the identifier of the external storage unit710used as the paging device unit to the identifier of the external storage unit720as the secondary paging device unit. Thereafter, the operating system620is loaded to restart the system. If the configuration information420is to be generated when the system is restarted, in accordance with the information of the paging device unit set in the definition file610is updated (Step5040).

FIG. 6is a flow chart illustrating the operation of the virtual memory information acquiring process460. This process is executed by another computer system after the computer system restart process at Step5040.

When the virtual memory information acquiring process460is activated, it acquires a start real address of the address translation table500held in the control register310from the dump file810, among the contents of the register save area410in the main storage400(Step6000). The dump file810holds the contents of the main memory400at the time when the fault occurred, in the address sequential order. Therefore, if the address of the register save area410in the main memory400is given in advance, the contents of each register can be easily obtained.

In accordance with the acquired real address, the virtual memory information acquiring process460acquires the contents of the address translation table500from the dump file810(Step6010). Next, the virtual memory information acquiring process460sets the first page as a page of the virtual memory900to be checked (Step6020). Namely, the first entry of the address translation table500is checked. The virtual memory information acquiring process460checks the state of the invalid bit510in the first entry of the address translation table500to judge whether the data corresponding to the first page of the virtual memory900was stored either in the main memory400or in the paging device unit when the fault occurred (Step6030).

If the invalid bit510is “1’, which means that the data corresponding to the first page of the virtual memory900is stored in the paging device unit, the contents corresponding to the first page are read from the paging device unit in accordance with the page-out destination address530and output to the dump file810(Step6040). In this case, the virtual memory information acquiring process460adds an address of the page in the virtual memory900to the dump information output to the dump file810. It is therefore possible to check the page of the virtual memory900corresponding to the output dump information.

If it is judged at Step6030that the invalid bit510is “0” which means that data corresponding to the first page is stored in the main memory400when the fault occurred, and that the data was stored in the dump file810at Step5020. In this case, the flow advances to Step6050.

At Step6050, the virtual memory information acquiring process460checks whether the processed entry is the last entry. If not, at Step6060the next entry is set as an entry to be checked to thereafter return to Step6030to acquire virtual memory information. If the processed entry is the last entry, it means that all dump information has been acquired. The process is therefore terminated.

According to this embodiment, when fault occurs in a computer system, the current external storage unit used as the paging device unit is switched to another external storage unit, and the computer system is restarted. Accordingly, before the contents in a virtual memory area paged out into the paging device unit are acquired as the dump information, the computer system can be restarted. It is possible to shorten a delay of the restart time after fault occurrence. The virtual memory information acquiring process can be executed at any time desired so that the running flexibility of the computer system can be improved.

In this embodiment, although the virtual memory information acquiring process is executed by another computer system, it may be executed in a background environment while the computer system executes usual processes after the restart. In this case, it is not necessary to use another computer system for acquisition of virtual memory information.

FIG. 7is a block diagram showing the outline of a computer system according to a second embodiment of the invention.

The computer system of this embodiment has a switching unit1000for switching between external storage units used as a paging device unit, in place of the switching process to be executed by the computer100. The other structures are same as those of the first embodiment. InFIG. 7, although the switching unit1000is externally connected to the computer100, it may be built in the computer100.

The definition file610of this embodiment defines that the external storage unit700is used as a paging device unit. The definition file610also stores the information that the external storage unit700includes an external storage unit710and an external storage unit720and that the external storage unit710is used as an external storage unit during the normal operation of the system.

When the computer system starts, the contents of the definition file610are loaded in the main memory400in a predetermined area as part of the configuration information420. During the normal operation of the computer system, the paging device unit use process430refers, when paging becomes necessary, to the configuration information420and issues a paging input/output request to the switching unit1000for selecting the paging device unit700. Upon reception of the input/output request for the external storage unit700, the switching unit1000passes the input/output request to the paging device unit during the normal operation (in this example, the external storage unit710).

When a failure occurs in the computer system, CPU200notifies a fault occurrence to the switching unit1000. Upon reception of this notice, the switching unit1000refers to the configuration information420and changes the settings so that the secondary paging device unit720is used as the paging device unit. Thereafter, the operating system620is loaded and the system is restarted. After the system restarts, in response to a paging input/output request issued from the paging device unit use process430, the switching unit1000passes the input/output request to the external storage unit720.

In this embodiment, when executing paging, the paging device unit use process does not consider which of the primary and secondary paging device units is used as the paging device unit, but the switching unit itself selects the external storage unit used as the paging device unit. Therefore, similar to the first embodiment, the dump information in the paging device unit can be acquired when fault occurs, after the computer system is restarted. The time taken to restart the system can therefore be shortened. The dump information can be acquired after the switching unit selects the new external storage unit to be used as the paging device unit, by connecting the old external storage unit used as the paging device unit before the fault to another computer system.

In this embodiment, the switching unit switches between the external storage units upon reception of a signal notifying a fault occurrence from CPU. The switching may be executed upon reception of a command from a system administrator via a terminal equipment.

According to the embodiments described above, in a computer system using virtual memory management, the system restart process can be executed immediately after the dump information in the main memory is acquired. A time taken to restart the system after a fault occurrence, i.e., a system halt time, can be shortened. Dump information in the virtual memory can be acquired by a computer system different from the computer system used before the fault occurrence and executing a job. The computer system running flexibility can therefore be improved.