Real-time interrupt processing method for Linux system

A processing method and soft interrupt technology, applied in the direction of program startup/switching, multi-programming devices, etc., can solve the problems of interrupt response delay, inability to guarantee, and inability to run the scheduler

Active Publication Date: 2013-11-13
WUHAN POST & TELECOMM RES INST CO LTD
View PDF2 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If when the FPGA (Field Programmable Gate Array) interrupt arrives, the CPU is processing other interrupts, such as network, keyboard, USB, disk and other interrupts, resulting in delayed or even lost interrupt response, this problem is "interrupt delay"
[0007]2. In Linux, the priority of the interrupt is higher than that of any program. When the interrupt is completed, the CPU control will return to the previously interrupted program. Continue to execute the previously interrupted program, unable to run the scheduler, and thus unable to run the required real-time program, this problem is "scheduling delay"
[0008]3. When the Linux scheduler schedules tasks, it treats all tasks equally, so even after 1 and 2 are resolved, there is still no guarantee that the scheduler will choose The program is the required real-time task handler, this problem is "task delay"

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] The technical solutions of the present invention will be described in detail below in conjunction with the examples.

[0018] The Linux operating system is divided into user space and kernel space. The real-time program runs in the user space, and the interrupt response program runs in the kernel space. The kernel space and the user space use a certain communication method to communicate to achieve the purpose of cooperation. In addition, the Linux system is a multi-user time-sharing system. Different users and different tasks share CPU resources, and the use of resources is realized through the scheduler.

[0019] Linux real-time usage scenarios are generally as follows:

[0020] 1. The external FPGA generates an interrupt;

[0021] 2. The Linux kernel interrupt handler runs;

[0022] 3. The CPU scheduler runs and selects the appropriate user program;

[0023] 4. The user program runs.

[0024] The embodiment of the present invention proposes technical scheme as fo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a real-time interrupt processing method for a Linux system. The method comprises the following steps of assigning FPGA (field programmable gate array) external interruption related to business as hardware interruption, and adopting other interruption of the Linux system as software interruption; changing an actuation environment of a software interruption processing program from an interruption context to a progress context, and defining the actuation environment of a hardware interruption processing program as the interruption context; changing other user space process except the user space business program in the Linux system to a non-real-time process, changing the corresponding process of the user space business program and the corresponding process of the software interruption processing program to real-time processes, wherein the real-time process is prior to the non-real-time process; in the real-time process, the corresponding process of the user space business program is prior to the corresponding process of the software interruption processing program. Due to the adoption of the method, the interrupt delay and business delay problems can be solved, the scheduling delay problem is solved through an infinite loop method and a space scheduling method, and the real-time property of the Linux system which is used as an embedded operating system can be improved.

Description

technical field [0001] The invention relates to the technical field of embedded operating systems, in particular to a real-time method for embedded operating systems. Background technique [0002] In the field of embedded real-time operating systems, Wind River's vxworks system has always occupied a leading position and occupied most of the market share. Although the Vxworks system has good real-time performance, because it is a commercial operating system, the authorization fee is high. [0003] The Linux operating system is free and open source, and has gained a lot of applications, especially in the server, computer network, data communication, cloud computing and other non-real-time fields. There are countless examples of successful applications. [0004] Real-time technology is divided into two fields: hard real-time and soft real-time. For example, wireless communication and data machine tool industry do not require very high real-time performance, and the accuracy of...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48
Inventor 肖海涛管鲍
Owner WUHAN POST & TELECOMM RES INST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products