CN114911597A - Switching method of operation system and computing equipment - Google Patents

Switching method of operation system and computing equipment Download PDF

Info

Publication number
CN114911597A
CN114911597A CN202210539644.2A CN202210539644A CN114911597A CN 114911597 A CN114911597 A CN 114911597A CN 202210539644 A CN202210539644 A CN 202210539644A CN 114911597 A CN114911597 A CN 114911597A
Authority
CN
China
Prior art keywords
operating system
real
time
running
kernel
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.)
Pending
Application number
CN202210539644.2A
Other languages
Chinese (zh)
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.)
Wuhan Deepin Technology Co ltd
Original Assignee
Wuhan Deepin 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 Wuhan Deepin Technology Co ltd filed Critical Wuhan Deepin Technology Co ltd
Priority to CN202210539644.2A priority Critical patent/CN114911597A/en
Publication of CN114911597A publication Critical patent/CN114911597A/en
Pending legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4818Priority circuits therefor
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)
  • Feedback Control In General (AREA)

Abstract

The invention discloses a switching method of an operating system and computing equipment, wherein the method is executed in the operating process of the operating system, the operating system comprises a kernel, a first operating system and a second operating system, and the method comprises the following steps: in the running process of the first running system, responding to a request for switching to the second running system, and switching the kernel from a first kernel mode corresponding to the first running system to a second kernel mode corresponding to the second running system; starting a second middleware service program corresponding to a second running system; and starting a second middleware operating environment module corresponding to a second operating system so as to start the second operating system. According to the technical scheme of the invention, the operating system can be switched in time according to the request of the user in the operating process of the operating system.

Description

