A task running system, method, and computing device

By deploying a task execution system on edge computing server nodes and utilizing a preemptive kernel and interrupt preprocessing module, task scheduling with hybrid time-domain characteristics is achieved, meeting the real-time and computational task requirements of edge computing server nodes, optimizing resource utilization, and solving the problem of slow response from cloud centers and network terminal devices.

CN115168013BActive Publication Date: 2026-01-13WUHAN SHENZHIDU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210927215.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2026-01-13
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing real-time operating systems and general-purpose operating systems cannot meet the task execution requirements of edge computing server nodes with mixed time-domain characteristics, making it difficult to resolve the contradiction between computing resources and physical distance.

Method used

A task execution system is provided, including a preemptive kernel, an interrupt preprocessing module, a real-time runtime domain, and a general-purpose runtime domain. Tasks are allocated to the corresponding runtime domains for processing through interrupt signal processing, ensuring that the most urgent real-time tasks and the highest priority computational tasks are executed in a timely manner.

Benefits of technology

It achieves hybrid time-domain characteristics, enabling simultaneous scheduling and execution of real-time and computational tasks, optimizing resource utilization, and solving the problem of slow response between cloud centers and network terminal devices due to long physical distances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168013B_ABST
    Figure CN115168013B_ABST
Patent Text Reader

Abstract

The application discloses a task running system, method and computing device, and the system comprises a preemptive kernel, an interrupt preprocessing module, a real-time runtime domain arranged above the interrupt preprocessing module and a general runtime domain, wherein the interrupt preprocessing module sends an interrupt signal to a corresponding runtime domain for processing according to the interrupt type in response to a hardware-generated interrupt signal; the real-time runtime domain interrupts an executing real-time task and performs interrupt processing when receiving the interrupt signal, acquires a real-time task with the highest emergency degree from a real-time task queue, and executes the real-time task with the highest emergency degree immediately; and the general runtime domain acquires a computing task with the highest priority from a computing task queue when receiving the interrupt signal, interrupts a low-priority computing task and performs interrupt processing, and executes the computing task with the highest priority immediately. According to the technical scheme of the application, mixed running of real-time tasks and computing tasks can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of invention patent application 2022104630832, filed on April 29, 2022. Technical Field

[0002] This invention relates to the fields of edge computing and operating system technology, and in particular to a task execution system, task execution method and computing device. Background Technology

[0003] Cloud computing technology improves the utilization of hardware resources and significantly reduces the cost of using IT information systems by partitioning and managing resources, while also increasing system availability. Currently, most mainstream large-scale internet services are based on cloud computing infrastructure.

[0004] With the development of 5G technology, the Internet is expanding into deeper and broader areas, and the topological distance between network terminals and network centers is constantly increasing, affecting the timeliness of network application responses. Network terminals are the dividing line between the digital and physical worlds, and network terminal devices typically have real-time requirements, needing to complete computational tasks and provide feedback on the results within a limited time.

[0005] In existing technologies, due to cost and other factors, the computing power of network terminal devices is generally weak. They need to utilize cloud center computing resources to complete core computing tasks, and then the network terminal devices complete the remaining computing tasks. However, the large distance between the cloud center and the network terminal affects the real-time performance of the interaction during network transmission. Therefore, a new computing method needs to be introduced between the cloud center and the network terminal, i.e., at the edge of the cloud, to resolve the contradiction between computing resources and physical distance.

[0006] Existing operating systems include two types: real-time operating systems (RTOS) and general-purpose operating systems (GOS). Real-time operating systems are generally used for network terminal devices to ensure the real-time performance of tasks. General-purpose operating systems are generally used for cloud server centers to maximize the utilization of computing resources.

[0007] Edge computing server nodes need to run both computational and real-time tasks. Therefore, existing single real-time operating systems or general-purpose operating systems cannot meet the needs of edge computing server nodes.

[0008] Therefore, a task execution system with hybrid time-domain characteristics is needed to solve the problems existing in the prior art. Summary of the Invention

[0009] Therefore, the present invention provides a task execution system, a task execution method, and a computing device to solve or at least alleviate the problems mentioned above.

