KR101341414B1 - Interrupt handling mode decision method of embedded operating system kernel - Google Patents

Interrupt handling mode decision method of embedded operating system kernel Download PDF

Info

Publication number
KR101341414B1
KR101341414B1 KR1020100052477A KR20100052477A KR101341414B1 KR 101341414 B1 KR101341414 B1 KR 101341414B1 KR 1020100052477 A KR1020100052477 A KR 1020100052477A KR 20100052477 A KR20100052477 A KR 20100052477A KR 101341414 B1 KR101341414 B1 KR 101341414B1
Authority
KR
South Korea
Prior art keywords
processing mode
interrupt
interrupt processing
mode
operating system
Prior art date
Application number
KR1020100052477A
Other languages
Korean (ko)
Other versions
KR20110070737A (en
Inventor
임동혁
정영준
구용본
임채덕
임동선
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US12/962,263 priority Critical patent/US8473662B2/en
Publication of KR20110070737A publication Critical patent/KR20110070737A/en
Application granted granted Critical
Publication of KR101341414B1 publication Critical patent/KR101341414B1/en

Links

Images

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Stored Programmes (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Abstract

The method that can automatically select the interrupt processing mode to be used for each device can provide improved response according to the characteristics of the system. The proposed method is a method in which the embedded operating system kernel determines the processing mode of all interrupts, by separating the interrupt processing mode into a first interrupt processing mode and a second interrupt processing mode which differ from each other in processing speed, and at boot time. And variably determining a distribution ratio for allocating all interrupts to a first interrupt processing mode or a second interrupt processing mode according to a predetermined processing condition. Interrupt handling mode of ARM-based embedded Linux kernel can be used simultaneously as FIQ and IRQ processing mode. Peripheral devices using the FIQ processing mode have priority for interrupt processing, and thus, responsiveness is improved. By adopting a method of dynamically disposing the interrupt processing mode setting, there is an advantage of improving performance at runtime without user intervention.

Description

Interrupt handling mode decision method of embedded operating system kernel}

The present invention relates to a method for determining an interrupt handling mode of an embedded operating system kernel, and more particularly, to a method for providing better responsiveness by improving an interrupt handling process of a Linux kernel in an embedded operating system.

The present invention is derived from the research conducted as part of the technology development project of the Ministry of Knowledge Economy and the Korea Institute of Information and Telecommunications Promotion. .

Embedded system refers to a system that allows effective control by designing a microprocessor that acts as a brain in a machine or electronic device. In other words, it refers to a device in which the software that operates the device is embedded in the device rather than being read from a disk like a computer. Currently, mobile phones, portable personal digital assistants (PDAs), digital TVs, and game consoles are representative embedded systems.

Such systems have traditionally operated using dedicated programs without an operating system (OS) or through simple operating systems and applications.

The embedded systems listed above are increasingly demanding operating systems that can provide the latest technologies, rather than simply existing ones. In particular, these latest technologies are required for TCP / IP communication protocols over the Internet, support for 32-bit high-speed central processing units, and the like.

This requirement has enabled embedded system developers to adopt the Linux operating system as an economical, easy-to-use embedded operating system. This is because the Linux operating system can be freely changed and distributed under the GNU Public License (GPL) and includes all the features that modern operating systems must have.

On the other hand, the conventional embedded Linux kernel selects the method of increasing the responsiveness by minimizing the overhead during interrupt processing and increasing the preemptive area by using the interrupt threading method to improve the interrupt processing method regardless of the characteristics of the ARM architecture. Doing.

In other words, in the conventional embedded Linux kernel, kernel threads corresponding to respective interrupt requests (IRQs) are executed when the kernel is booted. When an interrupt occurs, the kernel's interrupt service routine (ISR) is implemented in such a way that it performs the least amount of processing and handles most of the work in the kernel thread corresponding to each interrupt.

As such, the conventional embedded Linux kernel handles an interrupt using only an interrupt request (IRQ) mode.

The present invention has been proposed to solve the above problems, and an object thereof is to provide a method for determining an interrupt processing mode of an embedded operating system kernel capable of performing an interrupt service using a plurality of interrupt processing modes.

In addition, an object of the present invention is to be able to automatically select the interrupt processing mode to be used for each device to provide improved response to the characteristics of the system.

In order to achieve the above object, the method for determining the interrupt processing mode of the embedded operating system kernel according to the preferred embodiment of the present invention is a method for determining the processing mode of all interrupts by the embedded operating system kernel.

Separating the interrupt processing mode into a first interrupt processing mode and a second interrupt processing mode which differ from each other in the processing speed; And variably determining a distribution ratio for allocating all interrupts to a first interrupt processing mode or a second interrupt processing mode according to a predetermined processing condition at boot time.

Preferably, the first interrupt processing mode is a fast interrupt request (FIQ) processing mode, and the second interrupt processing mode is an interrupt request (IRQ) processing mode.

Of all the interrupts, the timer interrupt unconditionally determines the interrupt processing mode with the faster processing speed among the first interrupt processing mode and the second interrupt processing mode.

The processing condition is the ratio of idle time of the CPU of the embedded system employing the embedded operating system kernel.

Based on the CPU idle time ratio, if the CPU bound job prevails, adjust the distribution ratio of the faster interrupt processing mode to be smaller than that of the slower interrupt processing mode.

If the I / O bound job is dominant based on the CPU idle time ratio, adjust the distribution ratio of the faster interrupt processing mode to be larger than that of the slower interrupt processing mode. .

The distribution ratios of the first interrupt processing mode and the second interrupt processing mode are adjusted at the job scheduling time.

All interrupts are divided into interactive profiles, input / output (I / O) oriented profiles, and throughput oriented profiles. In this case, in the interactive profile, the processing mode for interrupts from the human interface equipment is determined as an interrupt processing mode having a faster processing speed among the first interrupt processing mode and the second interrupt processing mode. In the I / O-oriented profile, the processing mode for interrupts from the disk and network equipment is determined as the interrupt processing mode having the faster processing speed among the first interrupt processing mode and the second interrupt processing mode. In the throughput-oriented profile, the processing mode for the corresponding interrupt is determined as the interrupt processing mode having the slower processing speed among the first interrupt processing mode and the second interrupt processing mode.

Each of all interrupts is first assigned to an interrupt processing mode having a faster processing speed among the first interrupt processing mode and the second interrupt processing mode based on the number of times the interrupt processing mode is performed.

According to the present invention having such a configuration, the interrupt processing mode of the ARM-based embedded Linux kernel can be used simultaneously as the FIQ and IRQ processing modes.

Peripheral devices using the FIQ processing mode have priority for interrupt processing, and thus, responsiveness is improved.

By adopting a method of dynamically disposing the interrupt processing mode setting, there is an advantage of improving performance at runtime without user intervention.

1 is a diagram illustrating an example of a configuration of an embedded system using a method for determining an interrupt processing mode of an embedded operating system kernel according to an exemplary embodiment of the present invention.
2 is a flowchart schematically illustrating an operation until an embedded system employing an interrupt processing mode determination method of an embedded operating system kernel is booted according to an embodiment of the present invention.
3 is a flowchart illustrating a method for determining an interrupt processing mode of an embedded operating system kernel according to an exemplary embodiment of the present invention.

Hereinafter, an interrupt processing mode determination method of an embedded operating system kernel according to an embodiment of the present invention will be described with reference to the accompanying drawings. Prior to the detailed description of the present invention, terms and words used in the present specification and claims should not be construed as limited to ordinary or dictionary terms. Therefore, the embodiments described in this specification and the configurations shown in the drawings are merely the most preferred embodiments of the present invention and do not represent all the technical ideas of the present invention. Therefore, It is to be understood that equivalents and modifications are possible.

1 is a diagram illustrating an example of a configuration of an embedded system using a method for determining an interrupt processing mode of an embedded operating system kernel according to an exemplary embodiment of the present invention.

Embedded system 10 includes a CPU 12 and a modular kernel 14.

When the CPU 12 receives an interrupt from the interrupt resources 20, 30, etc. through the interrupt controller 16 in the kernel 14, the CPU 12 performs a corresponding process. The CPU 12 is preferably composed of, for example, an ARM processor.

The kernel 14 is at the heart of the operating system of the embedded system 10. The kernel 14 is an interrupt controller 16 (also known as an interrupt handler) that handles all of the competitively demanding services of the kernel, such as terminated I / O operations. A scheduler (not shown) for determining the number of times, and a supervisor (not shown) for actually granting a license to the computer to each process after the schedule is finished.

The interrupt controller 16 divides the interrupt processing mode into a first interrupt processing mode and a second interrupt processing mode which differ from each other in the processing speed. For example, the interrupt controller 16 is divided into a first interrupt processing mode or a second interrupt processing mode by setting a value of an interrupt mode register (not shown) to a predetermined value which is distinguished from each other. Here, the first interrupt processing mode is, for example, a fast interrupt reQuest (FIQ) processing mode, and the second interrupt processing mode is, for example, an IRQ (Interrupt ReQuest) processing mode. The FIQ processing mode and the IRQ processing mode may be considered conceptually the same except that the FIQ processing mode is higher in processing speed.

When the interrupt controller 16 receives an interrupt request from interrupt resources (20, 30, etc.), whether the interrupt controller 16 is in the fast interrupt request (FIQ) processing mode or the interrupt request processing mode (IRQ) mode according to the interrupt type. Set. For example, the interrupt controller 16 sets the FIQ processing mode unconditionally if the type of interrupt is a timer interrupt. This is because the timer interrupt has the most processing times that occur every hour.

On the other hand, the interrupt controller 16 selects a method in which the distribution ratio of the interrupt processing modes varies depending on the processing situation of the CPU 12. That is, when the CPU bound job (mainly the process using the CPU 12) prevails according to the ratio of the idle time of the CPU 12, the allocation of the FIR processing mode to the IRQ processing mode. Change the ratio to 20:80, for example. If the I / O bound job (I / O-only process) prevails, the allocation ratio of the FIR processing mode to the IRQ processing mode is changed to 80:20, for example. In other words, the kernel 14 can monitor the ratio of the current I / O bound job and the CPI bound job by monitoring itself. By using this, the interrupt controller 16 can variably adjust the distribution ratio of the FIR processing mode to the IRQ processing mode.

The interrupt controller 16 adjusts such a distribution ratio of the FIR processing mode to the IRQ processing mode at the job scheduling time. When the current process runs out of its allotted time, it returns to the CPU and is replaced by the next process. This time is called job scheduling time. At this job scheduling time, a context switch occurs. In this case, the allocation of the interrupt processing mode may be adjusted.

The interrupt controller 16 grasps and creates a list of resources (20, 30, etc.) using interrupts at boot time.

In some situations, the embedded system 10 may need to operate interactively, in some situations, I / O-based, and in some situations, throughput-based. In the embodiment of the present invention, the interrupt profile is roughly divided into an interactive profile, an input / output (I / O) oriented profile, and a throughput oriented profile. Accordingly, the interrupt controller 16 has an interrupt response such as a human interface device 20 such as the mouse 22, the keyboard 24, the touch screen 26, because the responsiveness to the user's input is important in the case of the interactive profile. Interrupts from 20) are primarily intended to be handled in FIQ processing mode. Interrupt controller 16 allows interrupts from interrupt resource 30, such as disk 32 or network equipment 30, in the case of an input / output oriented profile to be processed in FIQ processing mode. The interrupt controller 16 allows all of the throughput-oriented profiles to be processed in IRQ processing mode without using the FIQ processing mode. Of course, the priority for these interrupts may be variably adjusted by the user. Meanwhile, in the above-described embodiment of the present invention, the interrupt profile is largely divided into an interactive profile, an input / output (I / O) oriented profile, and a throughput oriented profile. However, the user may set or add a new one for his / her situation. Do.

In addition, the interrupt controller 16 may be assigned to the FIQ processing mode first based on the number of times the interrupt processing mode is performed for each of all interrupts.

2 is a flowchart schematically illustrating an operation until an embedded system employing an interrupt processing mode determination method of an embedded operating system kernel is booted according to an embodiment of the present invention.

When the embedded system 10 boots (S10), the interrupt controller 16 in the kernel 14 loads interactive profiles, input / output oriented profiles, and throughput oriented profiles for all interrupt resources (20, 30, etc.) (S12). .

Subsequently, the interrupt controller 16 determines whether a FIQ is assigned to the loaded interrupt profile (S14).

If the FIQ is allocated ("Yes" in S14), the interrupt controller 16 registers to process the interrupt in the FIQ processing mode (S16). On the other hand, if the FIQ is not assigned (“No” in S14), the interrupt controller 16 registers to process the interrupt in the IRQ processing mode (S18).

The registered contents are delivered to the CPU 12. When the CPU 12 performs the corresponding interrupt in the registered interrupt processing mode, the booting is completed (S20).

3 is a flowchart illustrating a method of determining an interrupt processing mode of an embedded operating system kernel according to an exemplary embodiment of the present invention. The present invention is characterized by determining which interrupt to process in the FIR processing mode or the IRQ processing mode. Accordingly, the following description will focus on how the FIR processing mode and the IRQ processing mode are allocated during the process of the embedded system 10 described with reference to FIG.

First, the interrupt controller 16 determines whether the type of interrupt is a timer interrupt (S30).

As a result, if it is a timer interrupt ("Yes" in S30), the interrupt controller 16 unconditionally sets the interrupt to the FIQ processing mode (S32). This is because the timer interrupt has the most processing times that occur every hour.

On the other hand, when it is not a timer interrupt (“No” in S30), the interrupt controller 16 uses a method in which the distribution ratio of the interrupt processing modes varies depending on the processing situation of the CPU 12.

For example, the interrupt controller 16 may prevail if the CPU bound job (mainly the process using the CPU 12) is dominant according to the ratio of the idle time of the CPU 12 (S34). "Yes") change the distribution ratio of FIR processing mode to IRQ processing mode, for example, 20:80. As described above, if the CPI bound job prevails when the type of interrupt is not a timer interrupt, the distribution ratio of the IRQ processing mode is made higher than the distribution ratio of the FIR processing mode (S36).