Switching method of operation system and computing equipment
Technical Field
The present invention relates to the field of operating system technologies, and in particular, to a method for switching an operating system and a computing device.
Background
The cloud computing technology improves the utilization rate of hardware resources by carrying out separated management on the resources, greatly reduces the use cost of an IT information system, and simultaneously improves the usability of the system. At present, the mainstream large internet service is based on the infrastructure provided by cloud computing.
With the development of the 5G technology, the internet develops to a deeper and wider field, and the topological distance between a network terminal and a network center is continuously lengthened, so that the timeliness of network application response is influenced. The network terminal is a boundary between the digital world and the physical world, and the network terminal device usually has a requirement on real-time performance, and needs to complete a calculation task and feed back a calculation result within a limited time.
In the prior art, because factors such as cost are considered, the computing capability of the network terminal device is generally weak, and the computing resources of the cloud center are required to be used for completing the computing tasks of the core part, and then the computing tasks of the rest part are completed by the network terminal device. However, the distance between the cloud center and the network terminal is long, so that the real-time performance of the interaction is affected by the network transmission process. Therefore, a new computing method needs to be introduced between the cloud center and the network terminal, that is, at the edge of the cloud, to solve the contradiction between the computing resources and the physical distance.
The multi-time characteristic hybrid operation system is suitable for being applied to an edge computing application scene and can operate a computing task and a real-time task by improving a general operation system from a plurality of layers of a kernel, a middleware and an API. In terms of technical architecture, the multi-time characteristic hybrid operation system is a large extension on the basis of a general-purpose operating system. For a multi-time characteristic hybrid operation system, in consideration of compatibility, debugging and maintenance in the actual use process, a scheme which is applied to the hybrid operation system and can perform instant switching between a general operation system and a real-time operation system is needed.
For the above hybrid operating system, in order to instantly switch the operating system and enter the operating system specified by the user according to the requirement of the user during the operating process of the operating system, a switching method of the operating system is required.
Disclosure of Invention
To this end, the present invention provides a switching method of an operating system and a computing device to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a method for switching an operating system, which is executed during an operating process of an operating system, where the operating system includes a kernel, a first operating system, and a second operating system, the method including the steps of: in the running process of the first running system, responding to a request for switching to the second running system, and switching the kernel from a first kernel mode corresponding to the first running system to a second kernel mode corresponding to the second running system; starting a second middleware service program corresponding to a second running system; and starting a second middleware operating environment module corresponding to a second operating system so as to start the second operating system.
Optionally, in the method for switching an operating system according to the present invention, the method further includes: one or more applications running based on the second running system are launched.
Optionally, in the switching method of the operating system according to the present invention, an operating state control module is deployed on the operating system; in response to a request for switching to the second operating system, the step of switching the kernel from a first kernel mode corresponding to the first operating system to a second kernel mode corresponding to the second operating system includes: the running state control module responds to a request for switching to a second running system and informs the kernel to switch the first running system to the second running system; and the kernel is switched from a first kernel mode corresponding to the first operating system to a second kernel mode corresponding to the second operating system.
Optionally, in the method for switching an operating system according to the present invention, after switching a kernel from a first kernel mode corresponding to a first operating system to a second kernel mode corresponding to a second operating system, the method includes the steps of: the kernel informs the running state control module to complete the switching operation; and the running state control module informs a second middleware service program corresponding to the second running system of starting.
Optionally, in the method for switching an operating system according to the present invention, the step of starting a second middleware operating environment module corresponding to a second operating system includes: and starting the dependent library corresponding to the second middleware to replace the dependent library corresponding to the first middleware.
Optionally, in the method for switching an operating system according to the present invention, the first operating system and the second operating system are a general operating system and a real-time operating system, respectively; the kernel is a fusion kernel formed by fusing a real-time kernel and a general kernel, and the first kernel mode and the second kernel mode are respectively a general kernel mode and a real-time kernel mode.
Optionally, in the switching method of the running system according to the present invention, the real-time middleware service program corresponding to the real-time running system includes: the fast interrupt service program is suitable for interrupting the real-time task which is being executed and carrying out interrupt processing when receiving the interrupt signal; the real-time scheduling service program is suitable for acquiring a real-time task with the highest emergency degree from the real-time task queue by using a real-time scheduling algorithm so as to immediately execute the real-time task with the highest emergency degree; and the real-time operation component is suitable for providing memory management service for the real-time task with the highest emergency degree.
Optionally, in the method for switching an operating system according to the present invention, a generic middleware service program corresponding to a generic operating system includes: the general scheduling service program is suitable for acquiring a highest-priority computational task from a computational task queue by using a fair scheduling algorithm when an interrupt signal is received so as to immediately execute the highest-priority computational task; a threaded interrupt service routine adapted to interrupt a low priority computing type task and perform interrupt processing; and the general operation component is suitable for providing memory management service for the calculation type task with the highest priority.
According to an aspect of the present invention, there is provided a method for switching an operating system, which is executed during an operating process of an operating system, where the operating system includes a kernel, a first operating system, and a second operating system, the method including the steps of: in the operation process of the second operation system, responding to a request for switching to the first operation system, and closing a second middleware operation environment module corresponding to the second operation system; closing a second middleware service program corresponding to a second running system; and switching the kernel from a second kernel mode corresponding to the second operating system to a first kernel mode corresponding to the first operating system.
Optionally, in the method for switching an operating system according to the present invention, before closing a second middleware operating environment module corresponding to a second operating system, the method further includes the steps of: and closing one or more application programs running based on the second running system.
According to an aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the switching method of the operating system as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to execute the switching method of the operating system as described above.
According to the technical scheme of the invention, the switching method of the operation system is provided, and the operation system is a mixed operation system comprising a real-time operation system and a universal operation system. In the operating process of the operating system, the operating state control module can respond to a request of a user and switch a currently operating general operating system to a real-time operating system, specifically, a kernel is switched from the general kernel mode to the real-time kernel mode, a real-time middleware service program corresponding to the real-time operating system is started, and a real-time middleware operating environment module corresponding to the real-time operating system is started, so that the operating system is switched to the real-time operating system from the general operating system, the operating mode of the real-time operating system is switched, a real-time application program is operated on the real-time operating system, and the real-time requirement of the application program is met. In addition, under the operation mode of the real-time operation system, the current real-time operation system can be switched to the general operation system by closing the real-time operation system. Therefore, the invention can realize the instant switching between the general operation system and the real-time operation system in the operation process of the operation system so as to meet the real-time requirement when executing tasks under different application scenes.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100 with a hybrid-run system 120 deployed therein, according to one embodiment of the invention;
FIG. 2 illustrates a schematic diagram of a computing device 100 having an operating state control module 136 deployed therein, according to one embodiment of the invention;
FIG. 3 shows a flow diagram of a handoff method 300 of operating a system according to one embodiment of the invention;
FIG. 4 shows a flow diagram of a handoff method 400 of operating a system according to one embodiment of the invention;
FIG. 5 shows a hardware architecture diagram of the computing device 100, according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a schematic diagram of a hybrid operating system 120 deployed in a computing device 100, according to one embodiment of the invention. According to one application example, the computing device 100 may be, for example, an edge computing server applied in an edge computing domain.
As shown in fig. 1, the computing device 100 may include a hardware layer 110, a hybrid operating system 120, and an application layer 130. In some embodiments, the hybrid-operation system 120 may be a part of the operating system, i.e., the hybrid-operation system 120 is included in the operating system of the computing device 100. In still other embodiments, the operating system of the computing device 100 may be implemented as the hybrid runtime system 120 of the present invention.
Specifically, the application layer 130 may include one or more applications, runtime libraries, and interfaces provided by a hybrid runtime system, and the present invention is not limited to the types and numbers of applications. Developers can also develop applications based on actual business needs. Each application may call an interface provided by the hybrid runtime system to request the business runtime system to perform a task. In one embodiment, the applications include, for example, applications for hybrid environment monitoring, applications for hybrid traffic debugging, applications for hybrid traffic analysis, and the like.
The hardware layer 110 may provide a hardware environment for the operation of hybrid operating systems and applications. The hardware layer 110 may include a processor (CPU), an internal memory, and may further include an external hardware device such as a network card, a hard disk, and a keyboard.
The hybrid operating system 120 can provide a software operating environment for one or more tasks that an application requests to perform, including real-time tasks and computing-type tasks.
The hybrid operating system 120 according to the present invention can simultaneously operate a real-time task and a computing-type task. It should be noted that the real-time task is a task that needs to respond in a predetermined time, for example, a task of controlling a traffic light signal. The computing task is a task which needs to process a large amount of data and has high requirement on computing capacity, such as audio and video processing, database application and the like.
The real-time task and the computing task have different requirements in aspects of interrupt processing, scheduling processing, memory management and the like. Specifically, in terms of interrupt processing, a real-time task needs to execute a task with the highest degree of urgency as soon as possible by interrupt processing; for computational tasks, however, it is undesirable for the currently executing task to be interrupted frequently. In the aspect of scheduling processing, real-time tasks need to be scheduled as soon as possible after an event arrives; for computing services, however, it is undesirable for the currently executing task to be scheduled out frequently. In the memory management method, the real-time tasks need to be stored in the memory completely instead of being replaced by the virtual memory; the computing task needs to fully utilize the virtual memory to realize large-scale data computation because a large amount of data needs to be processed.
In view of the requirements of real-time tasks and compute-based tasks in interrupt handling, scheduling, memory management, etc., the present invention provides a hybrid operating system 120 that can simultaneously schedule real-time tasks and compute-based tasks.
According to an embodiment of the present invention, as shown in fig. 1, the hybrid operating system 120 includes a preemptive kernel 121, an interrupt preprocessing module 122 disposed above the preemptive kernel 121, and an operating system disposed above the interrupt preprocessing module 122. The runtime system includes a real-time runtime system 123 and a general runtime system 124 (non-real-time runtime system), where the real-time runtime system 123 may provide a real-time runtime environment for real-time tasks, and the general runtime system 124 may provide a non-real-time runtime environment for computing tasks.
It should be noted that the preemptive kernel 121 in the present invention adopts a full preemptive kernel to ensure the basic real-time response capability and the fused scheduling capability for resources. Each operating system adopts a complete independent core software stack, so that the two operating systems are isolated from each other, and the independence of real-time tasks and calculation type tasks with different time characteristics during operation is ensured.
In one embodiment, as shown in fig. 1, the hybrid operating system 120 further includes an application domain management module 126 located on the real-time operating system 123 and the general operating system 124, and the application domain management module 126 may provide a unified domain control interface for one or more applications of the upper application layer, so that the applications request execution of tasks by calling the domain control interface. The application domain management module 126 may receive task execution requests sent by one or more applications and assign tasks to corresponding domains for execution according to types of the tasks. That is, when the task is a real-time task, the real-time task is allocated to the real-time running system 123 to be executed, and the real-time running system 123 may provide a real-time running environment for the running of the real-time task. When the task is a computational task, the computational task is assigned to the common execution system 124 for execution, and the common execution system 124 may provide a common execution environment for the execution of the computational task.
According to an embodiment of the present invention, each module in the real-time running system 123 is configured to prioritize the real-time task with the highest urgency, and each module in the general running system 124 is configured to prioritize the computing task with the highest priority.
Specifically, the preemptive core 121 may receive a hardware generated interrupt signal, i.e., a hardware interrupt signal. The hardware interrupt signal is automatically generated by a hardware device (e.g., network card, hard disk, keyboard, etc.) communicatively coupled to the hybrid operating system 120. The preemptive core 121 may then send the interrupt signal from the hardware to the interrupt pre-processing module 122, so that the interrupt signal is distributed to the corresponding running system for processing by the interrupt pre-processing module 122.
The interrupt preprocessing module 122 may be configured to determine an interrupt type according to an interrupt signal in response to the interrupt signal generated by the hardware, and distribute the interrupt signal to a corresponding operating system (the real-time operating system 123 or the general operating system 124) according to the interrupt type for processing. Here, the interrupt signal includes interrupt source information, and the interrupt preprocessing module 122 may obtain the interrupt source information from the interrupt signal and determine the interrupt type according to the interrupt source information. The interrupt type is to determine whether the most urgent real-time task or the highest priority computing task needs to be executed immediately.
When receiving the interrupt signal, the real-time running system 123 first immediately interrupts the real-time task being executed and performs interrupt processing, and then may obtain the real-time task with the highest urgency from the real-time task queue of the processor (CPU) by using a real-time scheduling algorithm, so that the processor (CPU) immediately executes the real-time task with the highest urgency. In this case, the real-time task corresponding to the highest degree of urgency preempts the usage right of the processor. It is understood that, when receiving the interrupt signal, the real-time running system 123 first performs interrupt processing on the task being executed, and then performs scheduling processing.
Upon receiving the interrupt signal, the common operating system 124 first retrieves the highest priority compute-type task from the compute-type task queue of the processor, for example, the highest priority compute-type task may be retrieved from the compute-type task queue based on a fair scheduling algorithm. Further, the executing low priority computing-type task may be interrupted and the interrupt process performed so that the processor immediately executes the highest priority computing-type task.
Further, after selecting the highest priority computing-type task from the computing-type task queue, the common operating system 124 needs to determine whether the selected highest priority computing-type task is an executing computing-type task. If the highest priority computational task is not an executing computational task, indicating that the executing computational task currently belongs to a low priority computational task, then the executing low priority computational task (i.e., the previous highest priority computational task) is interrupted and interrupt processing is performed so that the processor immediately switches to executing the highest priority computational task. At this time, the task corresponding to the highest priority computing type preempts the use right of the processor.
In addition, if the highest priority computational task is the executing computational task, the executing computational task does not need to be interrupted, and interrupt processing is not needed, so that the situation that the computational task is frequently interrupted is avoided. It will be appreciated that the general purpose operating system 124 first performs a scheduling process upon receiving an interrupt signal and then determines whether interrupt processing is required.
According to one embodiment of the invention, the real-time running system 123 includes a fast interrupt service 1231, a real-time scheduling service 1232, and a real-time running component 1233. During the operation of the most urgent real-time task, the real-time operation component 1233 may provide a memory management service for the operation of the most urgent real-time task.
The fast interrupt service routine 1231 runs on the processor, and the fast interrupt service routine 1231 can interrupt the real-time task being executed and interrupt the processing when receiving the interrupt signal.
Further, the fast interrupt service routine 1231 may be bound to the interrupt handler. The fast interrupt service routine 1231, upon receiving the interrupt signal, may send the interrupt signal to the processor, and the processor may interrupt the real-time task being executed and perform interrupt processing by looking up a corresponding interrupt handler (i.e., the interrupt handler bound to the fast interrupt service routine 1231) from the fast interrupt vector table and sending the interrupt signal to the interrupt handler.
It should be noted that the interrupt processing refers to a processing procedure in which, when a new task requiring priority execution occurs, the processor temporarily suspends execution of the current task and executes the new task (for example, the real-time task with the highest urgency or the calculation-type task with the highest priority in the above-described embodiment).
The real-time scheduling service 1232 may use a real-time scheduling algorithm to obtain the most urgent real-time task from the real-time task queue so that the processor immediately executes the most urgent real-time task.
In one embodiment, the real-time scheduling algorithm may be implemented as a minimum slack priority scheduling algorithm, that is, the real-time task with the highest urgency may be obtained from the real-time task queue by using the minimum slack priority scheduling algorithm. It should be noted that the minimum slack priority scheduling algorithm determines the priority of the task according to the degree of urgency (or slack) of the task. For the embodiment of the invention, the higher the urgency of the real-time task, the higher the priority given to the real-time task so as to preferentially execute the real-time task with the highest urgency. In the real-time task queue, each real-time task is sorted according to the slack from low to high (namely, the urgency is from high to low), wherein the real-time task with the lowest slack (the urgency is the highest) is arranged at the front of the real-time task queue and is scheduled to be executed preferentially. The sag calculation method is as follows: slack in real-time tasks-the time that must be completed-its own run time-the current time. According to the algorithm, when the minimum slack of a real-time task is reduced to 0, the real-time scheduling service 1232 must immediately schedule the real-time task to immediately preempt the processor, ensuring that the real-time task is executed and completed according to the requirements of the deadline.
According to one embodiment of the invention, the general purpose runtime system 124 includes a general purpose dispatch service program 1242, a threaded interrupt service program 1241, and a general purpose runtime component 1243. The general purpose execution component 1243 may provide memory management services for the highest priority computing task during its execution.
The general scheduler service routine 1242 may, upon receiving the interrupt signal, select and fetch the highest priority computational task from the computational task queue of the processor using a fair scheduling algorithm so that the processor immediately executes the highest priority computational task. In one implementation, the fair scheduling algorithm may be implemented as a CFS scheduling algorithm. The general scheduler service 1242 may select the highest priority computing type task from the task queue of the processor using the CFS scheduling algorithm. Specifically, according to the CFS scheduling algorithm, the general scheduler 1242 always selects the slowest running computing task from the computing task queue as the highest priority computing task, so that the slower running computing task may get more running opportunities.
If the highest priority task is an executing task, the executing task is continued, and it is not necessary to interrupt the executing task.
If the highest priority computational task is not an executing computational task, in other words, the executing computational task is a low priority computational task, then the executing low priority computational task is further interrupted and interrupted by the threaded interrupt service routine 1241.
In one embodiment, the threaded interrupt service routine 1241 runs on top of the processor. The threaded interrupt service routine 1241 may specifically interrupt an executing low-priority computing task and perform interrupt processing according to the following method: the interrupt signal may be sent to a processor by converting the interrupt signal to a corresponding Interrupt Request (IRQ) and looking up one or more interrupt handlers associated with the interrupt request from an interrupt request registry. And, the processor sequentially wakes up one or more processing threads corresponding to the one or more interrupt handlers to interrupt the executing low priority computing type task and perform interrupt processing via the one or more processing threads.
Specifically, the interrupt handler associated with the interrupt request may include a plurality. When the processor searches a plurality of interrupt processing programs associated with the interrupt request from the interrupt request registry, each time one associated interrupt processing program is found, the processor wakes up the processing thread corresponding to the interrupt processing program so as to break the executing low-priority computing task and interrupt the processing through the processing thread, after waiting for the completion of the execution of the processing thread, then searches a next associated interrupt processing program from the interrupt request registry, wakes up a next processing thread corresponding to the next interrupt processing program, and waits for the completion of the execution of the next processing thread. And repeating the steps until the execution of the processing threads corresponding to all the interrupt processing programs related to the interrupt request is completed, thereby completing the interrupt processing.
In addition, in one embodiment, as shown in fig. 1, a domain resource management service program 125 may be further deployed between the real-time running system 123 and the general-purpose running system 124, where the domain resource management service program 125 is configured to separate resources of the real-time running system 123 and the general-purpose running system 124, and ensure isolation of resources and characteristics between the real-time running system 123 and the general-purpose running system 124.
In an embodiment in accordance with the invention, the computing device 100 is configured to perform a method 300 of switching operating systems in accordance with the invention. The computing device 100 comprises a plurality of program instructions for executing the method 300 for switching operating systems of the present invention, so that the computing device 100 implements the operating system switching operation mode during the operating system operation by executing the method 300 for switching operating systems of the present invention, so that the operating system is switched from the first operating system to the second operating system.
According to an embodiment of the present invention, the application layer 130 in the computing device 100 is further disposed with a start management module 135 and an operation state control module 136. The boot management module 135 is used to control the boot of the operating system and enter a real-time running system or a general-purpose running system according to the user's requirements during the boot phase of the operating system.
The running state control module 136 is used for managing the intermediate state of the running environment in the running process of the operating system, wherein the management includes state sensing, fault tolerance processing and the like, so as to realize instant switching of the operating system between different running systems.
FIG. 2 illustrates a schematic diagram of a computing device 100 having an operating state control module 136 deployed therein, according to one embodiment of the invention.
As shown in fig. 2, the computing device 100 includes a hardware layer 110, an operating system, and an application layer 130 disposed above the operating system, where the application layer 130 includes a boot management module 135, a run state control module 136, a run-time library, and an interface provided by the operating system.
In an embodiment consistent with the invention, the operating system of computing device 100 may be implemented as hybrid runtime system 120 shown in FIG. 1. Specifically, the operating system includes a kernel, a real-time running system 123, and a general-purpose running system 124 (non-real-time running system). The kernel (preemptive kernel) in the operating system may be implemented as a fusion kernel formed by fusing a real-time kernel and a general kernel (non-real-time kernel), and the fusion kernel may be switched between a general kernel mode and a real-time kernel mode. It should be understood that the fused kernel in the present invention is a specific implementation of a preemptive kernel.
In one embodiment, the hardware layer 110 includes a processor, an internal memory, wherein the boot loader 115 is included in the internal memory. Here, the boot loader 115 is BootLoader, which is a first-stage program running before the kernel of the operating system runs, and may initialize hardware devices and establish a memory space map, so as to bring the software environment and the hardware environment to an appropriate state, so as to prepare a correct environment for finally calling the kernel of the operating system. In the early stages of operating system boot, the boot loader 115 may boot the kernel in response to a request by the boot management module 135.
Fig. 3 shows a flow diagram of a handover method 300 of operating a system according to one embodiment of the invention. The method 300 is suitable for execution in a computing device 100. During the operation of the operating system of the computing device 100, the computing device 100 can instantly switch between different operating systems by executing the switching method 300 of the operating system according to the present invention, for example, a first operating system can be switched to a second operating system, so that the operating system is instantly switched from the first operating system to the operating mode of the second operating system.
It should be noted that the first operating system and the second operating system may be any one of a general operating system and a real-time operating system. The first operating system corresponds to a first kernel mode, and the second operating system corresponds to a second kernel mode.
When the first operating system is a general operating system (the corresponding first kernel mode is a general kernel mode), the second operating system is a real-time operating system (the corresponding second kernel mode is a real-time kernel mode). When the first operating system is a real-time operating system (the corresponding first kernel mode is a real-time kernel mode), the second operating system is a general operating system (the corresponding second kernel mode is a general kernel mode).
As shown in FIG. 3, the method 300 includes steps S310-S330.
In step S310, in the running process of the first running system, in response to a request of a user to switch to the second running system, the kernel is switched from the first kernel mode corresponding to the first running system to the second kernel mode corresponding to the second running system.
Specifically, the operating state control module 136 may receive a request from a user to switch a currently operating first operating system to a second operating system, and notify the kernel to switch the currently operating first operating system to the second operating system in response to the request from the user to switch the currently operating first operating system to the second operating system. Then, the kernel is switched from a first kernel mode corresponding to the first operating system to a second kernel mode corresponding to the second operating system. After the kernel switching operation is completed, the kernel notifies the running state control module 136 to complete the kernel switching operation.
Subsequently, in step S320, a second middleware service program corresponding to the second operating system is started.
Specifically, after the running state control module 136 receives the notification of the completion of the kernel switching operation, the running state control module 136 notifies the second middleware service program corresponding to the second running system to start, so as to start the second middleware service program corresponding to the second running system. After the second middleware service program is started, the switching operation of switching from the first middleware service program corresponding to the first running system to the second middleware service program is completed. The run state control module 136 is then notified of the completion of the middleware server switchover operation.
Finally, in step S330, a second middleware operating environment module corresponding to the second operating system is started, so as to start the second operating system.
Specifically, after the running state control module 136 receives the notification of the completion of the switching operation of the middleware service program, the running state control module 136 notifies the second middleware running environment module corresponding to the second running system to start, so as to start the second middleware running environment module corresponding to the second running system. After the second middleware operating environment module is started, the switching operation from the first middleware operating environment module corresponding to the first operating system to the second middleware operating environment module corresponding to the second operating system is completed. The runtime state control module 136 is then notified to complete the switchover operation for the middleware runtime environment.
At this point, the switching operation from the first operating system to the second operating system is completed, so that the operating system is instantly switched from the first operating system to the operating mode of the second operating system according to the requirement of a user.
According to one embodiment of the invention, the first operation system and the second operation system are respectively a general operation system and a real-time operation system. The first kernel mode and the second kernel mode are respectively a general kernel mode and a real-time kernel mode. Correspondingly, a first middleware corresponding to the first operating system is a universal middleware, and a first middleware service program is a universal middleware service program; the second middleware corresponding to the second operating system is a real-time middleware, and the second middleware service program is a real-time middleware service program. Thus, by executing the method 300 of the present invention, the current general-purpose operating system can be switched to the real-time operating system, so that the operating system is switched from the general-purpose operating system to the operating mode of the real-time operating system, and the requirement of the user on the real-time environment is met.
In addition, after the corresponding second middleware operating environment module of the second operating system is started, one or more application programs which operate based on the second operating system can be started.
In one embodiment, when the first operating system and the second operating system are a general-purpose operating system and a real-time operating system, respectively, the one or more applications operating based on the second operating system (real-time operating system) are real-time applications having real-time requirements on the operating environment.
It should be noted that the middleware is connected between the operating system and the application, so that the operating system and the application communicate with each other. In the technical solution of the present invention, the second middleware corresponding to the second operating system is software connected between the second operating system and the application and used for the second operating system to communicate with the application.
In one embodiment of the invention, the middleware includes an interface, a runtime library, an application domain management module 126, a domain resource management service 125, a real-time running component 1233, a real-time scheduling service 1232, a fast interrupt service 1231, a general running component 1243, a general scheduling service 1242, and a threaded interrupt service 1241.
In one embodiment of the invention, the middleware is distinguished for a real-time running system and a general running system. Specifically, the real-time middleware corresponding to the real-time operating system includes an interface, a runtime library, an application domain management module 126, a domain resource management service 125, a real-time operating component 1233, a real-time scheduling service 1232, and a fast interrupt service 1231. The real-time middleware service program corresponding to the real-time running system includes an application domain management module 126, a domain resource management service program 125, a real-time running component 1233, a real-time scheduling service program 1232, and a fast interrupt service program 1231. That is, the real-time middleware includes an interface, a runtime library, and a real-time middleware service program.
The general middleware corresponding to the general operating system includes an interface, a runtime library, an application domain management module 126, a domain resource management service program 125, a general operating component 1243, a general scheduling service program 1242, and a threaded interrupt service program 1241. The general middleware service program corresponding to the general operation system comprises an application domain management module 126, a domain resource management service program 125, a general operation component 1243, a general scheduling service program 1242 and a threading interrupt service program 1241. That is, the common middleware includes an interface, a runtime library, and a common middleware server.
It is understood that the common middleware of the real-time middleware and the common middleware includes an interface, a runtime library, an application domain management module 126, and a domain resource management service 125.
It should be noted that the specific execution logic of each middleware and middleware service is described in the foregoing description of the computing device 100, and is not described here in detail.
It should be noted that the middleware running environment module includes an underlying dependency library (shared library), for example, the general middleware running environment module includes a general dependency library (without real-time property), and the real-time middleware running environment module includes a corresponding real-time dependency library (with real-time property). When the operating system is switched, the middleware operating environment module needs to be correspondingly switched, that is, the second middleware operating environment module corresponding to the second operating system is started, which specifically includes: the underlying dependency library corresponding to the second middleware is launched. The dependency library includes, for example, a dependency library for memory management, a dependency library for interprocess communication, a dependency library for network communication, and the like.
In one embodiment, the first operating system is a general operating system, the second operating system is a real-time operating system, and accordingly, the second middleware is a real-time middleware, and the dependency library corresponding to the real-time middleware is a real-time dependency library. In this embodiment, the starting of the second middleware operating environment module (real-time middleware operating environment module) corresponding to the second operating system (real-time operating system) specifically includes: and starting a real-time dependency library corresponding to the real-time middleware so as to replace the universal dependency library with the real-time dependency library meeting the real-time property, so that after the real-time operation system is started, the requirement on the real-time property during task operation can be met, the memory can be accessed in real time, the inter-process communication can be carried out in real time, and the like. .
In one embodiment, the operating system runs the general-purpose service program in the running process of either the real-time running system or the general-purpose running system. And starting a second middleware service program corresponding to the second running system through the general service program. Here, the general service program of the operating system may include, for example, a login service program, a timed task service program, a network service program, and the like.
Fig. 4 shows a flow diagram of a handover method 400 of operating a system according to one embodiment of the invention. The method 400 is suitable for execution in a computing device 100. During the running of the operating system of the computing device 100, the computing device 100 may switch the second running system to the first running system by executing the switching method 400 of the running systems according to the present invention, so that the operating system is instantly switched from the second running system to the running mode of the first running system.
In one embodiment, the first operating system is a general-purpose operating system and the second operating system is a real-time operating system. In this way, by performing the switching method 400 of the operating system according to the present invention, it is possible to switch from the real-time operating system to the general operating system.
As shown in fig. 4, the method 400 begins at step S410.
In step S410, during the operation of the second operating system, one or more applications operating based on the second operating system may be first closed in response to a request from a user to switch to the first operating system (i.e., close the second operating system). And then, closing a second middleware operating environment module corresponding to the second operating system.
Specifically, after receiving a request for closing the second operating system by a user, the operating state control module, in response to the request for closing the switch to the first operating system by the user, notifies the second middleware operating environment module corresponding to the second operating system to close to switch to the first operating system, so as to close one or more applications operating based on the second operating system, and then closes the second middleware operating environment module corresponding to the second operating system. After the second middleware operating environment module corresponding to the second operating system is closed, the switching operation from the second middleware operating environment module corresponding to the second operating system to the first middleware operating environment module corresponding to the first operating system is completed. The runtime state control module 136 is then notified to complete the switchover operation for the middleware runtime environment.
Next, in step S420, the second middleware service program corresponding to the second operating system is closed.
Specifically, after the running state control module 136 receives the notification of the completion of the switching operation of the middleware running environment, the running state control module 136 notifies the second middleware service program corresponding to the second running system to close, so as to close the second middleware service program corresponding to the second running system and stop the second middleware service. After the second middleware service program is closed, the switching operation from the second middleware service program corresponding to the second running system to the first middleware service program is completed. The run state control module 136 is then notified of the completion of the middleware server switchover operation.
Finally, in step S430, the kernel is switched from the second kernel mode corresponding to the second operating system to the first kernel mode corresponding to the first operating system.
Specifically, after the running state control module 136 receives the notification that the switching operation of the middleware service program is completed, the running state control module 136 notifies the kernel to switch the second running system to the first running system. Then, the kernel is switched from a second kernel mode corresponding to the second operating system to a first kernel mode corresponding to the first operating system. After the kernel switching operation is completed, the kernel notifies the running state control module 136 to complete the kernel switching operation.
At this point, the closing operation of the second running system is completed, that is, the switching operation from the second running system to the first running system is completed, so that the operating system is instantly switched from the second running system to the running mode of the first running system according to the requirement of a user.
According to one embodiment of the invention, the first operation system and the second operation system are respectively a general operation system and a real-time operation system. The first kernel mode and the second kernel mode are respectively a general kernel mode and a real-time kernel mode.
Thus, according to the method 300 of the present invention, the real-time operating system is turned off through the above steps, and the currently operating real-time operating system can be switched to the general operating system, so that the operating system is switched to the operating mode of the general operating system from the real-time operating system, and the requirement of the user on the real-time environment is met.
According to the technical scheme of the invention, the operating system is a hybrid operating system comprising a real-time operating system and a general operating system. According to the switching method 300 of the operating system of the present invention, in the operating process of the operating system, the operating state control module may respond to a request of a user to switch the currently operating general operating system to the real-time operating system, specifically, switch the kernel from the general kernel mode to the real-time kernel mode, start the real-time middleware service program corresponding to the real-time operating system, and start the real-time middleware operating environment module corresponding to the real-time operating system, so as to switch to the real-time operating system, so that the operating system is switched from the general operating system to the operating mode of the real-time operating system, so as to operate the real-time application program on the real-time operating system, and meet the real-time requirement of the application program. In addition, under the operation mode of the real-time operation system, the current real-time operation system can be switched to the general operation system by closing the real-time operation system. Therefore, the invention can realize the instant switching between the general operation system and the real-time operation system in the operation process of the operation system so as to meet the real-time requirement when executing tasks under different application scenes.
FIG. 5 shows a hardware architecture diagram of the computing device 100, according to one embodiment of the invention. As shown in fig. 5, the computing device 100 may include an input device 90, a processor 91, an output device 92, a memory 93, and at least one communication bus 94. The communication bus 94 is used to enable communication connections between the elements. The memory 93 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and various program instructions may be stored in the memory 93 for performing various processing functions and implementing the switching method of the operating system in the embodiment of the present invention.
Alternatively, the processor 91 may be implemented by, for example, a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and the processor 91 is coupled to the input device 90 and the output device 92 through a wired or wireless connection.
Alternatively, the input device 90 may include a variety of input devices, such as at least one of a user-oriented user interface, a device-oriented device interface, a software-programmable interface, a camera, and a sensor. Optionally, the device interface facing the device may be a wired interface for data transmission between devices, or may be a hardware plug-in interface (e.g., a USB interface, a serial port, etc.) for data transmission between devices; optionally, the user-facing user interface may be, for example, a user-facing control key, a voice input device for receiving voice input, and a touch sensing device (e.g., a touch screen with a touch sensing function, a touch pad, etc.) for receiving user touch input; optionally, the programmable interface of the software may be, for example, an entry for a user to edit or modify a program, such as an input pin interface or an input interface of a chip; optionally, the transceiver may be a radio frequency transceiver chip with a communication function, a baseband processing chip, a transceiver antenna, and the like. An audio input device such as a microphone may receive voice data. The output device 92 may include a display, a sound, or other output device.
In one embodiment of the invention, computing device 100 includes one or more processors and one or more readable storage media storing program instructions. The program instructions, when configured to be executed by one or more processors, cause a computing device to perform a method of switching an operating system in an embodiment of the present invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the inventive method of switching the operating system according to instructions in said program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system is apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: rather, the invention as claimed requires more features than are expressly recited in each claim. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed by way of illustration and not limitation with respect to the scope of the invention, which is defined by the appended claims.