[0010] According to one aspect of the present invention, a task execution system is provided, suitable for deployment in an edge computing server. The system includes a preemptive kernel, an interrupt preprocessing module disposed on the preemptive kernel, a real-time runtime domain disposed on the interrupt preprocessing module, and a general runtime domain, wherein: the interrupt preprocessing module is adapted to respond to an interrupt signal generated by hardware, determine an interrupt type according to the interrupt signal, and send the interrupt signal to the corresponding runtime domain for processing according to the interrupt type; the real-time runtime domain is adapted to interrupt the currently executing real-time task and perform interrupt processing when receiving an interrupt signal, and retrieve the real-time task with the highest urgency from the real-time task queue so as to immediately execute the real-time task with the highest urgency; the general runtime domain is adapted to retrieve the highest priority computing task from the computing task queue when receiving an interrupt signal, interrupt low-priority computing tasks and perform interrupt processing so as to immediately execute the highest priority computing task.

[0011] Optionally, in the task execution system according to the present invention, the real-time runtime domain includes: a fast interrupt module, adapted to interrupt the executing real-time task and perform interrupt processing when an interrupt signal is received; a real-time scheduling module, adapted to use a real-time scheduling algorithm to obtain the most urgent real-time task from the real-time task queue so as to execute the most urgent real-time task immediately; and a real-time execution module, adapted to provide memory management services for the most urgent real-time task.

[0012] Optionally, in the task execution system according to the present invention, the fast interrupt module is further adapted to: send an interrupt signal to the processor so that the processor can look up the corresponding interrupt handler from the fast interrupt vector table, and interrupt the real-time task being executed by the interrupt handler and perform interrupt processing.

[0013] Optionally, in the task execution system according to the present invention, the general runtime domain includes: a general scheduling module, adapted to obtain the highest priority computational task from the computational task queue using a fair scheduling algorithm when an interrupt signal is received, so as to execute the highest priority computational task immediately; a threaded interrupt module, adapted to interrupt low-priority computational tasks and perform interrupt handling; and a general execution module, adapted to provide memory management services for the highest priority computational task.

[0014] Optionally, in the task execution system according to the present invention, the threaded interrupt module is further adapted to: send the interrupt signal to the processor, so that the processor converts the interrupt signal into a corresponding interrupt request and searches for one or more interrupt handlers associated with the interrupt request from the interrupt request registry; and sequentially wake up one or more processing threads corresponding to the one or more interrupt handlers, so as to interrupt low-priority computational tasks and perform interrupt processing via the one or more processing threads.

[0015] Optionally, in the task execution system according to the present invention, the fair scheduling algorithm includes the CFS scheduling algorithm.

[0016] Optionally, in the task execution system according to the present invention, the real-time scheduling algorithm includes the lowest slackness first scheduling algorithm.

[0017] Optionally, in the task operation system according to the present invention, the interrupt preprocessing module is further adapted to: obtain interrupt source information from the interrupt signal, and determine the interrupt type based on the interrupt source information.

[0018] According to one aspect of the present invention, a task execution method is provided, executed in a task execution system, the system including a preemptive kernel, an interrupt preprocessing module disposed on the preemptive kernel, a real-time runtime domain disposed on the interrupt preprocessing module, and a general-purpose runtime domain, the method comprising the steps of: the interrupt preprocessing module responding to an interrupt signal generated by hardware, determining an interrupt type according to the interrupt signal, and sending the interrupt signal to the corresponding runtime domain for processing according to the interrupt type; the real-time runtime domain, upon receiving an interrupt signal, interrupting the currently executing real-time task and performing interrupt processing, retrieving the real-time task with the highest urgency from the real-time task queue, so as to immediately execute the real-time task with the highest urgency; the general-purpose runtime domain, upon receiving an interrupt signal, retrieving the highest priority computational task from the computational task queue, interrupting low-priority computational tasks and performing interrupt processing, so as to immediately execute the highest priority computational task.

[0019] According to one aspect of the present invention, a computing device is provided, 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 including instructions for performing the task execution method as described above.

[0020] According to one aspect of the present invention, a readable storage medium storing program instructions is provided, which, when read and executed by a computing device, causes the computing device to perform the task execution method described above.