Conversely, if an I / O bound job (a process that only does a lot of I / O) prevails instead of a CPI bound job ("No" in S34), the interrupt controller 16 will allocate a ratio of the FIR processing mode to the IRQ processing mode. For example, 80: 20. In this manner, when the type of interrupt is not a timer interrupt, if the I / O bound job predominates, the distribution ratio of the FIR processing mode is made higher than the distribution ratio of the IRQ processing mode (S38).

While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. You must see.

10: embedded system 12: CPU
14 Kernel 16: Interrupt Controller
20, 30: interrupt resource 22: mouse
24: keyboard 26: touch screen
32: disk 34: network equipment

Claims (13)

The way the embedded operating system kernel determines the mode of processing all interrupts.
Dividing the types of interrupt processing modes into a first interrupt processing mode and a second interrupt processing mode which differ from each other in processing speed; And
And determining a processing mode of all interrupts by adjusting a distribution ratio of the first interrupt processing mode to the second interrupt processing mode according to a predetermined processing condition at boot time. How to determine the interrupt processing mode
The method according to claim 1,
And the first interrupt processing mode is a fast interrupt request (FIQ) processing mode.
The method according to claim 1,
The second interrupt processing mode is an interrupt request (IRQ) processing mode, characterized in that the interrupt processing mode of the embedded operating system kernel.
The method according to claim 1,
Among all the interrupts, a timer interrupt is unconditionally determined as an interrupt processing mode having a faster processing speed among the first interrupt processing mode and the second interrupt processing mode.
The method according to claim 1,
And said processing condition is a ratio of idle time of a CPU of an embedded system to which said embedded operating system kernel is employed.
The method according to claim 5,
When the CPU bound job is larger than the I / O bound job based on the ratio of the idle time of the CPU, the processing speed is increased in the first interrupt processing mode and the second interrupt processing mode. A method of determining an interrupt processing mode of an embedded operating system kernel, wherein the distribution ratio of the faster interrupt processing mode is adjusted to be smaller than that of the slower interrupt processing mode.
The method according to claim 5,
When the I / O bound job is larger than the CPU bound job based on the ratio of the idle time of the CPU, the processing speed is increased in the first interrupt processing mode and the second interrupt processing mode. A method of determining an interrupt processing mode of an embedded operating system kernel, wherein the distribution ratio of the faster interrupt processing mode is adjusted to be larger than that of the slower interrupt processing mode.
The method according to claim 1,
And a distribution ratio of the first interrupt processing mode and the second interrupt processing mode is adjusted at a job scheduling time.
The method according to claim 1,
And all the interrupts are classified into an interactive profile, an input / output (I / O) oriented profile, and a throughput oriented profile.
The method of claim 9,
If the interrupt profile is the interactive profile, the processing mode for interrupts from the human interface equipment is set to an interrupt processing mode having a faster processing speed among the first interrupt processing mode and the second interrupt processing mode. How to determine the interrupt handling mode of the operating system kernel.
The method of claim 9,
When the interrupt profile is the input / output oriented profile, a processing mode for interrupts from disk and network equipment is determined as an interrupt processing mode having a faster processing speed among the first and second interrupt processing modes. How to determine the interrupt processing mode of the embedded operating system kernel.
The method of claim 9,
If the interrupt profile is the throughput-oriented profile, the processing mode for the interrupt is determined as an interrupt processing mode having a lower processing speed among the first interrupt processing mode and the second interrupt processing mode. How to determine the interrupt handling mode.
The method according to claim 1,
Each of the interrupts may be assigned to an interrupt processing mode having a higher processing speed among the first interrupt processing mode and the second interrupt processing mode based on the number of times the interrupt processing mode is executed. How to determine the mode.
KR1020100052477A 2009-12-18 2010-06-03 Interrupt handling mode decision method of embedded operating system kernel KR101341414B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/962,263 US8473662B2 (en) 2009-12-18 2010-12-07 Interrupt-handling-mode determining method of embedded operating system kernel

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20090126729 2009-12-18
KR1020090126729 2009-12-18

