CN109669728B - Software shutdown method and device for VxWorks operating system - Google Patents

Software shutdown method and device for VxWorks operating system Download PDF

Info

Publication number
CN109669728B
CN109669728B CN201811534201.4A CN201811534201A CN109669728B CN 109669728 B CN109669728 B CN 109669728B CN 201811534201 A CN201811534201 A CN 201811534201A CN 109669728 B CN109669728 B CN 109669728B
Authority
CN
China
Prior art keywords
shutdown
hardware
instruction
registration command
operating system
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.)
Active
Application number
CN201811534201.4A
Other languages
Chinese (zh)
Other versions
CN109669728A (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.)
Shenzhen Zhongke Yixin Technology Co ltd
Original Assignee
Shenzhen Zhongke Yixin Technology Co ltd
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 Shenzhen Zhongke Yixin Technology Co ltd filed Critical Shenzhen Zhongke Yixin Technology Co ltd
Priority to CN201811534201.4A priority Critical patent/CN109669728B/en
Publication of CN109669728A publication Critical patent/CN109669728A/en
Application granted granted Critical
Publication of CN109669728B publication Critical patent/CN109669728B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/442Shutdown

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention relates to a software shutdown method and device for a VxWorks operating system, computer equipment and a storage medium. The method comprises the following steps: acquiring a shutdown registration command; restarting the system and generating a system shutdown instruction according to the shutdown registration command; and controlling the bottom hardware to work in a shutdown state according to the system shutdown instruction. Therefore, the application data and the system level cache data can be stored in time, and the damage probability of hardware peripherals is reduced.

Description