[0021] According to the technical solution of the present invention, a task execution system is provided, which can meet the needs of mixed execution of real-time tasks and computational tasks by setting up a real-time runtime domain and a general-purpose runtime domain. The interrupt preprocessing module can respond to interrupt signals generated by hardware and allocate the interrupt signal to the corresponding runtime domain for processing according to the interrupt type. When the real-time runtime domain receives an interrupt signal, it immediately interrupts the currently executing real-time task and performs interrupt processing, and selects the real-time task with the highest urgency from the CPU's real-time task queue so that the CPU can immediately execute the real-time task with the highest urgency. When the general-purpose runtime domain receives an interrupt signal, it first obtains the highest priority computational task from the CPU's computational task queue, and then can interrupt the currently executing low-priority computational task and perform interrupt processing so that the CPU can immediately execute the highest priority computational task. Therefore, the task execution system of the present invention has hybrid time-domain characteristics, enabling both priority processing of the most urgent real-time tasks and priority processing of the highest priority computational tasks, and achieving simultaneous scheduling and execution of real-time tasks and computational tasks. This approach satisfies the computing power and real-time control requirements of hybrid services, as well as the need for edge computing server nodes to run both real-time and computational tasks. Furthermore, given the limited resources of edge computing server nodes, the task execution system based on this invention allows for the mixed execution of real-time and computational tasks on a single platform, thus optimizing the use of limited resources. Moreover, by deploying the task execution system of this invention on edge computing server nodes, a more complete network information system can be formed by connecting cloud center servers and network terminal devices, solving the problem of slow response times due to excessive physical distance between cloud center servers and network terminals.

[0022] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0023] To achieve the foregoing and related objectives, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings. These aspects indicate various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The foregoing and other objectives, features, and advantages of this disclosure will become more apparent from the following detailed description, taken in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.

[0024] Figure 1A schematic diagram of a task execution system 120 deployed in an edge computing server 100 according to an embodiment of the present invention is shown;

[0025] Figure 2 A schematic diagram of a computing device 200 according to an embodiment of the present invention is shown;

[0026] Figure 3 A flowchart of a task execution method 300 according to an embodiment of the present invention is shown. Detailed Implementation

[0027] Exemplary embodiments of the present disclosure will now be described in more detail 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 implemented 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.

[0028] Figure 1 A schematic diagram of a task execution system 120 deployed in an edge computing server 100 according to an embodiment of the present invention is shown.

[0029] like Figure 1 As shown, the edge computing server 100 may include a hardware layer 110, a task execution system 120, and an application layer 130. In some embodiments, the task execution system 120 may be part of an operating system, meaning the operating system of the edge computing server 100 includes the task execution system 120. In still other embodiments, the operating system of the edge computing server 100 may be implemented as the task execution system 120 of this invention.

[0030] Specifically, application layer 130 may include one or more applications. Here, the present invention does not limit the type or number of applications. Developers can also develop applications according to actual business needs. Each application can call the interface provided by the task execution system to request the business execution system to execute tasks. In one embodiment, applications may include, for example, applications for hybrid environment monitoring, applications for hybrid business debugging, and applications for hybrid business analysis.

[0031] Hardware layer 110 provides a hardware environment for the operation of the task running system and applications. Hardware layer 110 may include a processor (CPU), internal memory, and external hardware devices such as network cards, hard disks, and keyboards.

[0032] The task execution system 120 can provide a runtime environment for one or more tasks (including real-time tasks and computational tasks) requested by applications.

[0033] The task execution system 120 according to the present invention can run real-time tasks and computational tasks simultaneously. It should be noted that real-time tasks are those that require a timely response within a specified time, such as traffic light signal control. Computational tasks refer to tasks that require processing large amounts of data and have high computational requirements, such as audio / video processing and database applications.

[0034] Real-time tasks and computational tasks have different requirements in terms of interrupt handling, scheduling, and memory management. Specifically, regarding interrupt handling, real-time tasks need to execute the most urgent tasks as quickly as possible through interrupt processing; while computational tasks do not want the currently executing task to be frequently interrupted. Regarding scheduling, real-time tasks need to be scheduled as soon as an event arrives; while computational tasks do not want the currently executing task to be frequently scheduled out. In terms of memory management, real-time tasks need to be entirely stored in memory, rather than being swapped out of virtual memory; computational tasks, due to the large amount of data they need to process, need to make full use of virtual memory to achieve large-scale data computation.

[0035] In view of the requirements of real-time tasks and computational tasks in terms of interrupt handling, scheduling, and memory management, the present invention provides a task execution system 120 that can simultaneously schedule and execute real-time tasks and computational tasks.

[0036] According to embodiments of the present invention, such as Figure 1 As shown, the task execution system 120 includes a preemptive kernel 121, an interrupt preprocessing module 122 arranged on top of the preemptive kernel 121, and a runtime system arranged on top of the interrupt preprocessing module 122. The runtime system includes a real-time runtime domain 123 and a general-purpose runtime domain 124 (non-real-time runtime domain). The real-time runtime domain 123 provides a runtime environment for real-time tasks, while the general-purpose runtime domain 124 provides a runtime environment for computational tasks.