Publications (2)

Publication Number Publication Date
KR20110070737A KR20110070737A (en) 2011-06-24
KR101341414B1 true KR101341414B1 (en) 2013-12-13

Family

ID=44402207

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100052477A KR101341414B1 (en) 2009-12-18 2010-06-03 Interrupt handling mode decision method of embedded operating system kernel

Country Status (1)

Country Link
KR (1) KR101341414B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050043299A (en) * 2003-11-05 2005-05-11 삼성전자주식회사 Apparatus and method for handling interrupt using dynamic allocation memory in embedded system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050043299A (en) * 2003-11-05 2005-05-11 삼성전자주식회사 Apparatus and method for handling interrupt using dynamic allocation memory in embedded system

Also Published As

Publication number Publication date
KR20110070737A (en) 2011-06-24

Similar Documents

Publication Publication Date Title
US11010199B2 (en) Efficient critical thread scheduling for non-privileged thread requests
Sridharan et al. Adaptive, efficient, parallel execution of parallel programs
EP2885707B1 (en) Latency sensitive software interrupt and thread scheduling
US8161491B2 (en) Soft real-time load balancer
CN106030538B (en) System and method for split I/O execution support through compiler and OS
US8635615B2 (en) Apparatus and method for managing hypercalls in a hypervisor and the hypervisor thereof
US9274832B2 (en) Method and electronic device for thread scheduling
EP2799990A2 (en) Dynamic virtual machine sizing
US20070169126A1 (en) Multi-processor system and program for causing computer to execute controlling method of multi-processor system
JP5345990B2 (en) Method and computer for processing a specific process in a short time
US8135894B1 (en) Methods and systems for reducing interrupt latency by using a dedicated bit
Huh et al. Improving interactivity via vt-cfs and framework-assisted task characterization for linux/android smartphones
JP2009223842A (en) Virtual machine control program and virtual machine system
Huh et al. Cross‐layer resource control and scheduling for improving interactivity in Android
KR20120019330A (en) Scheduling apparatus and method for a multicore system
Chiang et al. Kernel mechanisms with dynamic task-aware scheduling to reduce resource contention in NUMA multi-core systems
US8473662B2 (en) Interrupt-handling-mode determining method of embedded operating system kernel
KR101330609B1 (en) Method For Scheduling of Mobile Multi-Core Virtualization System To Guarantee Real Time Process
Gottschlag et al. Mechanism to mitigate avx-induced frequency reduction
KR20130051076A (en) Method and apparatus for scheduling application program
KR101341414B1 (en) Interrupt handling mode decision method of embedded operating system kernel
US11934890B2 (en) Opportunistic exclusive affinity for threads in a virtualized computing system
KR20150089665A (en) Appratus for workflow job scheduling
US11966787B2 (en) Dynamic process criticality scoring
Choffnes et al. Migration policies for multi-core fair-share scheduling

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20161104

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20171122

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20181101

Year of fee payment: 6