CN115391005A - Linux real-time processing method and device, equipment and medium - Google Patents
Linux real-time processing method and device, equipment and medium Download PDFInfo
- Publication number
- CN115391005A CN115391005A CN202210933117.XA CN202210933117A CN115391005A CN 115391005 A CN115391005 A CN 115391005A CN 202210933117 A CN202210933117 A CN 202210933117A CN 115391005 A CN115391005 A CN 115391005A
- Authority
- CN
- China
- Prior art keywords
- module
- task
- real
- time
- preset function
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a Linux real-time processing method, a Linux real-time processing device, equipment and a medium, wherein the method comprises the following steps: acquiring a real-time task; calling a preset function module, wherein the preset function module is in a state of processing a first task and is obtained by modifying a Linux kernel; replacing the first task with a real-time task; and if the real-time task is processed, unloading the preset function module. By the method, the real-time performance of the processing task of the Linux operating system can be improved.
Description
Technical Field
The application relates to the field of computers, in particular to a real-time Linux processing method, a real-time Linux processing device, equipment and a medium.
Background
The main goal of real-time operating systems is to create a predictable, deterministic environment. All tasks it foresees from the time it is created, e.g. it has to return results within a deadline. A real-time operating system can ensure that the worst-case time to complete a calculation is known in advance and does not exceed a limit. Predictability and determinism are the most prominent features of real-time operating systems.
Linux operating systems have been improved after version 2.5 to make processes preemptible, but Linux does not guarantee predictability and certainty. One of the biggest problems in Linux is the phenomenon of priority inversion. For example, a high priority process must wait for a low priority process when a low priority process is in the critical area; alternatively, a low priority interrupt service process is running, and the high priority process must wait. This phenomenon can cause significant uncertainty. In addition, a spin lock used in Linux can cause a process to perform self-circulation continuously and continuously occupy CPU resources, and on a multi-core processor, the process on a certain core can stop without any reason.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present application provides a Linux real-time processing method to solve the above-mentioned technical problems.
The application provides a Linux real-time processing method, which comprises the following steps:
acquiring a real-time task;
calling a preset function module, wherein the preset function module is in a state of processing a first task and is obtained by modifying a Linux kernel;
replacing the first task with a real-time task;
and if the real-time task is processed, unloading the preset function module.
In an embodiment of the application, the preset function module includes a real-time lock module, the real-time lock module includes an rt-mutex lock, and the rt-mutex lock is used for preempting a first task of the preset function module;
in an embodiment of the application, the preset function module includes a preemptible critical section module, and the preemptible critical section module is obtained by setting a preemptible mode for a critical section.
In an embodiment of the present application, an interrupt process is performed on a first task, and the first task is replaced with a real-time task.
In an embodiment of the present application, the preset function module includes a priority inheritance module, the priority inheritance module includes a kernel priority inheritance lock, and the kernel priority inheritance lock is used for changing the priority of the current task; the first task is a low priority;
in an embodiment of the present application, the priority of the first task is adjusted to a high priority; and processing the real-time task after the first task is processed through the preset function module.
In an embodiment of the application, the preset function module includes a lower-half-interrupt threading module, the lower-half-interrupt threading module is obtained by threading a lower half-interrupt in the Linux kernel, and the off-off interrupt time of the preset function module for processing the interrupt service program is adjusted to be a first duration.
In an embodiment of the present application, the predetermined function module includes a high-precision timer module, and the high-precision timer module is adapted to the time application program interface.
In an embodiment of the present application, the preset function module includes a function selection configuration module;
in an embodiment of the application, user mode configuration information is acquired through a Linux kernel; determining a module to be forbidden in the preset functional modules through the function selection configuration module according to the user mode configuration information, wherein the module to be forbidden comprises one or more of a real-time lock module, a module capable of preempting a critical area, a lower half-interruption threading module, a priority inheritance module and a high-precision timer module; and disabling the module to be disabled and processing the real-time task.
In a second aspect, an embodiment of the present application provides a Linux real-time processing apparatus, including:
the acquisition unit is used for acquiring a real-time task;
the processing unit is used for calling a preset function module, the preset function module is in a state of processing a first task, and the preset function module is obtained by modifying a target module of the Linux kernel;
the processing unit is also used for replacing the first task with a real-time task;
and the processing unit is also used for unloading the preset function module if the real-time task is processed.
In a third aspect, the present application provides an electronic device, comprising:
one or more processors;
a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the electronic device to implement the Linux real-time processing method described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to execute the Linux real-time processing method described in the first aspect.
The beneficial effect of this application: the real-time performance of the processing task of the Linux operating system can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic diagram of a Linux real-time modification system architecture shown in an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a Linux real-time processing method according to an exemplary embodiment of the present application;
FIG. 3 is a block diagram of a Linux real-time processing device shown in an exemplary embodiment of the present application;
FIG. 4 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the disclosure herein, wherein the embodiments of the present application will be described in detail with reference to the accompanying drawings and preferred embodiments. The present application is capable of other and different embodiments and its several details are capable of modifications and/or changes in various respects, all without departing from the spirit of the present application. It should be understood that the preferred embodiments are for purposes of illustration only and are not intended to limit the scope of the present disclosure.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present application, and the drawings only show the components related to the present application and are not drawn according to the number, shape and size of the components in actual implementation, and the type, number and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of the embodiments of the present application, however, it will be apparent to one skilled in the art that the embodiments of the present application may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form rather than in detail in order to avoid obscuring the embodiments of the present application.
Fig. 1 is a schematic diagram of a Linux real-time transformation system architecture according to an exemplary embodiment of the present application. As shown in fig. 1, the system includes application software, a Linux kernel and hardware, where the Linux kernel includes a level configuration management module, a real-time lock module, a preemptible critical section module, an interruption lower half threading module, a priority inheritance module, a high precision timer module and a function selection configuration module. The real-time lock module, the module capable of preempting the critical section, the threading module of the lower half part of the interrupt, the priority inheritance module, the high-precision timer module and the function selection configuration module may be included in the preset function module in the embodiment of the present application.
Referring to fig. 2, fig. 2 is a flowchart illustrating a Linux real-time processing method according to an exemplary embodiment of the present application. The method may be applied to the implementation environment shown in FIG. 1 and implemented by a processor in the implementation environment. It should be understood that the method may be applied to other exemplary implementation environments and is specifically executed by devices in other implementation environments, and the embodiment does not limit the implementation environment to which the method is applied.
For example, an SDK (Software Development Kit, a Software Development Kit that is a Development tool set used when establishing application Software for a specific Software package, a Software framework, an operating system, and the like) may be installed in an intelligent terminal to which the Linux real-time processing method disclosed in this embodiment is applied, and the method disclosed in this embodiment is specifically implemented to provide one or more external functions for the SDK.
As shown in fig. 2, in an exemplary embodiment, the Linux real-time processing method at least includes steps S210 to S240, which are described in detail as follows:
step S210, a real-time task is acquired.
The real-time task may be input by a technician and needs to be processed in real time through a Linux kernel.
Step S220, calling a preset function module, wherein the preset function module is in a state of processing the first task, and the preset function module is obtained by modifying the Linux kernel.
The first task is a task which is processed by the current preset processing module.
Step S230, the first task is replaced with a real-time task.
In an embodiment of the application, the preset function module includes a real-time lock module, the real-time lock module includes an rt-mutex lock, and the rt-mutex lock is configured to preempt a first task of the preset function module. The real-time lock module is contained in the Linux kernel, and before the Linux kernel is modified, the real-time lock comprises a mutex lock.
In an embodiment of the application, the preset function module includes a preemptible critical section module, and the preemptible critical section module is obtained by setting a critical section to be in a preemptible mode. Wherein the critical section may be a region protected by preempt _ disable () before being modified.
Optionally, the spin lock of the critical section may be reduced, and the kernel lock may be increased. Further, the protection area of the RCU lock may be replaced with a mutex lock as much as possible.
In an embodiment of the application, if the preset function module includes a real-time lock module and a preemptible critical section module, the interrupt processing may be performed on the first task, and the first task may be replaced with a real-time task.
In an embodiment of the present application, the preset function module includes a priority inheritance module, and the priority inheritance module includes a kernel priority inheritance lock, and the kernel priority inheritance lock is used for changing the priority of the current task. The first task is a low priority. At this time, the preset function module may adjust the priority of the first task to a high priority; and processing the real-time task after the first task is processed through the preset function module. The priority of the first task is adjusted to be the high priority, the preset function module can finish processing the first task as soon as possible so as to process the real-time task as soon as possible, and the problem of priority inversion can be prevented, namely, the low-priority task is arranged before the high-priority task.
In an embodiment of the application, the preset function module includes a lower half-interrupt threading module, the lower half-interrupt threading module is obtained by threading a lower half-interrupt in the Linux kernel, and an off-interrupt time of the preset function module for performing Interrupt Service Routine (ISR) processing is adjusted to be a first duration. The lower half of the interrupt can be implemented and managed in a normal thread manner.
In an embodiment of the present application, the default function module includes a high-precision timer module, and the high-precision timer module is adapted to a time Application Program Interface (API). The time length of the high-precision timer may be designed by those skilled in the art, and the time length is the time that the real-time task needs to be processed for the longest time, that is, the time length from the start of processing the real-time task to the completion of processing of the high-precision timer is the time length of the high-precision timer.
In an embodiment of the application, the preset function module includes a function selection configuration module. The processor may obtain the user-mode configuration information through a Linux kernel. The level configuration management module can determine a priority level according to the user mode configuration information, and forbid the corresponding module according to the priority level. Illustratively, when the priority level is 3, then 3 modules need to be disabled, and the 3 modules are also determined in the user-mode configuration information.
Optionally, the function selection configuration module may determine a module to be disabled in the preset function modules according to the user-mode configuration information, where the module to be disabled includes one or more of a real-time lock module, a module capable of preempting a critical area, a threading module of a lower half of interrupt, a priority inheritance module, and a high-precision timer module; and disabling the module to be disabled and processing the real-time task. That is to say, for different usage scenarios, part of modules may be disabled in an environment with low real-time requirement, for example, if the cabin environment has low real-time processing requirement, a low priority may be configured appropriately, that is: partial or full retrofitting is disabled.
Step S240, if the real-time task is processed, uninstalling the preset function module.
In one embodiment of the present application, an involuntary preemption (involuntary preemption) function may be turned on everywhere in the kernel except for the region protected with preempt _ disable (). This mode can significantly reduce jitter (variation in delay) and provide predictable lower delay for real-time applications where delay requirements are high.
According to the embodiment of the application, the processor acquires a real-time task; calling a preset function module, wherein the preset function module is in a state of processing a first task and is obtained by modifying a Linux kernel; replacing the first task with a real-time task; and if the real-time task is processed, unloading the preset function module. By the method, the real-time performance of the processing task of the Linux operating system can be improved.
Fig. 3 is a block diagram of a Linux real-time processing apparatus according to an exemplary embodiment of the present application. The apparatus may be applied to the implementation environment shown in fig. 1 and be embodied in a processor. The apparatus may also be applied to other exemplary implementation environments, and is specifically configured in other devices, and the embodiment does not limit the implementation environment to which the apparatus is applied.
As shown in fig. 3, the exemplary Linux real-time processing apparatus includes:
an obtaining unit 310, configured to obtain a real-time task;
the processing unit 320 is configured to call a preset function module, where the preset function module is in a state of processing a first task, and the preset function module is obtained by modifying a target module of a Linux kernel;
a processing unit 320, further configured to replace the first task with a real-time task;
the processing unit 320 is further configured to unload the preset function module if the real-time task is processed.
In an embodiment of the application, the preset function module includes a real-time lock module, the real-time lock module includes an rt-mutex lock, and the rt-mutex lock is used for preempting a first task of the preset function module;
in an embodiment of the application, the preset function module includes a preemptible critical section module, and the preemptible critical section module is obtained by setting a preemptible mode for a critical section.
In an embodiment of the application, the processing unit 320 is further configured to perform an interrupt process on the first task and replace the first task with a real-time task.
In an embodiment of the present application, the preset function module includes a priority inheritance module, the priority inheritance module includes a kernel priority inheritance lock, and the kernel priority inheritance lock is used for changing the priority of the current task; the first task is a low priority;
in an embodiment of the present application, the processing unit 320 is further configured to adjust the priority of the first task to be a high priority; and processing the real-time task after the first task is processed through the preset function module.
In an embodiment of the application, the preset function module includes a lower-half-interrupt threading module, the lower-half-interrupt threading module is obtained by threading a lower half-interrupt in the Linux kernel, and the off-off interrupt time of the preset function module for processing the interrupt service program is adjusted to be a first duration.
In an embodiment of the present application, the predetermined function module includes a high-precision timer module, and the high-precision timer module is adapted to the time application program interface.
In an embodiment of the present application, the preset function module includes a function selection configuration module;
in an embodiment of the present application, the processing unit 320 is further configured to obtain user-mode configuration information through a Linux kernel; determining a module to be forbidden in the preset function modules through the function selection configuration module according to the user mode configuration information, wherein the module to be forbidden comprises one or more of a real-time lock module, a module capable of preempting a critical zone, an interruption lower half-part threading module, a priority inheritance module and a high-precision timer module; and disabling the module to be disabled and processing the real-time task.
It should be noted that the Linux real-time processing apparatus provided in the foregoing embodiment and the Linux real-time processing method provided in the foregoing embodiment belong to the same concept, and specific ways for the modules and units to execute operations have been described in detail in the method embodiments, and are not described herein again. In practical applications, the Linux real-time processing apparatus provided in the above embodiment may distribute the above functions through different functional modules according to needs, that is, an internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions, which is not limited herein.
An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, enable the electronic device to implement the Linux real-time processing method provided in the above-described embodiments.
FIG. 4 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. It should be noted that the computer system 400 of the electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for system operation are also stored. The CPU401, ROM 402, and RAM 403 are connected to each other via a bus 404. An Input/Output (I/O) interface 405 is also connected to the bus 404.
The following components are connected to the I/O interface 405: an input portion 406 including a keyboard, a mouse, and the like; an output section 407 including a Display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 401.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a propagated data signal with a computer-readable computer program embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Another aspect of the present application also provides a computer readable storage medium, on which a computer program is stored, which, when executed by a processor of a computer, causes the computer to execute the Linux real-time processing method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the Linux real-time processing method provided in the various embodiments described above.
The above-described embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.
Claims (11)
1. A Linux real-time processing method is characterized by comprising the following steps:
acquiring a real-time task;
calling a preset function module, wherein the preset function module is in a state of processing a first task, and the preset function module is obtained by modifying the Linux kernel;
replacing the first task with the real-time task;
and if the real-time task is processed, unloading the preset function module.
2. The method of claim 1, wherein the preset function module comprises a real-time lock module, and wherein the real-time lock module comprises an rt-mutex lock configured to preempt the first task of the preset function module.
3. The method according to claim 2, wherein the preset function modules include a preemptible critical section module, and the preemptible critical section module is obtained by setting a critical section to be in a preemptible mode.
4. The method of claim 2 or 3, wherein replacing the first task with a real-time task comprises:
interrupt processing is performed on the first task and the first task is replaced with the real-time task.
5. The method according to claim 1, wherein the preset function module comprises a priority inheritance module, wherein the priority inheritance module comprises a kernel priority inheritance lock, and the kernel priority inheritance lock is used for changing the priority of the current task; the first task is of low priority;
the replacing the first task with a real-time task includes:
adjusting the priority of the first task to a high priority;
and processing the real-time task after the first task is processed through the preset function module.
6. The method according to claim 1, wherein said predetermined functional modules comprise a lower-half-interrupt threaded module, said lower-half-interrupt threaded module is obtained by threading a lower half-interrupt in said Linux kernel, and an off-interrupt time for said predetermined functional modules to perform interrupt service routine processing is adjusted to a first duration.
7. The method of claim 1, wherein the pre-defined function modules comprise a high-precision timer module, the high-precision timer module adapted to a time application program interface.
8. The method according to any one of claims 1 to 7, wherein the preset function module comprises a function selection configuration module;
the method further comprises the following steps:
acquiring user mode configuration information through the Linux kernel;
determining, by the function selection configuration module according to the user-state configuration information, a to-be-disabled module in the preset function modules, where the to-be-disabled module includes one or more of the real-time lock module, the preemptible critical section module, the lower half-interrupt threading module, the priority inheritance module, and the high-precision timer module;
and disabling the module to be disabled and processing the real-time task.
9. A Linux real-time processing apparatus, comprising:
the acquisition unit is used for acquiring a real-time task;
the processing unit is used for calling a preset function module, the preset function module is in a state of processing a first task, and the preset function module is obtained by modifying a target module of the Linux kernel;
the processing unit is further used for replacing the first task with a real-time task;
and the processing unit is also used for unloading the preset functional module if the real-time task is processed.
10. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the Linux real-time processing method of any of claims 1-8.
11. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to execute the Linux real-time processing method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210933117.XA CN115391005A (en) | 2022-08-04 | 2022-08-04 | Linux real-time processing method and device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210933117.XA CN115391005A (en) | 2022-08-04 | 2022-08-04 | Linux real-time processing method and device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115391005A true CN115391005A (en) | 2022-11-25 |
Family
ID=84119656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210933117.XA Pending CN115391005A (en) | 2022-08-04 | 2022-08-04 | Linux real-time processing method and device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115391005A (en) |
-
2022
- 2022-08-04 CN CN202210933117.XA patent/CN115391005A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10133598B2 (en) | Systems and methods of using a hypervisor to assign virtual processor priority based on task priority and to schedule virtual processors for guest operating systems | |
US10552210B2 (en) | Method and apparatus for migrating virtual machine | |
CN105074666B (en) | Operating system executing on processors with different instruction set architectures | |
US9582320B2 (en) | Computer systems and methods with resource transfer hint instruction | |
US8966490B2 (en) | System, method and computer program product for scheduling a processing entity task by a scheduler in response to a peripheral task completion indicator | |
US20040117793A1 (en) | Operating system architecture employing synchronous tasks | |
US8458707B2 (en) | Task switching based on a shared memory condition associated with a data request and detecting lock line reservation lost events | |
US9164799B2 (en) | Multiprocessor system | |
CN113835895A (en) | Thread and/or virtual machine scheduling for cores with different capabilities | |
US9817696B2 (en) | Low latency scheduling on simultaneous multi-threading cores | |
US20140129811A1 (en) | Multi-core processor system and control method | |
US20120079487A1 (en) | Subscriber-Based Ticking Model for Platforms | |
US20120151145A1 (en) | Data Driven Micro-Scheduling of the Individual Processing Elements of a Wide Vector SIMD Processing Unit | |
CN110955503A (en) | Task scheduling method and device | |
CN115391005A (en) | Linux real-time processing method and device, equipment and medium | |
CN115454592A (en) | Task scheduling method and device | |
CN115033459A (en) | CPU utilization monitoring method and device and storage medium | |
US10360652B2 (en) | Wavefront resource virtualization | |
GB2550904A (en) | Methods for reconciling interrupt conflicts | |
US12039363B2 (en) | Synchronizing concurrent tasks using interrupt deferral instructions | |
US10073723B2 (en) | Dynamic range-based messaging | |
CN114327828B (en) | Lock-free concurrent access method, device, equipment and medium for shared data | |
US20230305872A1 (en) | Efficient central processing unit overcommit for virtual machines with symmetric multi-processing | |
CN116028167A (en) | Task processing method and device, electronic equipment and storage medium | |
US10158580B2 (en) | Utilizing access control data structures for sharing computing resources |
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 |