[0037] It should be noted that the preemptive kernel 121 in this invention adopts a fully preemptive kernel to ensure basic real-time response capabilities and integrated resource scheduling capabilities. Each runtime domain uses a complete and independent core software stack, which isolates the two runtime domains from each other to ensure the independence of real-time tasks and computational tasks with different time characteristics during runtime.

[0038] In one embodiment, such as Figure 1As shown, the task execution system 120 also includes an application domain management module 126 located above the real-time runtime domain 123 and the general runtime domain 124. The application domain management module 126 provides a unified domain control interface for one or more applications in the upper application layer, allowing applications to request task execution by calling the domain control interface. The application domain management module 126 can receive task execution requests from one or more applications and assign tasks to the appropriate domains for execution based on the task type. That is, when a task is a real-time task, it is assigned to the real-time runtime domain 123 for execution, providing a real-time runtime environment. When a task is a computational task, it is assigned to the general runtime domain 124 for execution, providing a general runtime environment.

[0039] According to an embodiment of the present invention, each module in the real-time runtime domain 123 is used to implement the priority processing of real-time tasks with the highest urgency, and each module in the general runtime domain 124 is used to implement the priority processing of computational tasks with the highest priority.

[0040] Specifically, the preemptive kernel 121 can receive hardware-generated interrupt signals, i.e., hardware interrupt signals. These hardware interrupt signals are automatically generated by hardware devices (such as network cards, hard drives, keyboards, etc.) that are communicatively connected to the task execution system 120. Subsequently, the preemptive kernel 121 can send the hardware interrupt signal to the interrupt preprocessing module 122, so that the interrupt preprocessing module 122 can allocate the interrupt signal to the corresponding runtime domain for processing.

[0041] The interrupt preprocessing module 122 can respond to hardware-generated interrupt signals, determine the interrupt type based on the interrupt signal, and allocate the interrupt signal to the corresponding runtime domain (real-time runtime domain 123 or general runtime domain 124) for processing according to the interrupt type. Here, the interrupt signal includes interrupt source information. The interrupt preprocessing module 122 can obtain the interrupt source information from the interrupt signal and determine the interrupt type based on the interrupt source information. The interrupt type determines whether the task that needs to be executed immediately is a real-time task with the highest urgency or a computational task with the highest priority.

[0042] In this context, when the real-time runtime domain 123 receives an interrupt signal, it first immediately interrupts the currently executing real-time task and performs interrupt handling. Then, it uses a real-time scheduling algorithm to retrieve the most urgent real-time task from the processor's (CPU) real-time task queue, allowing the processor (CPU) to execute this most urgent task immediately. In this case, the most urgent real-time task effectively preempts the processor's usage rights. It can be understood that when the real-time runtime domain 123 receives an interrupt signal, it first interrupts the currently executing task and then performs scheduling processing.

[0043] When the general-purpose runtime domain 124 receives an interrupt signal, it first retrieves the highest-priority computational task from the processor's computational task queue. For example, it can retrieve the highest-priority computational task from the computational task queue based on a fair scheduling algorithm. Then, it can interrupt the currently executing low-priority computational task and perform interrupt handling so that the processor can immediately execute the highest-priority computational task.

[0044] Furthermore, after selecting the highest-priority computational task from the computational task queue, the general-purpose runtime domain 124 needs to determine whether the selected highest-priority computational task is currently being executed. If the highest-priority computational task is not currently being executed, it means that the currently executing computational task is a low-priority computational task. Therefore, the currently executing low-priority computational task (which is also the previously highest-priority computational task) is interrupted and an interrupt handling is performed, so that the processor immediately switches to executing the highest-priority computational task. In this case, it is equivalent to the highest-priority computational task preempting the processor's usage rights.

[0045] Furthermore, if the highest priority computational task selected is the currently executing computational task, there is no need to interrupt the currently executing computational task or perform interrupt handling, thus avoiding frequent interruptions of computational tasks. It can be understood that when the general runtime domain 124 receives an interrupt signal, it first performs scheduling processing and then determines whether interrupt handling is necessary.

[0046] According to one embodiment of the present invention, the real-time runtime domain 123 includes a fast interrupt module 1231, a real-time scheduling module 1232, and a real-time execution module 1233. During the execution of the most urgent real-time tasks, the real-time execution module 1233 can provide memory management services for the execution of the most urgent real-time tasks.

[0047] The fast interrupt module 1231 runs on the processor. When it receives an interrupt signal, the fast interrupt module 1231 can interrupt the execution of a real-time task and perform interrupt handling.