Claims (12)

1. A switching method of an operating system is executed in the operating process of the operating system, the operating system comprises a kernel, a first operating system and a second operating system, and the method comprises the following steps:
in the running process of the first running system, responding to a request for switching to the second running system, and switching the kernel from a first kernel mode corresponding to the first running system to a second kernel mode corresponding to the second running system;
starting a second middleware service program corresponding to a second running system;
and starting a second middleware operating environment module corresponding to a second operating system so as to start the second operating system.
2. The method of claim 1, further comprising the steps of:
one or more applications running based on the second running system are launched.
3. The method of claim 1 or 2, wherein a run state control module is deployed on top of the operating system; in response to a request for switching to the second operating system, the step of switching the kernel from a first kernel mode corresponding to the first operating system to a second kernel mode corresponding to the second operating system includes:
the running state control module responds to a request for switching to a second running system and informs the kernel to switch the first running system to the second running system;
and the kernel is switched from a first kernel mode corresponding to the first operating system to a second kernel mode corresponding to the second operating system.
4. The method according to any one of claims 1-3, wherein after switching the kernel from a first kernel mode corresponding to the first operating system to a second kernel mode corresponding to the second operating system, comprising the steps of:
the kernel informs the running state control module to complete the switching operation;
and the running state control module informs a second middleware service program corresponding to the second running system of starting.
5. The method of any one of claims 1-4, wherein the step of launching a second middleware runtime environment module corresponding to a second runtime system comprises:
and starting the dependent library corresponding to the second middleware to replace the dependent library corresponding to the first middleware.
6. The method of any one of claims 1-5,
the first operation system and the second operation system are respectively a general operation system and a real-time operation system;
the kernel is a fusion kernel formed by fusing a real-time kernel and a general kernel, and the first kernel mode and the second kernel mode are respectively a general kernel mode and a real-time kernel mode.
7. The method of claim 6, wherein running the real-time middleware service corresponding to the system in real-time comprises:
the fast interrupt service program is suitable for interrupting the real-time task which is being executed and carrying out interrupt processing when receiving the interrupt signal;
the real-time scheduling service program is suitable for acquiring a real-time task with the highest emergency degree from the real-time task queue by using a real-time scheduling algorithm so as to immediately execute the real-time task with the highest emergency degree;
and the real-time operation component is suitable for providing memory management service for the real-time task with the highest emergency degree.
8. The method of claim 6, wherein the generic middleware service corresponding to the generic operating system comprises:
the general scheduling service program is suitable for acquiring a highest-priority computational task from a computational task queue by using a fair scheduling algorithm when an interrupt signal is received so as to immediately execute the highest-priority computational task;
a threaded interrupt service routine adapted to interrupt a low priority computing type task and perform interrupt processing;
and the general operation component is suitable for providing memory management service for the calculation type task with the highest priority.
9. A switching method of an operating system is executed in the operating process of the operating system, the operating system comprises a kernel, a first operating system and a second operating system, and the method comprises the following steps:
in the operation process of the second operation system, responding to a request for switching to the first operation system, and closing a second middleware operation environment module corresponding to the second operation system;
closing a second middleware service program corresponding to a second running system;
and switching the kernel from a second kernel mode corresponding to the second operating system to a first kernel mode corresponding to the first operating system.
10. The method of claim 9, wherein before shutting down a corresponding second middleware runtime environment module of a second runtime system, further comprising the steps of:
and closing one or more application programs running based on the second running system.
11. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-10.
12. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-10.
CN202210539644.2A 2022-05-17 2022-05-17 Switching method of operation system and computing equipment Pending CN114911597A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210539644.2A CN114911597A (en) 2022-05-17 2022-05-17 Switching method of operation system and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210539644.2A CN114911597A (en) 2022-05-17 2022-05-17 Switching method of operation system and computing equipment