Software shutdown method and device for VxWorks operating system
Technical Field
The invention relates to the technical field of computer operating systems, in particular to a software shutdown method and device of a VXWorks operating system, computer equipment and a storage medium.
Background
The X86 mainboard has a set of specification called ACPI, and by means of hardware and software interfaces defined by the specification, the Windows/Linux operating system can be powered off by software as long as the ACPI specification is realized.
At present, the hardware design of the X86 mainboard follows the ACPI specification, but the VXWorks operating system does not support the ACPI specification, so that the software shutdown cannot be performed like a Windows/Linux operating system, and no related software shutdown command exists.
When the traditional VXWorks operating system operates and works, the system is required to stop working, and only hardware shutdown is required, namely, a main board power supply is directly unplugged for power-off shutdown, so that great risk can be brought to the stability and reliability work of the system.
Disclosure of Invention
In view of the above, it is necessary to provide a software shutdown method, apparatus, computer device and storage medium for a VxWorks operating system, which can reliably shut down.
In a first aspect, an embodiment of the present invention provides a software shutdown method for a VxWorks operating system, including:
acquiring a shutdown registration command;
restarting the system and generating a system shutdown instruction according to the shutdown registration command;
and controlling the bottom hardware to work in a shutdown state according to the system shutdown instruction.
In some embodiments, the restarting the system according to the shutdown registration command includes:
and notifying a system service and an application program to execute restarting operation according to the shutdown registration command.
In some embodiments, the restart operation comprises: resetting the network, shutting down the peripheral, refreshing the cache, and notifying the system that a reset is to occur.
In some embodiments, the notifying a system service and an application program to perform a reboot operation according to the shutdown registration command includes:
and executing a reboot function according to the shutdown registration command so as to inform system services and application programs to execute restarting operation.
In some embodiments, the controlling, according to the system shutdown instruction, the bottom layer hardware to operate in a shutdown state includes:
according to the system shutdown instruction, closing the interrupt service;
and after the interrupt service is closed, sending a hardware shutdown instruction to bottom hardware so as to enable the bottom hardware to work in a shutdown state.
In some embodiments, the turning off the interrupt service according to the system shutdown instruction includes:
and executing the sysToMonitor function according to the system shutdown instruction so as to close the interrupt service.
In some embodiments, the underlying hardware includes a power supply;
the control bottom layer hardware works in a shutdown state, and the control bottom layer hardware comprises the following steps:
and sending a power supply shutdown instruction to the power supply so that the power supply is shut down according to the power supply shutdown instruction.
In a second aspect, an embodiment of the present invention further provides a software shutdown apparatus for a VxWorks operating system, including:
the acquisition module is used for acquiring a shutdown registration command;
the restarting and generating module is used for restarting the system and generating a system shutdown instruction according to the shutdown registration command;
and the shutdown module is used for controlling the bottom layer hardware to work in a shutdown state according to the system shutdown instruction.
In some embodiments, the restart and generation module is specifically configured to:
and notifying a system service and an application program to execute restarting operation according to the shutdown registration command.
In some embodiments, the restart operation comprises: resetting the network, shutting down the peripheral, refreshing the cache, and notifying the system that a reset is to occur.
In some embodiments, the restart and generation module is further specifically configured to:
and executing a reboot function according to the shutdown registration command so as to inform system services and application programs to execute restarting operation.
In some embodiments, the shutdown module is specifically configured to:
according to the system shutdown instruction, closing the interrupt service;
and after the interrupt service is closed, sending a hardware shutdown instruction to bottom hardware so as to enable the bottom hardware to work in a shutdown state.
In some embodiments, the shutdown module is further specifically configured to:
and executing the sysToMonitor function according to the system shutdown instruction so as to close the interrupt service.
In some embodiments, the underlying hardware includes a power supply;
the shutdown module is specifically configured to:
and sending a power supply shutdown instruction to the power supply so that the power supply is shut down according to the power supply shutdown instruction.
In a third aspect, an embodiment of the present invention further provides a computer device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the processor is caused to execute the above method.
According to the software shutdown method of the VxWorks operating system, the shutdown registration command is acquired, the system is restarted according to the shutdown registration command, the system shutdown command is generated, and the bottom hardware is controlled to work in a shutdown state according to the system shutdown command. On one hand, the shutdown reliability can be improved, and the damage probability of the hardware peripheral can be reduced. On the other hand, before shutdown, the system can be restarted, so that some application programs or system services in the system can store application data and system level cache data in time, and safe shutdown is realized.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1a is a schematic view of an application scene of a software shutdown method of a VxWorks operating system according to the invention;
FIG. 1b is a schematic diagram of another application scenario of the software shutdown method of the VxWorks operating system of the present invention;
FIG. 2 is a flow chart of one embodiment of a software shutdown method of the VxWorks operating system of the present invention;
FIG. 3 is a flow chart of the system restart of the present invention;
FIG. 4 is a flow chart of the system shutdown of the present invention;
FIG. 5 is a flow chart of another embodiment of the software shutdown method of the VxWorks operating system of the present invention;
FIG. 6 is a block diagram of the software shutdown apparatus of the VxWorks operating system according to an embodiment of the present invention;
FIG. 7 is a block diagram of another embodiment of the software shutdown apparatus of the VxWorks operating system of the present invention;
fig. 8 is a hardware configuration diagram of an embodiment of the computer apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The software shutdown method of the VxWorks operating system is applicable to the application scene shown in FIG. 1a, and comprises an application layer shutdown module 102, an operating system layer shutdown module 104 and a bottom hardware shutdown module 106, wherein the application layer shutdown module 102 is a software shutdown inlet and provides a shutdown operation interface for a user to realize a shutdown command, the operating system layer shutdown module 104 provides a function interface to realize application program shutdown notification, and the functions of closing an active peripheral device through a peripheral device driver, stopping system services and components and the like are realized, the bottom hardware shutdown module 106 provides a core interface related to ACPI and shutdown, and operates a related hardware register to enable hardware to enter an S3 state. When the user executes the shutdown operation, the function provided by the application layer shutdown module 102 is called, the function enters the operating system layer shutdown module 104, and finally the shutdown of the motherboard is completed through the bottom layer hardware shutdown module 106. The application data and the system level cache data can be stored in time, and the damage probability of hardware peripherals is reduced.
Referring to fig. 1b, the software shutdown method for the VxWorks operating system provided by the present invention is applicable to a computer, and the computer includes a motherboard 101, an I/O device 103, and a hard disk 105, where the motherboard 101 runs the application layer shutdown module, the operating system layer shutdown module, and the bottom layer hardware shutdown module, where the I/O device 103 may specifically be a keyboard, a mouse, a scanner, a display, and the like, and the hard disk 105 may specifically be a Solid State Disk (SSD), a mechanical hard disk (HDD), a hybrid hard disk, and the like. The I/O device 103 is connected to the bus via an interface, the I/O device 103 receiving address information from the address bus, deriving control signals from the control bus, and connecting to other components via a data bus. The bus is an internal structure of computer, it is a public channel for transferring information by CPU, internal memory, input and output devices, all the components of computer are connected by means of bus, and the external device is connected with bus by means of correspondent interface circuit to make data interaction. When shutdown operation is performed on the I/O device 103, the I/O device 103 is connected to the motherboard 101 through a data bus, enters an application layer shutdown module, which is a software shutdown entry to provide a shutdown operation interface for the user, then enters an operating system layer shutdown module, shuts down the active hard disk 105 through a peripheral driver, stops functions such as system services and components, and finally jumps to a bottom layer hardware shutdown module, operates a related hardware register, causes the hardware to enter an S3 state, and finally completes shutdown of the motherboard 101. Therefore, the application data and the system level cache data can be stored in time, and the damage probability of the hardware peripheral is reduced.
As shown in fig. 2, an embodiment of the present invention provides a software shutdown method for a VxWorks operating system, including:
step 202, a shutdown registration command is obtained.
The shutdown registration command is used to trigger the application layer shutdown module to execute a shutdown operation, and may be a code segment such as a character string written by a user or a shutdown registration command formed by a trigger peripheral, for example, the shutdown registration command may be issued by continuously pressing a power key for 1 minute.
When the computer is shut down, a user sends a shutdown registration command to the VxWorks operating system, and then the shutdown registration command is executed by a VxWorks shell (VxWorks kernel) to enter an operating system layer shutdown module.
In some embodiments, the VxWorks operating system may provide a user with a friendly UI interface so that the user enters a shutdown registration command on the UI interface, which the VxWorks operating system then obtains.
Step 204, according to the shutdown registration command, restarting the system and generating a system shutdown instruction.
As shown in fig. 3, when entering the shutdown module of the operating system layer, the VxWorks operating system restarts the system according to the shutdown registration command, for example, the VxWorks operating system notifies the system service and the application program to execute a restart operation, where the restart operation includes: resetting the network, shutting down the peripheral, refreshing the cache, and notifying the system that a reset is to occur.
In the traditional technology, when shutdown operation needs to be performed on the VxWorks operating system, the traditional VxWorks operating system does not support software shutdown, so that the traditional VxWorks operating system can only be powered off through hardware, namely, a user directly unplugs a main board power supply in the VxWorks operating system to achieve power-off shutdown. For example, upon power failure, the cached data in the memory is immediately lost and cannot be timely saved to an external storage device (e.g., a hard disk), which results in data loss. Moreover, if the mechanical hard disk is in a working state, the power is suddenly cut off, which causes the damage of the mechanical hard disk and the like, and the stable and reliable operation of the system is seriously influenced.
Therefore, the conventional techniques have at least the following problems:
1. the application program cannot perceive that the VxWorks operating system is about to be shut down and loses application level data.
Many applications cannot know that the system is going to be shut down and cannot perform relevant processing, such as saving application data, issuing an alarm, logging, and the like.
2. System level cache data is lost.
The VxWorks operating system needs to cache data in the memory, and by adopting the simple rough shutdown mode, a CPU of the VxWorks operating system cannot refresh the data in the memory to an external storage device (such as a hard disk) in time.
3. The probability of damaging the hardware peripheral is increased.
For example, such a shutdown mode may cause damage to the mechanical hard disk while the mechanical hard disk is in operation.
In this embodiment, before shutdown, some application programs or system services in the system can save the application data and the system level cache data in time by restarting the system, so that safe shutdown is realized.
In some embodiments, when restarting the system, the VxWorks operating system executes a reboot function according to the shutdown registration command to notify the system service and the application program to execute a restart operation. The reboot function can ensure that the restarting function of the operating system level is normal, then reset the system network, namely, the VxWorks operating system returns to the initial state, then close the peripheral equipment, namely close the active peripheral equipment through the peripheral equipment driving program, then refresh the cache, secondly inform that the VxWorks operating system is about to be reset, through resetting the specific functional unit, the network function is ensured to normally stop working from the system level, the system cache is reliably refreshed, the system service and the application program can sense that the operating system is about to be restarted and correspondingly process the VxWorks operating system, for example, the application program can timely store important data in a hard disk after receiving the notice that the VxWorks operating system is about to be restarted.
When the VxWorks operating system is restarted, the VxWorks operating system generates a system shutdown instruction, and the system shutdown instruction is used for indicating that bottom hardware works in a shutdown state.
In some embodiments, the system shutdown instruction may be an instruction for calling another function in the process of executing the reboot function, and the other function is used for assisting the reboot function to reliably and stably shutdown the VxWorks operating system. For example, the other function is the sysToMonitor function, which is a function highly related to specific hardware and located in the board-level support package, and the user can modify the function according to the actual hardware, and the specific function of the function is to close the interrupt and jump to the entry of the VxWorks operating system.
And step 206, controlling the bottom layer hardware to work in a shutdown state according to the system shutdown instruction.
After jumping to the entrance of the VxWorks operating system, the VxWorks operating system polls the working state of each bottom hardware according to a system shutdown instruction, and if the working state of the bottom hardware is 'working', the VxWorks operating system sends a hardware shutdown instruction to the bottom hardware to indicate the bottom hardware to be shut down. And if the working state of the bottom hardware is 'shutdown', the VxWorks operating system does not send a hardware shutdown instruction to the bottom hardware, and the current shutdown state of the bottom hardware is maintained.
In some embodiments, the VxWorks operating system may directly send a hardware shutdown instruction to all bottom-layer hardware without polling the operating states of the bottom-layer hardware one by one, so that the corresponding bottom-layer hardware is shutdown.
In some embodiments, in the process of controlling the bottom-layer hardware to work in the shutdown state, the VxWorks operating system closes the interrupt service according to the generated system shutdown instruction. And after the interrupt service is closed, sending a hardware shutdown instruction to the bottom layer hardware so as to enable the bottom layer hardware to work in a shutdown state. Therefore, before jumping to the bottom hardware shutdown module, the VxWorks operating system firstly closes the interrupt service, so that the subsequent shutdown of the bottom hardware can be indicated more stably and reliably, and the shutdown low working efficiency caused by the disturbance of other high-priority interrupts is avoided.
In some embodiments, the VxWorks operating system executes the systomultitor function according to a system shutdown instruction to close the interrupt service. Since the sysToMonitor function can be modified according to the actual hardware, in this embodiment, the sysToMonitor function is modified to have the function of closing the interrupt and jumping to the bottom hardware shutdown module.
As shown in fig. 4, specifically, a reboot function is executed first, which can ensure that the restart function of the operating system is normal, the system network is reset, that is, the system returns to an initial state, then the peripheral device is closed, that is, the active peripheral device is closed by the peripheral device driver, then the cache is refreshed, next the system is notified to be reset, after the systonometer function is closed and interrupted, the system jumps to a bottom hardware shutdown module, and a hardware shutdown instruction is sent to the bottom hardware, so that the bottom hardware works in a shutdown state. The bottom hardware shutdown module provides an ACPI (advanced peripheral interface) and shutdown related core interface, operates related hardware registers, enables the hardware to enter an S3 state, suspends the hardware into a memory in an S3 state, and stores working data of the system before the system enters the S3 state into the memory.
In some embodiments, the underlying hardware includes various types of peripherals, such as power supplies, hard disks, memory, displays, power amplifiers, and so forth.
Generally speaking, by acquiring a shutdown registration command, restarting the system and generating a system shutdown command according to the shutdown registration command, and controlling the bottom layer hardware to work in a shutdown state according to the system shutdown command, on one hand, the shutdown reliability can be improved, and the damage probability of the hardware peripheral equipment can be reduced. On the other hand, before shutdown, the system can be restarted, so that some application programs or system services in the system can store application data and system level cache data in time, and safe shutdown is realized.
In an embodiment, in the software shutdown method of the VxWorks operating system, as shown in fig. 5, bottom-layer hardware includes a power supply, and when the power supply is controlled to operate in a shutdown state, the VxWorks operating system sends a power supply shutdown instruction to the power supply, so that the power supply is shut down according to the power supply shutdown instruction. In some embodiments, the power shutdown instruction may be an instruction that follows a power shutdown protocol.
In some embodiments, the power supply is an ATX power supply, which functions to convert 220V AC power to 5V, 12V, 3.3V DC power for use inside the computer. The ATX power is controlled by the PSON signal, and when the PSON signal is low, i.e. the power shutdown command is the PSON signal of low level, the ATX power stops supplying power to the X86 motherboard, and the X86 motherboard is powered off and shutdown accordingly. The south bridge SLP _ S3 is set on the X86 mainboard, the pin of SLP _ S3 is connected to the PSON pin of ATX power supply, the south bridge of the X86 CPU is set with relevant register to control the signal of SLP _ S3 pin, as long as the corresponding level is output on SLP _ S3 pin to make PSON low, the ATX power supply will stop supplying power to the X86 mainboard, and the X86 mainboard will be powered off and shut down. In other embodiments, the pin on the X86 motherboard may be GPIO0, the pin of GPIO0 is connected to the PSON pin of the ATX power supply, and the south bridge of the X86 cpu is provided with a related register to control the signal of the GPIO0 pin, so that as long as the corresponding level is output on the GPIO0 pin to make the PSON low, the ATX power supply will stop supplying power to the X86 motherboard, and the X86 motherboard will be powered off and shut down accordingly.
It should be noted that, in the foregoing embodiments, a certain order does not necessarily exist between the foregoing steps, and it can be understood by those skilled in the art from the description of the embodiments of the present invention that, in different embodiments, the foregoing steps may have different execution orders, that is, may be executed in parallel, may also be executed in an exchange manner, and the like.
Correspondingly, an embodiment of the present invention further provides a software shutdown apparatus for a VxWorks operating system, and as shown in fig. 6, the software shutdown apparatus 600 for the VxWorks operating system includes:
an obtaining module 602, configured to obtain a shutdown registration command.
And a restart and generation module 604, configured to restart the system and generate a system shutdown instruction according to the shutdown registration command.
And a shutdown module 606, configured to control the bottom layer hardware to operate in a shutdown state according to the system shutdown instruction.
According to the software shutdown device of the VxWorks operating system, the shutdown registration command is acquired, the system is restarted and the system shutdown command is generated according to the shutdown registration command, and the bottom-layer hardware is controlled to work in a shutdown state according to the system shutdown command, so that the application data and the system-level cache data can be stored in time, and the damage probability of hardware peripheral equipment is reduced.
Optionally, in another embodiment of the apparatus, referring to fig. 7, the apparatus 600 further includes:
the notification module 608 is configured to notify the system service and the application program to perform a restart operation according to the shutdown registration command.
Optionally, in another embodiment of the apparatus, referring to fig. 7, the apparatus 600 further includes:
an executing module 610, configured to execute a reboot function according to the shutdown registration command, so as to notify the system service and the application program to execute a restart operation; according to the system shutdown instruction, the sysToMonitor function is executed to close the interrupt service.
Optionally, in another embodiment of the apparatus, referring to fig. 7, the apparatus 600 further includes:
a closing module 612, configured to close the interrupt service according to the system shutdown instruction.
The sending module 614 is configured to send a hardware shutdown instruction to the bottom layer hardware after the interrupt service is closed, so that the bottom layer hardware works in a shutdown state.
Specifically, in some embodiments, the restarting and generating module 604 is specifically configured to:
and notifying a system service and an application program to execute restarting operation according to the shutdown registration command.
Specifically, in some embodiments, the restarting operation includes: resetting the network, shutting down the peripheral, refreshing the cache, and notifying the system that a reset is to occur.
Specifically, in some embodiments, the restarting and generating module 604 is further specifically configured to:
and executing a reboot function according to the shutdown registration command so as to inform system services and application programs to execute restarting operation.
Specifically, in some embodiments, the shutdown module 606 is specifically configured to:
according to the system shutdown instruction, closing the interrupt service;
and after the interrupt service is closed, sending a hardware shutdown instruction to bottom hardware so as to enable the bottom hardware to work in a shutdown state.
Specifically, in some embodiments, the shutdown module 606 is further specifically configured to:
and executing the sysToMonitor function according to the system shutdown instruction so as to close the interrupt service.
Specifically, in some embodiments, the underlying hardware includes a power supply;
the shutdown module 606 is specifically configured to:
and sending a power supply shutdown instruction to the power supply so that the power supply is shut down according to the power supply shutdown instruction.
It should be noted that the software shutdown device of the VxWorks operating system can execute the software shutdown method of the VxWorks operating system provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details which are not described in detail in the embodiment of the software shutdown device of the VxWorks operating system can be referred to the software shutdown method of the VxWorks operating system provided by the embodiment of the invention.
Fig. 8 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention, where, as shown in fig. 8, the computer device 8 includes:
one or more processors 81 and a memory 82, with one processor 81 being an example in fig. 8.
The processor 82 and the memory 82 may be connected by a bus or other means, such as by a bus connection in fig. 8.
The memory 82, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the software shutdown method of the VxWorks operating system in the embodiment of the present invention (for example, the obtaining module 602, the restarting and generating module 604, and the shutdown module 606 shown in fig. 6). The processor 81 executes various functional applications and data processing of the computer device by running the nonvolatile software program, instructions and modules stored in the memory 82, that is, the software shutdown method of the VxWorks operating system of the above-described method embodiment is implemented.
The memory 82 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a software shutdown apparatus of a VxWorks operating system, and the like. Further, the memory 82 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 82 may optionally include memory located remotely from processor 81, which may be connected to a software shutdown device of a VxWorks operating system via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 82 and, when executed by the one or more processors 81, perform the software shutdown method of the VxWorks operating system in any of the method embodiments described above, e.g., performing the method steps 202-206 of fig. 2 described above; the functions of the blocks 602 to 606 in fig. 6 and the blocks 602 to 614 in fig. 7 are realized.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A software shutdown method for a VxWorks operating system is characterized by comprising the following steps:
acquiring a shutdown registration command;
restarting the system and generating a system shutdown instruction according to the shutdown registration command;
controlling the bottom hardware to work in a shutdown state according to the system shutdown instruction;
controlling the bottom layer hardware to work in a shutdown state according to the system shutdown instruction, comprising:
according to the system shutdown instruction, closing the interrupt service;
after the interrupt service is closed, sending a hardware shutdown instruction to bottom hardware so that the bottom hardware works in a shutdown state;
the closing the interrupt service according to the system shutdown instruction includes:
executing a sysToMonitor function according to the system shutdown instruction so as to close the interrupt service;
the restarting the system according to the shutdown registration command includes:
notifying a system service and an application program to execute restarting operation according to the shutdown registration command;
the restart operation includes: resetting the network, shutting down the peripheral, refreshing the cache, and notifying the system that a reset is to occur.
2. The software shutdown method according to claim 1, wherein notifying system services and applications to perform a restart operation according to the shutdown registration command comprises:
and executing a reboot function according to the shutdown registration command so as to inform system services and application programs to execute restarting operation.
3. The software shutdown method according to any one of claims 1 to 2, wherein the underlying hardware comprises a power supply;
the control bottom layer hardware works in a shutdown state, and the control bottom layer hardware comprises the following steps:
and sending a power supply shutdown instruction to the power supply so that the power supply is shut down according to the power supply shutdown instruction.
4. A software shutdown device of a VxWorks operating system is characterized by comprising:
the acquisition module is used for acquiring a shutdown registration command;
the restarting and generating module is used for restarting the system and generating a system shutdown instruction according to the shutdown registration command;
the restarting the system according to the shutdown registration command includes:
notifying a system service and an application program to execute restarting operation according to the shutdown registration command;
the restart operation includes: resetting the network, closing the peripheral, refreshing the cache and informing the system that the system is about to be reset;
the shutdown module is used for controlling the bottom layer hardware to work in a shutdown state according to the system shutdown instruction;
controlling the bottom layer hardware to work in a shutdown state according to the system shutdown instruction, comprising:
according to the system shutdown instruction, closing the interrupt service;
after the interrupt service is closed, sending a hardware shutdown instruction to bottom hardware so that the bottom hardware works in a shutdown state;
the closing the interrupt service according to the system shutdown instruction includes:
and executing the sysToMonitor function according to the system shutdown instruction so as to close the interrupt service.
5. A computer device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
6. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a server, cause the server to perform the method of any one of claims 1-3.
CN201811534201.4A 2018-12-14 2018-12-14 Software shutdown method and device for VxWorks operating system Active CN109669728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811534201.4A CN109669728B (en) 2018-12-14 2018-12-14 Software shutdown method and device for VxWorks operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811534201.4A CN109669728B (en) 2018-12-14 2018-12-14 Software shutdown method and device for VxWorks operating system