[0048] Furthermore, the fast interrupt module 1231 can be bound to an interrupt handler. When the fast interrupt module 1231 receives an interrupt signal, it can send the interrupt signal to the processor. The processor looks up the corresponding interrupt handler (i.e., the interrupt handler bound to the fast interrupt module 1231) in the fast interrupt vector table and sends the interrupt signal to the interrupt handler so that the ongoing real-time task can be interrupted and interrupted.

[0049] It should be noted that interrupt handling refers to the process by which the processor temporarily suspends the execution of the current task and switches to execute the new task (such as the most urgent real-time task or the highest priority computing task in the above embodiments) when a new task that needs to be executed first appears.

[0050] The real-time scheduling module 1232 can use a real-time scheduling algorithm to obtain the most urgent real-time task from the real-time task queue so that the processor can immediately execute the most urgent real-time task.

[0051] In one embodiment, the real-time scheduling algorithm can be implemented as a minimum slackness first scheduling algorithm, that is, the minimum slackness first scheduling algorithm can be used to obtain the real-time task with the highest urgency from the real-time task queue. It should be noted that the minimum slackness first scheduling algorithm determines the priority of tasks based on their urgency (or slackness). For the embodiments of the present invention, the higher the urgency of a real-time task, the higher the priority assigned to it, so that the real-time task with the highest urgency is executed first. In the real-time task queue, each real-time task is sorted from low to high slackness (that is, from high to low urgency), with the real-time task with the lowest slackness (highest urgency) at the front of the real-time task queue and being scheduled for execution first. The slackness is calculated as follows: real-time task slackness = required completion time - its own running time - current time. According to this algorithm, when the minimum slackness of a real-time task decreases to 0, the real-time scheduling module 1232 must immediately schedule the real-time task to allow it to immediately preempt the processor, ensuring that the real-time task is completed according to the deadline.

[0052] According to one embodiment of the present invention, the general runtime domain 124 includes a general scheduling module 1242, a threaded interrupt module 1241, and a general operation module 1243. During the execution of the highest priority computational task, the general operation module 1243 can provide memory management services for the highest priority computational task.

[0053] The general-purpose scheduling module 1242, upon receiving an interrupt signal, can select and obtain the highest-priority computational task from the processor's computational task queue using a fair scheduling algorithm, so that the processor can immediately execute the highest-priority computational task. In one implementation, the fair scheduling algorithm can be implemented as the CFS scheduling algorithm. The general-purpose scheduling module 1242 can use the CFS scheduling algorithm to select the highest-priority computational task from the processor's task queue. Specifically, according to the CFS scheduling algorithm, the general-purpose scheduling module 1242 will always select the slowest-running computational task from the computational task queue as the highest-priority computational task, so that slower computational tasks can get more execution opportunities.

[0054] It should be noted that if the highest priority computational task is the currently executing computational task, then the currently executing computational task will continue to execute, and there is no need to interrupt the currently executing computational task.

[0055] If the highest priority computational task is not the currently executing computational task, in other words, the currently executing computational task is a low-priority computational task, then the threaded interrupt module 1241 further interrupts the currently executing low-priority computational task and performs interrupt handling.

[0056] In one embodiment, the threaded interrupt module 1241 runs on the processor. Specifically, the threaded interrupt module 1241 can interrupt and handle a low-priority computational task being executed by sending an interrupt signal to the processor, which then converts the interrupt signal into a corresponding interrupt request (IRQ) and searches for one or more interrupt handlers associated with that interrupt request in the interrupt request registry. Furthermore, the processor sequentially wakes up one or more processing threads corresponding to the one or more interrupt handlers, so that the low-priority computational task being executed can be interrupted and handled via these processing threads.

[0057] Specifically, there can be multiple interrupt handlers associated with an interrupt request. As the processor searches the interrupt request registry for the multiple interrupt handlers associated with the interrupt request, it wakes up the corresponding processing thread for each associated interrupt handler found. This allows the processing thread to interrupt the currently executing low-priority computational task and handle the interrupt. After the processing thread completes its execution, the processor searches the interrupt request registry for the next associated interrupt handler, wakes up the next processing thread corresponding to that next interrupt handler, and waits for that next processing thread to complete its execution. This process continues until all processing threads corresponding to the interrupt handlers associated with the interrupt request have completed their execution, thus completing the interrupt handling.

[0058] Additionally, in one embodiment, such as Figure 1 As shown, a domain resource management module 125 can also be deployed between the real-time runtime domain 123 and the general runtime domain 124. The domain resource management module 125 is used to separate the resources of the real-time runtime domain 123 and the general runtime domain 124, ensuring the isolation of resources and features between the real-time runtime domain 123 and the general runtime domain 124.

[0059] According to the task execution system 120 of the present invention, by setting up a real-time runtime domain and a general-purpose runtime domain, the requirements for mixed execution of real-time tasks and computational tasks can be met. The interrupt preprocessing module can respond to interrupt signals generated by hardware and allocate the interrupt signal to the corresponding runtime domain for processing according to the interrupt type. When the real-time runtime domain receives an interrupt signal, it immediately interrupts the currently executing real-time task and performs interrupt processing, then selects the real-time task with the highest urgency from the CPU's real-time task queue so that the CPU can immediately execute the real-time task with the highest urgency. When the general-purpose runtime domain receives an interrupt signal, it first obtains the highest-priority computational task from the CPU's computational task queue, and then can interrupt the currently executing low-priority computational task and perform interrupt processing so that the CPU can immediately execute the highest-priority computational task. Therefore, the task execution system of the present invention has hybrid time-domain characteristics, enabling both priority processing of the most urgent real-time tasks and priority processing of the highest-priority computational tasks, and achieving simultaneous scheduling and execution of real-time tasks and computational tasks. This approach satisfies the computing power and real-time control requirements of hybrid services, as well as the need for edge computing server nodes to run both real-time and computational tasks. Furthermore, given the limited resources of edge computing server nodes, the task execution system based on this invention allows for the mixed execution of real-time and computational tasks on a single platform, thus optimizing the use of limited resources. Moreover, by deploying the task execution system of this invention on edge computing server nodes, a more complete network information system can be formed by connecting cloud center servers and network terminal devices, solving the problem of slow response times due to excessive physical distance between cloud center servers and network terminals.

[0060] According to one embodiment of the present invention, the edge computing server 100 can implement the computing device 200 as shown below.

[0061] Figure 2 A schematic diagram of a computing device 200 according to an embodiment of the present invention is shown.

[0062] like Figure 2As shown, in basic configuration 202, computing device 200 typically includes system memory 206 and one or more processors 204. Memory bus 208 can be used for communication between processor 204 and system memory 206.

[0063] Depending on the desired configuration, processor 204 can be any type of processor, including but not limited to: microprocessor (UP), microcontroller (UC), digital information processor (DSP), or any combination thereof. Processor 204 may include one or more levels of cache such as L1 cache 210 and L2 cache 212, processor core 214, and registers 216. Example processor core 214 may include an arithmetic logic unit (ALU), floating-point unit (FPU), digital signal processing core (DSP core), or any combination thereof. Example memory controller 218 may be used with processor 204, or in some implementations, memory controller 218 may be an internal part of processor 204.

[0064] Depending on the desired configuration, system memory 206 can be any type of memory, including but not limited to volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 may include operating system 220, one or more applications 222, and program data 224. Application 222 is actually a set of program instructions that instruct processor 204 to perform corresponding operations. In some embodiments, application 222 may be arranged to cause processor 204 to operate using program data 224 on the operating system.

[0065] The computing device 200 also includes a storage device 232, which includes a removable storage device 236 and a non-removable storage device 238.

[0066] The computing device 200 may also include a storage interface bus 234. The storage interface bus 234 enables communication from storage devices 232 (e.g., removable storage 236 and non-removable storage 238) to the basic configuration 202 via the bus / interface controller 230. At least a portion of the operating system 220, applications 222, and program data 224 may be stored on the removable storage 236 and / or the non-removable storage 238, and loaded into system memory 206 via the storage interface bus 234 when the computing device 200 is powered on or when the application 222 is to be executed, and executed by one or more processors 204.

[0067] The computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via a bus / interface controller 230. Example output devices 242 include an image processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices such as displays or speakers via one or more A / V ports 252. Example peripheral interfaces 244 may include a serial interface controller 254 and a parallel interface controller 256, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 258. Example communication devices 246 may include a network controller 260, which may be arranged to facilitate communication with one or more other computing devices 262 via a network communication link through one or more communication ports 264.

[0068] A network communication link can be an example of a communication medium. A communication medium can typically be embodied in a modulated data signal, such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A “modulated data signal” can be a signal in which one or more of its data sets, or changes thereof, can be encoded as information within the signal. As a non-limiting example, a communication medium can include wired media such as wired networks or leased lines, and various wireless media such as voice, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term “computer-readable medium” as used herein can include both storage media and communication media.

