CN1170219C - Method of turning off the system unit safely - Google Patents

Method of turning off the system unit safely Download PDF

Info

Publication number
CN1170219C
CN1170219C CNB011244054A CN01124405A CN1170219C CN 1170219 C CN1170219 C CN 1170219C CN B011244054 A CNB011244054 A CN B011244054A CN 01124405 A CN01124405 A CN 01124405A CN 1170219 C CN1170219 C CN 1170219C
Authority
CN
China
Prior art keywords
shutdown
main frame
operating system
driver
flag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB011244054A
Other languages
Chinese (zh)
Other versions
CN1399193A (en
Inventor
周志圣
洪玉君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CNB011244054A priority Critical patent/CN1170219C/en
Publication of CN1399193A publication Critical patent/CN1399193A/en
Application granted granted Critical
Publication of CN1170219C publication Critical patent/CN1170219C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

The present invention relates to a method for shutting down a host computer, particularly to a safe method for shutting down a host computer. The purpose of the present invention is to utilize a preset normal shutdown program in the operating system of the host computer; after a driver provided by the present invention detects a signal used for showing that the power on/off button of the host computer is pressed, a call operating system enables the driver to automatically execute the normal preset normal shutdown program so as to enable the host computer to be shut down according to a normal shutdown step, thereby maintaining the safety of the operating system. The damage of the operating system or the hardware of the host computer caused by the sudden touch of a user for the power on/off button of the host computer can be avoided; the loss of the internal data in the host computer, and the increase of production cost caused by the loss can be also avoided; the present invention can also provide a quick shutdown mechanism, so that the user doesn't need to shut down the host computer by remote shutdown by another computer.

Description

The method of safety shutdown main frame
Technical field
The present invention relates to a kind of method of Shutdown Hosts, relate in particular to a kind of method of safety shutdown main frame.The present invention is for utilizing the default normal shutdown program of operating system on main frame, detecting host power switch at driver provided by the present invention has been pressed behind the signal that is sent, the call operation system makes it automatically perform default normal shutdown program, with the safety of attended operation system.
Background technology
Computing machine has become an indispensable instrument in the modern life, no matter be to be used for work or leisure, this equipment of computing machine is all being played the part of very important role to meet user's demand.And the best sharp weapon that computing machine stores data especially, it can be put many data using control programs into different categories, makes tradition need a large amount of manpowers of cost to converge whole data, can utilize the help of computing machine and the consumption of saving manpower, and increases work efficiency.Computing machine also can make the data check, and the person utilizes the help of program, promptly inquires needed data content, with the required consumed time of saving inquiry data, and meets the efficient that present industrial and commercial society is paid attention to.
Operating system then is not to use the translation interface between person and the computing machine, makes between the two and can talk mutually.In brief, interface between operating system person of being to use and the hardware, when the user issues orders (command) to computing machine, all received by a very special system software (operating system), the operating system action that becomes hardware to carry out command conversion then, transfer to hardware again and carry out, the last operation system also will be presented at the result who executes above the screen and allow the user understand.
Different operating system has different operating modes, but before the user will be closed in the power supply of main frame, the user all need earlier will be just on operating system performed closing application program, again through a correct shutdown procedures, could operating system be decommissioned, and the power supply of the main frame of shutting down computer.The power supply of main frame if when operating system is still operating, shut down computer suddenly, force operating system not through the step of a normal shutdown and decommission immediately, then the phenomenon of confusion or archives loss may take place in the program in the operating system, make the user when the power supply of next time opening main frame and activation manipulation system, operating system can't operate normally and cause user's puzzlement.
Present operating system is a variety of along with user's demand is divided into, and selecting for use also of main frame adopted multi-form main frame along with the different demand of enterprise.And the different operating system suitable main frame of must arranging in pairs or groups, with the effect of performance operating system maximum.The main frame of the general window that adopts (windows) operating system all supports rank configuration and power management (advanced configuration ﹠amp at present; Power interface; ACPI) host power supply supervisory routine, this advances rank configuration and power management can allow the user see through window interface to tell operating system, after the user pressed power switch, operating system should be made the action .. of " suspending (suspend) " or " shutdown (shutdown) ".After the user pressed power switch and kept for four seconds, the chipset on the main frame (chipset) hardware circuit promptly forced host power supply to stop, with the forced closing main frame.So-called halted state is for program, the execution of interim interrupt operation system, but the content in reservation Dram and the buffer, and in the time of must replying execution with convenient system, the operation of recovery operation system fast.Therefore when the user must be by the host power switch Shutdown Hosts, there is the operating system of supporting rank configuration and powder source management mode will can not cause the damage partly of operating system or host hardware because of pressing power switch suddenly.
And currently used (SuSE) Linux OS, will not advance the support scope that rank configuration and power management are included operating system in owing to considering of product, do not support under the operating system of into rank configuration and power management at this type of, when the user desires Shutdown Hosts, just can't come Shutdown Hosts safely by " pressing power switch ".The user is except must be first the application program carried out of shut-down operation system, also must import shutdown command one by keyboard, this shutdown command is " shutdown-h now ", after the operating system of Linux is received this instruction, just can carry out normal shutdown program in proper order.If the user directly presses host power switch, host power supply will be cut off immediately and cause the undesired shutdown of main frame.The phenomenon of this undesired shutdown will easily make operating system archives damages and when causing system to start shooting again next time, must reexamine hard disk, make starting up speed very slowly.The phenomenon of this undesired shutdown also might make the damage of the program structure of operating system, and causes system can't enter when starting shooting again next time.The phenomenon of this undesired start more likely makes the damage of host hardware part, and causes part to be stored in the loss of the data in the main frame.
In present employed main frame, difference along with enterprise demand, some uses the main frame of (SuSE) Linux OS not support into rank configuration and power management, and do not connect keyboard and display, therefore can't provide the user to carry out the program of normal Shutdown Hosts, and can't allow the running of user's monitor operating system in display with the keyboard operating system of ordering.The user is before desire is changed the assembly on the main frame or desired to carry out the maintenance of operating system, and the operating system that close on this kind main frame is only pressed host power switch one way, and improves the chance that operating system is damaged.
Summary of the invention
In above-mentioned background of invention, utilize traditional closedown method Shutdown Hosts safely, and keep the integrality of operating system on the main frame.The invention provides a method, the default normal shutdown program of the operating system of utilization on main frame, detecting host power switch at driver provided by the present invention has been pressed behind the signal that is sent, the call operation system makes it automatically perform default normal shutdown program, with the safety shutdown main frame.
Second purpose of the present invention is for utilizing the default normal shutdown program of operating system on main frame, detecting host power switch at driver provided by the present invention has been pressed behind the signal that is sent, the call operation system makes it automatically perform default normal shutdown program, with the safety of attended operation system.
The 3rd purpose of the present invention is for utilizing the default normal shutdown program of operating system on main frame, detecting host power switch at driver provided by the present invention has been pressed behind the signal that is sent, the call operation system makes it automatically perform default normal shutdown program, with the safety of data stored in the maintenance host.
The 4th purpose of the present invention is for utilizing the default normal shutdown program of operating system on main frame, oneself is pressed behind the signal that is sent to detect host power switch at driver provided by the present invention, the call operation system makes it automatically perform default normal shutdown program, to promote the main frame efficiency of operating.
A further object of the present invention is for utilizing the default normal shutdown program of operating system on main frame, detecting host power switch at driver provided by the present invention has been pressed behind the signal that is sent, the call operation system makes it automatically perform default normal shutdown program, to prolong the serviceable life of main frame.
According to above-described purpose, the invention provides a method, the default normal shutdown program of the operating system of utilization on main frame, detecting host power switch at driver provided by the present invention has been pressed behind the signal that is sent, the call operation system makes it automatically perform default normal shutdown program, with the safety of safety shutdown main frame and attended operation system.But the present invention is the safety of stored data and promote the main frame efficiency of operating in the maintenance host also.The present invention more can prolong the serviceable life of main frame.
Description of drawings
Fig. 1 is the process flow diagram of utilization safety shutdown main frame of the present invention.
Embodiment
Some embodiments of the present invention can be described in detail as follows.Yet except describing in detail, the present invention can also be widely implements at other embodiment, and scope of the present invention do not limited, its with after claim be as the criterion.
Prosperity along with science and technology, the user is also more and more higher to the dependence of main frame, therefore in the main frame stored data also phase shape become more and more important, in case when not utilizing keyboard input shutdown command just to press host power switch on the machine as yet to close the operating system of not supporting rank configuration and power management, host power supply will be cut off immediately and influence the program structure of operating system, or cause the damage of the inner stored data of main frame.This abnormal shutdown phenomenon can make company suffer tremendous loss, therefore must utilize the method for safety shutdown of the present invention, makes and does not support the operating system of rank configuration and power management to close safely.
The operating system major part that the Linux of rank configuration and power management is advanced in general support is used on two kinds of main frames, wherein a kind of main frame is that to utilize static disk (flash disk) to come access data, another kind of main frame then be in addition to come the access data with hard disk (hard disk).Though use its operating system of main frame of static disk to there is no the pattern of supporting rank configuration and power management, be stored in the data on the static disk, can't lose or cause the damage of host hardware part because of closing suddenly of host power supply.And when closing the power supply of the main frame that uses hard disk suddenly, data in the hard disk is damaged or the phenomenon of entanglement easily, and make the user when starting shooting again next time, the operating system injury that the action of inspecting and revise this undesired shutdown is caused the data structure of must taking time.If the power supply the when data in hard disk is being read or is depositing on the unexpected Shutdown Hosts, the hard track on a drum or a disk of easier damage causes the loss of data stored in the hard disk, reduces the serviceable life of hard disk.Following embodiment is used in the main frame that uses hard disk with method of the present invention, and the operating system on the main frame do not support the into pattern of rank configuration and power management, does not still limit its scope of invention.
Common one uses the main frame of hard disk, if the operating system of its use is not for supporting the (SuSE) Linux OS of rank configuration and power management, then before host power supply will be closed, must utilize keyboard that next road of operating system is instructed with safety shutdown operating system, just can press host power switch afterwards with the Shutdown Hosts power supply.This instruction is generally " shutdown-h now ".But difference along with enterprise demand, often as the main frame of server (server), equal on-keyboard and display, maintenance or necessary shutdown renewal part if main frame must shut down, must connect keyboard and display more in addition, or be linked on another computing machine with the suitable time-consuming and trouble of the input of carrying out shutdown command.If directly press the power switch on the main frame, though can reduce spent time of shutdown, can influence the serviceable life of hard disk and cause the damage or the loss of the data on the hard disk, therefore must utilize method of the present invention, so that Host Security is closed.
The present invention sets up a driver provided by the present invention at first earlier under operating system, this driver can the call operation system make it automatically perform the normal shutdown program.When the user pressed power switch on the main frame and desires Shutdown Hosts, host power switch can be sent a system management interrupt (system managementinterrupt by chipset; SMI) central processing unit (CPU) of signal to the main frame, central processing unit can be carried out immediately and be positioned at basic input/output (basic input/output system; BIOS) Nei system management interrupt service routine code. after the basic input/output on the main frame received this shut down event, this interrupt service routine code was set up a shutdown flag immediately and is stored in the available internal memory.This shutdown flag is a kind of of signal, and adopts the shutdown flag whether to depress the foundation of power switch as differentiation in the present embodiment, but does not limit its scope of invention.Present embodiment is that the shutdown flag is stored in (the complementary metal oxide semiconductor of a complementary type metal-oxide-semiconductor (MOS) on the host computer system; CMOS) random access memory (random accessmemory; RAM) on, but do not limit its scope of invention.Set up the purpose of a shutdown flag (shutdown flag) at the fixed address place of complementary type metal-oxide-semiconductor (MOS) random access memory, be the message of notifying driver one shut down event provided by the present invention to produce.
Complementary type metal-oxide-semiconductor (MOS) random access memory is normally as the usefulness of basic input/output message access.On complementary type metal-oxide-semiconductor (MOS) random access memory (CMOS RAM) normally with 0 and 1 pattern of representing signal, the deviser can set 0 at a certain fixed address place on the complementary type metal-oxide-semiconductor (MOS) random access memory be a normal flag, and 1 be a shutdown flag, differentiates the kind of signal and do suitable running with convenient driver provided by the present invention.
After driver provided by the present invention hangs up operating system, this driver will be monitored the stored position of shutdown flag on this complementary type metal-oxide-semiconductor (MOS) random access memory constantly, driver of the present invention will go to scan the stored position of shutdown flag on the complementary type metal-oxide-semiconductor (MOS) random access memory p.s. once, but along with user's demand, will prolong or shorten this interval time that scans.In case driver finds that after having set up the shutdown flag on the complementary type metal-oxide-semiconductor (MOS) random access memory, driver call operation system immediately makes it carry out normal shutdown program in proper order, and system is normally closed, the power supply of last Shutdown Hosts.The step of this normal shutdown can prevent the phenomenon that the data structure of operating system is damaged, and also can prevent the phenomenon that hard track on a drum or a disk is damaged.When system started shooting next time, the basic input/output of main frame will internal memory be deleted this shutdown flag automatically made it revert to a normal flag, next just begins to enter operating system to carry out the normal operation of main frame.
With reference to shown in Figure 1, this is the process flow diagram of utilization safety shutdown main frame of the present invention.At first press power switch to open the power supply 10 of main frame, next enter the basic input/output 12 of main frame.Basic input/output begins initialization system management mode (System Management Mode, SMM), and begin system can (enable) by system management interrupt (the System managementInterrupt of central processing unit that chipset is issued to, SMI), and begin to provide system management interrupt service routine (SMI Handler Routine) for central processing unit with 21.Then basic input/output is stored in the shutdown flag 14 that sets on the complementary type metal-oxide-semiconductor (MOS) random access memory before can removing earlier before operating system loads.Next operating system operates simultaneously with basic output/input system.On the one hand if system produces system management interrupt, central processing unit will suspend present work, then carry out the system management interrupt service routine 22 that basic input/output provided, this program will be checked the source of interrupting, and whether press 23 to judge power switch.If the source of interrupting is that power switch is pressed, a fixed position of a complementary type metal-oxide-semiconductor (MOS) random access memory that then can be on host computer system is provided with a shutdown flag 24.If judge that power switch is not pressed, then carry out the service 25 of other system management interrupt signal.Work 26 before central processing unit promptly recovers to interrupt after the EOP (end of program).On the other hand, operating system then begins to load, and loads a driver 16 that is used to detect the shutdown flag provided by the present invention.When operating system and driver load finish after, whether the fixed position that this driver begins to detect constantly complementary type metal-oxide-semiconductor (MOS) random access memory immediately produces a shutdown flag 18.In case driver detects the shutdown flag on the complementary type metal-oxide-semiconductor (MOS) random access memory, then the driver program of the automatic Shutdown Hosts of call operation system immediately just cuts off the electricity supply 20 after the program that operating system is normally closed automatically.
Comprehensively above-mentioned, the invention provides a method, the default normal shutdown program of the operating system of utilization on main frame, detecting host power switch at the driver provided by the present invention on the operating system has been pressed behind the signal of the system management interrupt sent, driver provided by the present invention is that the call operation system makes it automatically perform default normal shutdown program, and the power supply of Shutdown Hosts, with the safety of safety shutdown main frame and attended operation system.But the present invention is the safety of stored data and promote the main frame efficiency of operating in the maintenance host also.The present invention more can prolong the serviceable life of main frame.
The above only is preferred embodiment of the present invention, this embodiment only be used for the explanation but not in order to limit claim of the present invention.Still can be changed in the category that does not break away from flesh and blood of the present invention and implemented, these variations should still belong to scope of the present invention.

Claims (12)

1. the method for safety shutdown one main frame, wherein this method comprises at least:
Produce a system management interrupt signal by a host power switch;
Changing this system management interrupt signal is a shutdown flag, and the flag of should shutting down is stored in a memory device;
Utilize a driver to detect this shutdown flag; And
After this driver detects this shutdown flag, utilize this driver to call out an operating system to carry out an automatic Shutdown Hosts program.
2. the method for claim 1 is characterized in that, above-mentioned main frame comprises a complementary type metal-oxide-semiconductor (MOS) random access memory at least.
3. the method for claim 1 is characterized in that, above-mentioned memory device can be a complementary type metal-oxide-semiconductor (MOS) random access memory.
4. the method for claim 1 is characterized in that, the aforesaid operations system is a (SuSE) Linux OS.
5. the method for safety shutdown one main frame, wherein this method comprises at least:
At this main frame is to hang a driver under the situation of starting shooting on an operating system, this driver can detect the shutdown of one on memory device flag, and this operating system of calling automatically performs an automatic Shutdown Hosts program after this driver detects this shutdown flag;
By next host power switch to produce a system management interrupt signal; And
Change this system management interrupt signal and be this shutdown flag, and the flag of should shutting down is stored on this memory device.
6. method as claimed in claim 5 is characterized in that, above-mentioned main frame comprises a complementary type metal-oxide-semiconductor (MOS) random access memory at least.
7. method as claimed in claim 5 is characterized in that, above-mentioned memory device can be a complementary type metal-oxide-semiconductor (MOS) random access memory.
8. method as claimed in claim 5 is characterized in that, the aforesaid operations system is a (SuSE) Linux OS.
9. method as claimed in claim 5 is characterized in that above-mentioned main frame comprises a hard disk at least.
10. the method for safety shutdown one main frame, wherein this method comprises at least:
Open the power switch of this main frame, and remove the shutdown flag in the complementary type metal-oxide-semiconductor (MOS) random access memory;
Hang a driver on an operating system, this driver can be called out this operating system and automatically perform an automatic Shutdown Hosts program;
Press this power switch to produce a system management interrupt signal;
Change this system management interrupt signal and be this shutdown flag, and the flag of should shutting down is stored in this complementary type metal-oxide-semiconductor (MOS) random access memory;
Utilize this driver to detect this shutdown flag; And
After this driver detected this start flag, this driver was called out this operating system to carry out this automatic Shutdown Hosts program and to close this main frame.
11. method as claimed in claim 10 is characterized in that, the aforesaid operations system is a (SuSE) Linux OS.
12. method as claimed in claim 10 is characterized in that, above-mentioned main frame comprises a hard disk at least.
CNB011244054A 2001-07-24 2001-07-24 Method of turning off the system unit safely Expired - Fee Related CN1170219C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB011244054A CN1170219C (en) 2001-07-24 2001-07-24 Method of turning off the system unit safely

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB011244054A CN1170219C (en) 2001-07-24 2001-07-24 Method of turning off the system unit safely

Publications (2)

Publication Number Publication Date
CN1399193A CN1399193A (en) 2003-02-26
CN1170219C true CN1170219C (en) 2004-10-06

Family

ID=4665651

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB011244054A Expired - Fee Related CN1170219C (en) 2001-07-24 2001-07-24 Method of turning off the system unit safely

Country Status (1)

Country Link
CN (1) CN1170219C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995711B (en) * 2010-03-30 2018-02-02 鸿富锦精密工业(深圳)有限公司 Electronic calculator device and its method for restarting
CN103294564B (en) * 2012-03-05 2018-10-12 联想(北京)有限公司 A kind of closedown method, information processing method and electronic equipment
CN102750477B (en) * 2012-06-11 2014-03-19 腾讯科技(深圳)有限公司 Method and system for controlling closing of terminal

Also Published As

Publication number Publication date
CN1399193A (en) 2003-02-26

Similar Documents

Publication Publication Date Title
JP3058986B2 (en) Computer system power saving controller
JP3090767B2 (en) Computer system power saving controller
US6622192B2 (en) Method of shutting down a server in safety
CN101673216A (en) Method and device for closing application program
JPH0683491A (en) Electric-power-distribution control system of portable computer
EP3591485B1 (en) Method and device for monitoring for equipment failure
EP2972826B1 (en) Multi-core binary translation task processing
CN102693136A (en) Quick starting method and system for computer and starting system of computer
WO2024113813A1 (en) Power consumption reducing method and system, computer device and storage medium
CN1495585A (en) Method for defining CPU operation factor regardless of operation system and system
CN111984108A (en) Control method, circuit and system for reducing standby power consumption of computer mainboard
CN1170219C (en) Method of turning off the system unit safely
CN108089889B (en) Method for realizing quick start of Linux operating system
CN1148646C (en) High-safety shtdown method for protecting Window 9X system
CN112068940A (en) Real-time task scheduling method, device, scheduling system and storage medium
CN102023887B (en) Power supply management method of computer system and computer system
JP4411014B2 (en) Computer and power supply backup method thereof
CN1892608A (en) Interruption control system and method
CN102103403A (en) Power management method and computer system using same
CN112068980B (en) Method and device for sampling information before CPU suspension, equipment and storage medium
CN111897581B (en) Screen-off awakening method and device, storage medium and all-in-one machine equipment
JPH10207586A (en) Power-off control system for computer
CN100485624C (en) Method for backing up BIOS
CN101692184B (en) Energy-saving storage equipment and energy-saving method thereof
CN112559057B (en) Shutdown processing method and device

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20041006

Termination date: 20100724