Publications (2)

Publication Number Publication Date
CN109669728A CN109669728A (en) 2019-04-23
CN109669728B true CN109669728B (en) 2022-04-05

Family

ID=66144876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811534201.4A Active CN109669728B (en) 2018-12-14 2018-12-14 Software shutdown method and device for VxWorks operating system

Country Status (1)

Country Link
CN (1) CN109669728B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569074A (en) * 2019-09-09 2019-12-13 上海联影医疗科技有限公司 Computer shutdown method, system and storage medium
CN112698870A (en) * 2019-10-23 2021-04-23 杭州海康威视数字技术股份有限公司 Startup and shutdown management method, computing device and storage medium
CN113468191A (en) * 2021-06-04 2021-10-01 合肥联宝信息技术有限公司 Data updating method and device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369778A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 High-safety shtdown method for protecting Window 9X system
CN1818870A (en) * 2006-03-16 2006-08-16 浙江大学 Memory mirror starting optimization of built-in operation system
CN103593037A (en) * 2013-11-29 2014-02-19 湖南强军科技有限公司 Geophysics instrument soft shutting method and system
CN103796066A (en) * 2014-01-21 2014-05-14 上海晨思电子科技有限公司 Smart television system and method for turning on and turning off smart television system
CN104081314A (en) * 2012-07-27 2014-10-01 惠普发展公司,有限责任合伙企业 Implementing power off state in computing device
CN106325457A (en) * 2016-08-25 2017-01-11 广州御银科技股份有限公司 Shutdown monitoring system
CN108958811A (en) * 2018-05-23 2018-12-07 郑州云海信息技术有限公司 A kind of closedown method, device, equipment and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6763458B1 (en) * 1999-09-27 2004-07-13 Captaris, Inc. System and method for installing and servicing an operating system in a computer or information appliance
US7120788B2 (en) * 2002-06-20 2006-10-10 Intel Corporation Method and system for shutting down and restarting a computer system
CN101448299B (en) * 2008-11-30 2011-01-19 中兴通讯股份有限公司 Terminal and method for avoiding interference
US8464257B2 (en) * 2010-12-22 2013-06-11 Lsi Corporation Method and system for reducing power loss to backup IO start time of a storage device in a storage virtualization environment
CN103473087A (en) * 2013-08-30 2013-12-25 福建升腾资讯有限公司 Startup control method for software-operated startup and shutdown in multitask systems
CN105744077A (en) * 2016-03-31 2016-07-06 广东欧珀移动通信有限公司 Shutdown control method and device for mobile terminal and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1369778A (en) * 2001-02-15 2002-09-18 英业达股份有限公司 High-safety shtdown method for protecting Window 9X system
CN1818870A (en) * 2006-03-16 2006-08-16 浙江大学 Memory mirror starting optimization of built-in operation system
CN104081314A (en) * 2012-07-27 2014-10-01 惠普发展公司,有限责任合伙企业 Implementing power off state in computing device
CN103593037A (en) * 2013-11-29 2014-02-19 湖南强军科技有限公司 Geophysics instrument soft shutting method and system
CN103796066A (en) * 2014-01-21 2014-05-14 上海晨思电子科技有限公司 Smart television system and method for turning on and turning off smart television system
CN106325457A (en) * 2016-08-25 2017-01-11 广州御银科技股份有限公司 Shutdown monitoring system
CN108958811A (en) * 2018-05-23 2018-12-07 郑州云海信息技术有限公司 A kind of closedown method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN109669728A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
US9721660B2 (en) Configurable volatile memory without a dedicated power source for detecting a data save trigger condition
CN109669728B (en) Software shutdown method and device for VxWorks operating system
CN107122321B (en) Hardware repair method, hardware repair system, and computer-readable storage device
CN109739563B (en) Terminal control method, device, system and storage medium
US10585755B2 (en) Electronic apparatus and method for restarting a central processing unit (CPU) in response to detecting an abnormality
CN101464807B (en) Application program loading method and device
US9858098B2 (en) Hypervisor modification of system tables
US7779284B2 (en) Techniques for operating a processor subsystem to service masked interrupts during a power-down sequence
WO2021248836A1 (en) Smart device startup method and apparatus, smart device, and readable storage medium
US9645625B2 (en) System and method for power management of computing devices in a virtual desktop infrastructure
CN110109782B (en) Method, device and system for replacing fault PCIe (peripheral component interconnect express) equipment
US10372491B2 (en) Execution context migration method and apparatus
CN104615472A (en) Method for preventing BIOS+ME FW online refresh failure
CN109690496B (en) Memory monitor
US11366679B2 (en) Guest operating system wake-up method, device, electronic apparatus, and readable medium
CN112035285A (en) Hardware watchdog circuit system based on high-pass platform and monitoring method thereof
RU2606565C2 (en) Firmware agent
US9524189B2 (en) Information processing device, information processing method, and computer program product
CN113641537A (en) Starting system, method and medium for server
US8856788B2 (en) Activity based device removal management
CN111767174A (en) BIOS (basic input output System) refreshing control method, server and storage medium
CN116627702A (en) Method and device for restarting virtual machine in downtime
CN115576734B (en) Multi-core heterogeneous log storage method and system
CN114117562B (en) Intelligent network card management method and device, electronic equipment and computer storage medium
JP2013149128A (en) Computer system, power supply disconnection processing device, power supply disconnection processing method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant