Abstract:
A monitor method of computer system is provided, applying within an interrupt service routine. According to the application of interrupt service, when the interrupt controller sends an interrupt signal to the CPU, the CPU executes a corresponding interrupt service routine based on the interrupt signal, in the meantime, the daemon program generates an entrant code. Before the interrupt service routine stops, the daemon program generates an exit code and saves both the entrant code and the exit code in a storage device. It is benefit for solving the problems occurred in the debugging process according to the entrant code and the exit code of the storage device, and speeding up the process of testing and researching steps.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to a monitor method for computer system, and more particularly to a monitor method of applying within an interrupt service routine for obtaining the further detail information by a daemon monitor program, so as to advantage for detecting and debugging.  
         [0003]     2. Description of Related Art  
         [0004]     In current computer system, the system designer usually encounters some problems in both hardware and software in the design and developing stage, the designers usually apply with some debugging engine for debugging, for example, to capture the command process of hardware apparatus or working system by applying with Logical Analyzer (LA), ICE (In-Circuit Emulator).  
         [0005]     However, the operating process of hardware tool such as LA or ICE is very complicated. For example, the difficulty of processing the logic analyzing apparatus and ICE is determined by a trigger condition. In other words, the debugger must determine a proper condition to trigger the debugging engines under the full understanding of the be-solved problems. In general conditions, users usually obtain the result of the problem but are not able to set a proper trigger condition. In the meantime, it is necessary to keep a specialist for a long-term monitor for concluding a possible reason of the problem occurred. The action is not only waste human resources, but possibly missing the timing of problem caused by human error, and further nullifying all the previous efforts.  
         [0006]     Moreover, according to the rapid researching and developing, for example, the chip upgrade and CPU improved, it will speed up the replacing of the logic analyzing apparatus and ICE, however, the logic analyzing apparatus and ICE are usually very expensive, which may increase the production cost of testing and debugging process.  
         [0007]     Therefore, it is desirable to provide an improved speech recognition method to mitigate and/or obviate the aforementioned problems.  
       SUMMARY OF THE INVENTION  
       [0008]     It is the primary object of the present invention to provide a new monitor method for computer system in order to solve the problems for benefiting in reading detail information in the debugging process.  
         [0009]     In order to achieve the foregoing objects, the present invention provides a monitor method for computer system, comprising the steps of: receiving a request signal; transmitting an interrupt signal; executing an interrupt service routine and generating a entrant code; saving said entrant code; terminating said interrupt service routine and generating a exit code; and saving said exit code.  
         [0010]     Moreover, the present invention provides a monitor method for computer system, wherein the computer system comprises a CPU, a main controller, a data storage device, and a plurality of peripheral devices, said main controller comprises an interrupt controller, the monitor method comprises the steps of: providing at least one interrupt service routine, wherein each interrupt service routine comprises a daemon monitoring program; generating an interrupt signal by the interrupt controller after receiving an interrupt request signal and then transmitting the interrupt signal to the CPU; executing a corresponding interrupt service routine according to the interrupt signal when the CPU receives the interrupt signal; and generating an entrant code by the daemon monitoring program when the interrupt service routine starts, and generating an exit code before the interrupt service routine stops, saving the entrant code and saving the exit code into the data storage device, monitoring the operating condition of computer system according to the entrant code and the exit code of the data storage device.  
         [0011]     Other objects, advantages, and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0012]      FIG. 1  is a block diagram of simple computer system.  
         [0013]      FIG. 2  is a flow chart of a preferred embodiment of the present invention.  
         [0014]      FIG. 3  is a block diagram of saving status of the entrant code and exit code of a preferred embodiment of the present invention. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT  
       [0015]     The prior art employed by the present invention will be summarily mentioned to help the presentation of present invention. Diagrams accompanying the descriptions below are not drawn by actual proportions, but mean to illustrate the structural features of the invention.  
         [0016]     First, with reference to  FIG. 1 , there is shown of the circuit-connecting diagram of primary elements of a computer system. As shown in the figure, the primary elements of a computer system comprises at least a central processing unit (CPU)  11 , a main controller  13 , a memory  15  and a plurality of peripheral devices  17 .  
         [0017]     The main controller  13  comprises an interrupt controller  131 , and the main controller  13  is electrically connected respectively to the central processing unit  11 , the memory  15  and the peripheral devices  17 . It is able to cooperate with using a daemon program in order to achieve the purpose of debugging for the peripheral devices  17 , software and whole computer system.  
         [0018]     In general, a main controller  13  is used for the connection and communication between the peripheral devices  17  and the CPU  11  in a computer system. The main controller  13  can be a south bridge, a north bridge or an integrated chip with a south bridge and a north bridge together.  
         [0019]     When the first peripheral device  171  needs the CPU  11  for processing data calculation, the first peripheral device  171  generates an interrupt request (IRQ) signal and transmits the IRQ signal to the interrupt controller  131  of the main controller  13 . The interrupt controller  131  generates a corresponding interrupt signal after receiving the IRQ signal and transmits the interrupt signal to the CPU  11 .  
         [0020]     After receiving the interrupt signal, the CPU  11  suspends the processing process and saves the related data. Then the CPU  11  will search one of the interrupt service routines in the interrupt vector table according to the interrupt signal and executes the interrupt service routine. In this way, the command from the first peripheral device  171  is executed by the CPU  11 . The commands from the second peripheral device  173 , the third peripheral device  175  or other software and firmware can also be executed by the CPU  11  with the same mechanism.  
         [0021]     Second, please refer to  FIG. 2 , which is a flow chart of the preferred embodiment of the present invention, and also to cooperate by the elements in  FIG. 1 . The main idea of the present invention is to provide a daemon monitor program in each interrupt service routine. By using the daemon monitor program, once an interrupt service routine is executed, the daemon monitor program in the interrupt service routine generates an entrant code in the beginning, saves the entrant code into a data storage device, generates an exit code before the interrupt service routine stops, and saves the exit code into the data storage device. Therefore, users can understand that if the executing of interrupt service routines ran into errors by tracing and examining the detail information of the entrant code and the exit code saved in the data storage device, and achieve the purpose of system testing and debugging.  
         [0022]     The method of the present invention comprises the following steps. First, provide interrupt service routines comprising the daemon monitor program. When a peripheral device  17 , software or firmware of the computer system needs the CPU  11  for processing data calculation or command execution, the peripheral device  17  (for example, first peripheral device  171 , second peripheral device  173  or third peripheral device  175 ), software or firmware will generate an IRQ signal and transmit the IRQ signal to the interrupt controller  131  of the main controller  13 , as shown in step  21 .  
         [0023]     When the interrupt controller  131  of the main controller  13  receives an IRQ signal generated by the peripheral device  17 , software or firmware, it will generate a corresponding interrupt signal and transmit the interrupt signal to the CPU  11 , as shown in step  23 .  
         [0024]     The CPU  11  suspends the processing commands or processes after receiving the interrupt signal from the interrupt controller  131 , and saves the related data. Then, the CPU  11  starts searching to the interrupt vector table and finds an interrupt service routine corresponding to the interrupt signal and then executes the interrupt service routine, as shown in step  25 . For example, if the IRQ signal is generated by the first peripheral device  171 , the CPU  11  will find and execute the corresponding interrupt service routine from the interrupt vector table. Thus, it is able to achieve the purpose of using the CPU  11  to execute the command or request from the first peripheral device  171 .  
         [0025]     When the CPU  11  executes the interrupt service routine, the daemon monitor program will generate a corresponding entrant code and saves the entrant code into the data storage device, for example, a hard disk, a flash disk, an optical storage media or a memory  15 , as shown in step  27 .  
         [0026]     When the interrupt service routine goes to the end, the daemon monitor program will also generate a corresponding exit code, in the same way, saving the exit code in the data storage device, as shown in step  29 . After processing a series of testing commands or calculation, there would be a plurality of entrant codes and exit codes saved in the data storage device, as shown in step  31 .  
         [0027]     Each entrant code and exit code comprises identification codes corresponding to the interrupt service routine which generated the entrant code or exit code. Moreover, the entrant code also comprises the time of system executed the interrupt service routine, and the exit code comprises the time of system stopped the interrupt service routine.  
         [0028]     According to the monitor method mentioned above, it is able to monitor and save the data of when the interrupt service routine starts to execute or when it stops. The users can further understand the process of debugging and testing, and it is benefit in the processing of the steps of debugging. For example, if an interrupt service routine is executed but not stopped, there would be only a corresponding entrant code but no exit code in the data storage device. Therefore, users can clearly understand that there are problems occurred in the executing process of the interrupt service routine and find out the corresponding interrupt signal. In addition, users can determine the corresponding interrupt request signal is generated by which one of the peripheral devices, software and firmware and make sure which one of the peripheral devices, software and firmware ran into an error.  
         [0029]     On the other hand, users can also find the difference between the sets of entrant codes and exit codes generated by the daemon monitor program of the interrupt service routine corresponding to the same peripheral device, software or firmware to determine if there is other abnormal conditions occurred in the peripheral device, software or firmware program. For example, when the CPU  11  executes the interrupt service routine corresponding to the interrupt request signal from the second peripheral device  173  for the first time, it generates a first entrant code and a first exit code. When the CPU  11  executes the same interrupt service routine for the second time, it generates a second entrant code and a second exit code. By comparing the first set and second set of the entrant code and exit code, if there are differences between them, it determines that there may be some abnormal conditions occurred during the execution of the interrupt service routine corresponding to the interrupt request signal from the second peripheral device  173 .  
         [0030]     Finally, please refer to  FIG. 3 , a block diagram of saving status of the entrant code and the exit code of a preferred embodiment of the present invention. As shown in the figure, the entrant code  41  comprises a record area  411  and a status area  413 ; the exit code  43  also comprises a record area  431  and a status area  433 . The record areas  411 ,  431  are used for saving the detail information of start-executed or stop-executed of the interrupt service routine. The detail information comprises, for example, the peripheral device corresponding to the interrupt service routine or the identification code of the peripheral device and the time of start-executed or stop-executed of the interrupt service routine.  
         [0031]     Status areas  413 ,  433  are used to label the status of entrant and exit. For example, if the status area  413  records a signal data defined as “0”, it means that the recorded information is an entrant code  41 . On the contrary, if the status area records a signal data “1”, it means that the recorded information is an exit code  43 .  
         [0032]     According to the description above, the present invention relates to a monitor method for computer system, and more particularly to a monitor method of applying within an interrupt service routine for obtaining the further detail information when processing in each interrupt service routine by a daemon monitor program, so as to advantage for detecting and debugging.  
         [0033]     Although the present invention has been explained in relation to its preferred embodiment, it is to be understood that many other possible modifications and variations can be made without departing from the spirit and scope of the invention as hereinafter claimed.