Publications (1)

Publication Number Publication Date
CN114911597A true CN114911597A (en) 2022-08-16

Family

ID=82768316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210539644.2A Pending CN114911597A (en) 2022-05-17 2022-05-17 Switching method of operation system and computing equipment

Country Status (1)

Country Link
CN (1) CN114911597A (en)

Similar Documents

Publication Publication Date Title
CN114579285B (en) Task running system and method and computing device
US20110219373A1 (en) Virtual machine management apparatus and virtualization method for virtualization-supporting terminal platform
US10459773B2 (en) PLD management method and PLD management system
KR20070083460A (en) Method and system for concurrent execution of multiple kernels
KR20040068600A (en) A method and a system for executing operating system functions, as well as an electronic device
US20240160474A1 (en) Multi-core processor task scheduling method, and device and storage medium
WO2023246044A1 (en) Scheduling method and apparatus, chip, electronic device, and storage medium
CN114168271B (en) Task scheduling method, electronic device and storage medium
CN108196946A (en) A kind of subregion multinuclear method of Mach
CN115167996A (en) Scheduling method and device, chip, electronic equipment and storage medium
CN113296874B (en) Task scheduling method, computing device and storage medium
US20040098722A1 (en) System, method, and computer program product for operating-system task management
CN114637536A (en) Task processing method, computing coprocessor, chip and computer equipment
US10884781B2 (en) Method and apparatus for a virtual machine
CN114911538A (en) Starting method of running system and computing equipment
CN111310638B (en) Data processing method, device and computer readable storage medium
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN115658278B (en) Micro-task scheduler supporting high concurrency protocol interaction
WO2023165318A1 (en) Resource processing system and method
CN100576175C (en) The parallel executing method and the system that are used for a plurality of kernels
CN114911597A (en) Switching method of operation system and computing equipment
CN114911539B (en) Starting method of running system and computing equipment
CN117407054A (en) Interrupt processing method, electronic device, and storage medium
US8424013B1 (en) Methods and systems for handling interrupts across software instances and context switching between instances having interrupt service routine registered to handle the interrupt
US9619277B2 (en) Computer with plurality of processors sharing process queue, and process dispatch processing method

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