[0069] In an embodiment of the invention, computing device 200 is configured to execute task execution method 300 according to the invention. The operating system of computing device 200 contains multiple program instructions for executing the task execution method 300 of the invention, so that the computing device can perform a hybrid execution of real-time tasks and computational tasks by executing the task execution method 300 of the invention.

[0070] In one embodiment of the present invention, the operating system of the computing device 200 includes a task execution system 120, which is configured to execute the task execution method 300 according to the present invention.

[0071] Figure 3A flowchart of a task execution method 300 according to an embodiment of the present invention is shown. Method 300 is adapted to be executed in a task execution system 120. The task execution system 120 may be deployed in an edge server 100 (e.g., the aforementioned computing device 200).

[0072] like Figure 3 As shown, method 300 includes steps S310 to S330.

[0073] In step S310, the interrupt preprocessing module 122 responds to the interrupt signal generated by the hardware, determines the interrupt type based on the interrupt signal, and allocates the interrupt signal to the corresponding runtime domain (real-time runtime domain 123 or general runtime domain 124) for processing according to the interrupt type. Here, the interrupt signal includes interrupt source information. The interrupt preprocessing module 122 can obtain the interrupt source information from the interrupt signal and determine the interrupt type based on the interrupt source information. The interrupt type determines whether the task that needs to be executed immediately is a real-time task with the highest urgency or a computational task with the highest priority.

[0074] In step S320, when the real-time runtime domain 123 receives an interrupt signal, it first immediately interrupts the currently executing real-time task and performs interrupt handling. Then, it uses a real-time scheduling algorithm to retrieve the most urgent real-time task from the CPU's real-time task queue, allowing the CPU to execute this most urgent task immediately. At this point, it's equivalent to the most urgent real-time task preempting the CPU's usage rights. It can be understood that when the real-time runtime domain 123 receives an interrupt signal, it first interrupts the currently executing task and then performs scheduling processing.

[0075] In step S330, when the general runtime domain 124 receives an interrupt signal, it first retrieves the highest-priority computational task from the CPU's computational task queue. For example, it can retrieve the highest-priority computational task from the computational task queue based on a fair scheduling algorithm. Then, it can interrupt the currently executing low-priority computational task and perform interrupt handling so that the CPU can immediately execute the highest-priority computational task.

[0076] Furthermore, after selecting the highest-priority computational task from the computational task queue, it's necessary to determine if the selected highest-priority computational task is already being executed. If the highest-priority computational task is not currently being executed, it means the currently executing computational task is a low-priority task. Therefore, the executing low-priority computational task (which is also the previously highest-priority task) is interrupted and an interrupt handler is executed, allowing the CPU to immediately switch to executing the highest-priority computational task. In this case, the highest-priority computational task has essentially preempted the CPU.

[0077] Furthermore, if the highest priority computational task selected is the currently executing computational task, there is no need to interrupt the currently executing computational task or perform interrupt handling, thus avoiding frequent interruptions of computational tasks. It can be understood that when the general runtime domain 124 receives an interrupt signal, it first performs scheduling processing and then determines whether interrupt handling is necessary.

[0078] It should be noted that the specific implementation of the task execution method 300 can be found in the previous description of the task execution system 120, and will not be repeated here.

[0079] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, can take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, 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 present invention.

[0080] When the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store program code; the processor is configured to execute the task execution method of the present invention according to instructions in the program code stored in the memory.

[0081] By way of example, and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.

[0082] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0083] Numerous specific details are set forth in the specification provided herein. However, it will be understood 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 so as not to obscure the understanding of this specification.

[0084] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more aspects of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0085] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.

[0086] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0087] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0088] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.

[0089] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.

[0090] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and edibility purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative rather than restrictive, and the scope of the invention is defined by the appended claims.

Claims

1. A task running system adapted to be deployed in an edge computing server, the edge computing server comprising an application layer, the application layer comprising one or more applications, the applications adapted to invoke an interface of the system to request the system to perform a task, the task comprising a real-time task and a compute task, wherein, The system comprises a preemptive kernel, an interrupt preprocessing module arranged above the preemptive kernel, a real-time runtime domain and a general runtime domain arranged above the interrupt preprocessing module, a domain resource management module deployed between the real-time runtime domain and the general runtime domain, wherein: The preemptive kernel is adapted to receive a hardware-generated interrupt signal and send the interrupt signal to the interrupt preprocessing module; The interrupt preprocessing module is adapted to determine an interrupt type according to the interrupt signal in response to the hardware-generated interrupt signal, and send the interrupt signal to a corresponding runtime domain for processing according to the interrupt type; The real-time runtime domain comprises: A fast interrupt module adapted to interrupt an executing real-time task and perform interrupt processing when an interrupt signal is received; A real-time scheduling module adapted to acquire a real-time task with the highest urgency from a real-time task queue by using a real-time scheduling algorithm, so as to immediately execute the real-time task with the highest urgency; A real-time running module adapted to provide memory management services for the real-time task with the highest urgency; The general runtime domain is adapted to acquire a computing task with the highest priority from a computing task queue, interrupt a low-priority computing task and perform interrupt processing, so as to immediately execute the computing task with the highest priority when an interrupt signal is received; The domain resource management module is adapted to separate resources of the real-time runtime domain and the general runtime domain; The real-time runtime domain and the general runtime domain are independent core software stacks, so that the real-time runtime domain and the general runtime domain are mutually isolated, and real-time tasks and computing tasks with different time characteristics are independently executed.

2. The system of claim 1, wherein, The fast interrupt module is further adapted to: Send the interrupt signal to a processor, so that the processor searches a corresponding interrupt processing program from a fast interrupt vector table, and interrupts an executing real-time task and performs interrupt processing through the interrupt processing program.

3. The system of claim 1, wherein, The general runtime domain comprises: A general scheduling module adapted to acquire a computing task with the highest priority from a computing task queue by using a fair scheduling algorithm when an interrupt signal is received, so as to immediately execute the computing task with the highest priority; A threaded interrupt module adapted to interrupt a low-priority computing task and perform interrupt processing; A general running module adapted to provide memory management services for the computing task with the highest priority.

4. The system of claim 3, wherein, The threaded interrupt module is further adapted to: Send the interrupt signal to a processor, so that the processor converts the interrupt signal into a corresponding interrupt request, and searches one or more interrupt processing programs associated with the interrupt request from an interrupt request registration table; Wake up one or more processing threads corresponding to the one or more interrupt processing programs in sequence, so as to interrupt a low-priority computing task and perform interrupt processing through the one or more processing threads.

5. The system of claim 3 or 4, wherein: The fair scheduling algorithm comprises a CFS scheduling algorithm.

6. The system of any one of claims 1-4, wherein: The real-time scheduling algorithm comprises a lowest slackness priority scheduling algorithm.

7. The system of any one of claims 1-4, wherein, The interrupt preprocessing module is further adapted to: acquire interrupt source information from the interrupt signal, and determine an interrupt type according to the interrupt source information.

8. A task running method, executed in a task running system deployed in an edge computing server, the edge computing server comprising an application layer, the application layer comprising one or more applications, the applications adapted to invoke an interface of the system to request the system to perform a task, the task comprising a real-time task and a compute task, wherein, The system comprises a preemptive kernel, an interrupt preprocessing module arranged above the preemptive kernel, a real-time runtime domain and a general runtime domain arranged above the interrupt preprocessing module, a domain resource management module deployed between the real-time runtime domain and the general runtime domain, the domain resource management module being adapted to separate resources of the real-time runtime domain and the general runtime domain, and the method comprises the steps of: The preemptive kernel receives a hardware-generated interrupt signal, and sends the interrupt signal to the interrupt preprocessing module; The interrupt preprocessing module determines an interrupt type according to the interrupt signal in response to the hardware-generated interrupt signal, and sends the interrupt signal to a corresponding runtime domain for processing according to the interrupt type; The real-time runtime domain interrupts a real-time task being executed and performs interrupt processing through a fast interrupt module when receiving an interrupt signal; The real-time scheduling module acquires a real-time task with the highest emergency degree from a 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; The real-time runtime module provides memory management services for the real-time task with the highest emergency degree; The general runtime domain acquires a highest-priority computing task from a computing task queue, interrupts a low-priority computing task and performs interrupt processing, so as to immediately execute the highest-priority computing task when receiving an interrupt signal; The real-time runtime domain and the general runtime domain are independent core software stacks, so that the real-time runtime domain and the general runtime domain are mutually isolated, and real-time tasks and computing tasks with different time characteristics are independently executed.

9. A computing device comprising: at least one processor; and a memory storing program instructions configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of claim 8.

10. A readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform the method of claim 8.

Citation Information

Patent Citations

  • Real-time dual-kernel single-machine semi-physical simulation framework and simulation method

    CN112131741A