KR20030077696A - Method for task level interrupt handling in realtime operating system - Google Patents

Method for task level interrupt handling in realtime operating system Download PDF

Info

Publication number
KR20030077696A
KR20030077696A KR1020020016524A KR20020016524A KR20030077696A KR 20030077696 A KR20030077696 A KR 20030077696A KR 1020020016524 A KR1020020016524 A KR 1020020016524A KR 20020016524 A KR20020016524 A KR 20020016524A KR 20030077696 A KR20030077696 A KR 20030077696A
Authority
KR
South Korea
Prior art keywords
interrupt
level
isr
task
operating system
Prior art date
Application number
KR1020020016524A
Other languages
Korean (ko)
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 KR1020020016524A priority Critical patent/KR20030077696A/en
Publication of KR20030077696A publication Critical patent/KR20030077696A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Abstract

PURPOSE: A method for processing a task level interrupt on an RTOS(Real-Time OS(Operating System)) is provided to minimize an interrupt processing time, to reduce interrupt loss, and to enhance system performance by executing an ISR(Interrupt Service Routine) on a task level and managing a delay of the interrupt executing time on an ISR task level. CONSTITUTION: The interrupt process is started if an interrupt is generated(ST12). An interrupt level is calculated after disabling the interrupt(ST14). In case of the calculated interrupt under a preset level, the calculated interrupt is masked(ST15), and a table value of an exception handler registered to a matched level is calculated(ST16). The interrupt is enabled(ST17) and the registered exception handler is executed(ST18). After executing the routine registered to an interrupt vector table, the interrupt is disabled(ST20). The interrupt under the corresponding level is unmasked(ST21). If the interrupt process is completed, the ISR is executed on the ISR task(ST23).

Description

실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법{Method for task level interrupt handling in realtime operating system}Method for task level interrupt handling in realtime operating system}

본 발명은 실시간 운영체제(RTOS, RealTime Operating System)에서 인터럽트 처리 루틴을 타스크 레벨(Task Level)에서 구현한 타스크 레벨 인터럽트 처리 방법에 관한 것으로, 특히 인터럽트 처리 루틴을 인터럽트 타스크에 등록하여 타스크 레벨에서의 ISR(Interrupt Service Routine)을 수행할 수 있도록 하여 인터럽트 처리시간을 최소화하고, 인터럽트 유실 등의 발생을 줄일 수 있으며, ISR의 구현에도 유연성을 부여함으로서 시스템의 성능을 향상시킬 수 있도록 한 실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법에 관한 것이다.The present invention relates to a task level interrupt processing method in which an interrupt handling routine is implemented at a task level in a real time operating system (RTOS). In particular, the interrupt handling routine is registered in an interrupt task to register an ISR at the task level. (Interrupt Service Routine) to minimize the interrupt processing time, reduce the occurrence of interrupt loss, etc., and to give flexibility to the implementation of the ISR task level in the real-time operating system to improve the performance of the system An interrupt processing method.

일반적으로, 실시간 운영체제라 함은, 통상적으로 디스크를 이용한 다중 프로그래밍 운영 체계를 말하며, 우선 순위가 높은 전위에서는 실시간 다중 프로그래밍을 하며, 우선 순위가 낮은 후위(background)에서는 일괄 처리를 한다. 디스크로부터의 프로그램 입력과 디스크로의 프로그램 출력은 자동적으로 수행되며 동적인 주기억장치 할당 방식을 사용한다.In general, a real-time operating system generally refers to a multiple programming operating system using a disk, real-time multiple programming at a high priority, and batch processing at a low priority background. Program input from and output to the disk is performed automatically and uses dynamic main memory allocation.

여기서, 상기 실시간 운영체제(RTOS, Real Time Operating System)는 구조적인 측면에서 두 가지로 분류할 수 있다. 하나는 멀티 쓰레드(Multi Thread) 모델이며, 다른 하나는 멀티 프로세스(Multi Process) 모델이다.Here, the real time operating system (RTOS) can be classified into two types in terms of structure. One is the Multi Thread model, and the other is the Multi Process model.

상기 멀티 쓰레드 모델은 운영체제(OS) 커널과 어플리케이션(Application)이 합쳐져서 서로의 구분이 없는 하나의 큰 프로그램이 되어 작동하는 구조로서, 공통의 작업 영역(Memory)을 자유롭게 액세스 할 수 있다. 운영체제의 크기가 작고, 비교적 작은 크기의 시스템에서 구현이 쉽고 빠르다는 장점이 있지만, 커널과 어플리케이션이 하나의 프로그램으로 동작하기 때문에 사소한 버그(Bug)가 시스템 전체를 파괴하는 단점이 있다.The multi-threaded model is a structure in which an operating system (OS) kernel and an application are combined to operate as one large program without being distinguished from each other, and can freely access a common work area (Memory). Although the operating system is small in size and relatively small in size, it is easy and quick to implement. However, since a kernel and an application operate as one program, a minor bug destroys the entire system.

한편, 상기 멀티 프로세스 모델은 운영체제 커널이나 각 어플리케이션들이 모두 독립적인 프로그램으로 동작하도록 설계되어 있다. 각 어플리케이션은 서로의 메모리가 보호되어 있기 때문에 모듈 단위의 어플리케이션 개발이나 모듈(기능)의 추가, 변경이 쉽고 안정된 시스템의 개발이 가능하기 때문에 대규모의 시스템 개발에 용이하다. 그러나 실시간 운영체제(RTOS)의 크기가 멀티 쓰레드 모델에 비해 크기 때문에 작은 시스템의 개발에는 오히려 부담이 되는 단점이 있다.On the other hand, the multi-process model is designed such that the operating system kernel or each application operates as an independent program. Since each application is protected with each other's memory, it is easy to develop a large-scale system because it is easy to develop a module-level application, add or change a module (function), and develop a stable system. However, since the size of the real-time operating system (RTOS) is larger than the multi-threaded model, there is a disadvantage in that a small system is developed.

실시간 운영체제의 두 가지 모델이 가진 서로의 장, 단점을 고려하여 비교적 작고, 복잡하지 않은 기능의 시스템 개발에는 멀티 쓰레드 모델을 사용하고, 의료기기와 같은 대규모의 복잡한 시스템 개발에는 멀티 프로세스 모델의 실시간 운영체제를 사용하는 것이 좋다고 알려져 있다.Considering the advantages and disadvantages of the two models of the real-time operating system, a multi-threaded model is used for developing a relatively small and uncomplicated system, and a multi-process model for a large-scale complex system such as a medical device. It is known to use.

한편, 상기와 같은 실시간 운영체제에서의 인터럽트 처리는 시스템 성능에 큰 영향을 주게된다. 따라서, 인터럽트의 처리시간 중에 발생하는 인터럽트 디스에이블(Interrupt Disable)과 인터럽트 마스크(Interrupt Mask)의 시간을 단축하여 인터럽트의 수행 지연을 최소화 함으로써, 시스템의 성능을 향상시켜야 한다.On the other hand, interrupt processing in the real-time operating system as described above has a big impact on system performance. Therefore, the performance of the system should be improved by minimizing the interrupt execution delay by reducing the time of interrupt disable and interrupt mask that occur during interrupt processing time.

이를 위해서, 종래에는 인터럽트와 프로세스 스케줄러(Processor Scheduler)를 연관지어 전체 스케줄링(scheduling)의 효과를 높이는 방법과 첨부한 도면 도1에 도시된 바와 같이 인터럽트 서비스 루틴을 최소화 하여 인터럽트의 디스에이블과 인터럽트 마스크 기간을 단축하는 방법을 사용하였다.To this end, in the related art, interrupts and process masks are minimized by minimizing an interrupt service routine as shown in FIG. 1 and a method of increasing the effect of overall scheduling by associating an interrupt with a processor scheduler. The method of shortening the period was used.

그러나, 상기와 같은 방식은 벡터 테이블에 등록된 루틴의 수행이 끝나야만 그 다음의 단계로 넘어가 인터럽트 처리가 종료된다.However, in the above method, the execution of the routine registered in the vector table is completed, and then the processing proceeds to the next step, where the interrupt processing ends.

따라서, 복잡한 하드웨어의 인터럽트를 처리할 때에는 별 효과를 보기 어려우며, 또한, ISR(Interrupt Service Routine) 구현에 있어서도 인터럽트 수행기간을 고려해야 하기 때문에 많은 제약이 따르는 문제점을 가진다.Therefore, when dealing with interrupts of complex hardware, it is difficult to see a particular effect, and in addition, the interrupt execution period must be taken into consideration in implementing an Interrupt Service Routine (ISR).

이에 본 발명은 상기와 같은 종래 기술의 제반 문제점을 해결하기 위해서 제안된 것으로서,Accordingly, the present invention is proposed to solve the above problems of the prior art,

본 발명의 목적은 실시간 운영체제(RTOS, RealTime Operating System)에서 인터럽트 처리 루틴을 인터럽트 타스크에 등록하여 타스크 레벨(Task Level)에서의 ISR(Interrupt Service Routine)을 수행할 수 있도록 하고, 상기 ISR 실행으로 인해 지연되는 인터럽트 수행시간의 지연을 ISR 타스크 레벨에서 관리함으로써, 인터럽트 처리시간을 최소화하고, 인터럽트 유실 등의 발생을 줄일 수 있으며, 시스템의 성능을 향상시킬 수 있도록 한 실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법을 제공하는 데 있다.An object of the present invention is to register an interrupt processing routine in an interrupt task in a real-time operating system (RTOS) to perform Interrupt Service Routine (ISR) at the task level, and due to the execution of the ISR By managing the delay of the delayed interrupt execution time at the ISR task level, it is possible to minimize the interrupt processing time, reduce the occurrence of interrupt loss, and improve the performance of the system. To provide.

상기와 같은 목적을 달성하기 위한 본 발명은,The present invention for achieving the above object,

인터럽트가 발생하면 인터럽트 처리를 시작하는 단계와,Starting interrupt processing when an interrupt occurs;

상기 인터럽트 처리가 시작되면, 인터럽트 디스에이블(disable) 후 인터럽트레벨(Interrupt Level)을 산출하는 단계와,Calculating an interrupt level after the interrupt is disabled when the interrupt processing is started;

상기 산출한 인터럽트 레벨이 미리 설정된 레벨 이하의 인터럽트일 경우 이를 마스크(mask)하고, 상기 레벨에 대응하게 등록된 예외 핸들러(Exception Handler)의 테이블 값을 산출하는 단계와,Masking the calculated interrupt level when the interrupt level is equal to or lower than a predetermined level, and calculating a table value of an exception handler registered corresponding to the level;

상기 테이블 값 산출 후, 인터럽트를 인에이블(enable)하고, 등록된 예외 핸들러를 수행하는 단계와,After calculating the table value, enabling an interrupt and executing a registered exception handler;

상기 예외 핸들러 수행이 종료되면 인터럽트 벡터 테이블에 등록된 루틴을 수행한 후 인터럽트를 디스에이블하는 단계와,Disabling the interrupt after performing the routine registered in the interrupt vector table when the exception handler is finished;

상기 인터럽트 디스에이블 후, 해당 레벨 이하의 인터럽트를 언마스크(unmask)하는 단계와,After disabling the interrupt, unmasking an interrupt below a corresponding level;

상기 인터럽트 언마스크 후, 인터럽트 처리 완료 여부를 체크하고, 그 결과 인터럽트 처리가 완료된 경우에는 ISR(Interrupt Service Routine) 타스크에서 ISR을 수행하는 단계로 구성됨을 그 방법적 구성상의 특징으로 한다.After the interrupt unmasking, it is checked whether or not the interrupt processing is completed, and as a result, if the interrupt processing is completed, the method comprises the step of performing an ISR in an Interrupt Service Routine (ISR) task.

도 1은 종래 기술에 따른 실시간 운영체제에서 타스크 레벨 인터럽트 처리 과정을 도시한 도면이고,1 is a diagram illustrating a task level interrupt processing process in a real-time operating system according to the prior art,

도 2는 본 발명에 의한 실시간 운영체제에서 타스크 레벨 인터럽트 처리 과정을 도시한 도면이고,2 is a diagram illustrating a task level interrupt processing process in a real-time operating system according to the present invention,

도 3은 본 발명에 의한 실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법을 도시한 흐름도이다.3 is a flowchart illustrating a task level interrupt processing method in a real-time operating system according to the present invention.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

100 ..... 물리 메모리(Physical Memory)100 ..... Physical Memory

200 ..... 큐(Queue)200 ..... Queue

300 ..... ISR 처리 타스크(Task)300 ..... ISR Processing Task

400 ..... 인터럽트 벡터 테이블(Interrupt Vector Table)400 ..... Interrupt Vector Table

이하, 상기와 같은 기술적 사상에 따른 본 발명의 「실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법」의 바람직한 실시 예를 첨부된 도면에 의거 상세히 설명하면 다음과 같다.Hereinafter, a preferred embodiment of the "task level interrupt processing method in a real-time operating system" of the present invention according to the above technical concept will be described in detail with reference to the accompanying drawings.

도 2는 본 발명에 의한 실시간 운영체제에서 타스크 레벨 인터럽트 처리 과정을 도시한 도면이다.2 is a diagram illustrating a task level interrupt processing process in a real-time operating system according to the present invention.

이에 도시된 바와 같이, 인터럽트 벡터 테이블에 등록된 루틴 수행까지는 기존의 방식과 같고, 인터럽트 벡터 테이블에 등록된 루틴을 모두 ISR(Interrupt Service Routine) 처리 타스크(Task)에 벡터 넘버(Vector Number)와 파라미터(Parameter) 값을 넘겨주는 간단한 루틴으로만 기록한다.As shown in the drawing, the routines registered in the interrupt vector table are the same as the conventional method, and all the routines registered in the interrupt vector table are assigned to the Interrupt Service Routine (ISR) processing task (Vector Number) and parameters. (Parameter) Record only as a simple routine to pass the value.

여기서, 핸들러(Handler)는 최소한의 정보만을 보내기만 하면 되므로 빠르게 다음 인터럽트를 받아들일 상태로 돌아가기 때문에 인터럽트에 대한 유실을 줄일 수 있다.In this case, since the handler only needs to send the minimum information, the handler quickly returns to the state to receive the next interrupt, thereby reducing the loss of the interrupt.

또한, 타스크 레벨(Task Level)에서 ISR을 수행하므로, 보다 적은 제약을 받으며 루틴을 구현할 수 있고, 상기 ISR 처리 타스크는 우선순위 레벨(Priority Level)을 가장 우선적으로 설정하여, 모든 인터럽트에 대한 해당 루틴을 가지고 있으며, 인터럽트 발생시 해당 벡터와 파라미터 값을 가지고 ISR의 실행을 스케줄링(scheduling)에 의해 수행한다.In addition, since the ISR is performed at the task level, the routine can be implemented with less restrictions, and the ISR processing task sets the priority level as the highest priority, so that the routine for all interrupts can be set. In case of interrupt, ISR is executed by scheduling with corresponding vector and parameter value.

따라서, ISR(Interrupt Service Routine) 실행으로 인해 지연되는 인터럽트 수행시간의 지연을 ISR을 타스크 레벨(Task Level)에서 관리하므로, 인터럽트 수행시간을 최소화 하고 ISR의 구현에도 융통성을 발휘할 수 있으며, 시스템 개발시 인터럽트 처리 루틴에 관련하여 적용 가능하며, 특히 디바이스 드라이버(Device Driver) 개발과 운영체제(OS) 상에서 인터럽트 처리 등에 활용이 가능하다.Therefore, ISR is managed at the task level to manage the delay of interrupt execution time delayed by the execution of Interrupt Service Routine (ISR), which minimizes interrupt execution time and provides flexibility in the implementation of ISR. It can be applied in relation to interrupt handling routines, and in particular, it can be utilized for device driver development and interrupt processing on an operating system (OS).

도 3은 본 발명에 의한 실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법을 도시한 흐름도이다.3 is a flowchart illustrating a task level interrupt processing method in a real-time operating system according to the present invention.

이에 도시된 바와 같이, 인터럽트가 발생(ST11)하면 인터럽트 처리를시작(ST12)하고, 인터럽트를 디스에이블(disable)하는 단계(ST13)와, 상기 인터럽트 디스에이블 후, 해당 인터럽트 레벨(Interrupt Level)을 산출하는 단계(ST14)와, 상기 인터럽트 레벨 산출 후, 상기 산출한 인터럽트 레벨이 미리 설정된 레벨 이하의 인터럽트일 경우 이를 마스크(mask)하는 단계(ST15)와, 상기 인터럽트 마스크 후, 상기 레벨에 대응하게 등록된 예외 핸들러(Exception Handler)의 테이블 값을 산출하는 단계(ST16)와, 상기 테이블 값 산출 후, 인터럽트를 인에이블(enable)하는 단계(ST17)와, 상기 인터럽트 인에이블 후, 등록된 예외 핸들러를 수행하는 단계(ST18)와, 상기 예외 핸들러 수행이 종료되면, 인터럽트 벡터 테이블에 등록된 루틴을 수행하는 단계(ST19)와, 상기 루틴 수행 후, 인터럽트를 디스에이블하는 단계(ST20)와, 상기 인터럽트 디스에이블 후, 해당 레벨 이하의 인터럽트를 언마스크(unmask)하는 단계(ST21)와, 상기 인터럽트 언마스크 후, 인터럽트 처리 완료 여부를 체크(ST22)하고, 그 결과 인터럽트 처리가 완료된 경우에는 ISR(Interrupt Service Routine) 타스크에서 ISR을 수행하는 단계(ST23)로 구성된다.As shown therein, when an interrupt occurs (ST11), interrupt processing starts (ST12), disables the interrupt (ST13), and after disabling the interrupt, sets the corresponding interrupt level (Interrupt Level). Calculating (ST14), and after calculating the interrupt level, masking the calculated interrupt level if it is an interrupt below a predetermined level (ST15), and corresponding to the level after the interrupt mask. Calculating a table value of a registered exception handler (ST16), enabling the interrupt after calculating the table value (ST17), and registering the exception handler after the interrupt is enabled. Performing the routine (ST18), and when the exception handler is finished, executing the routine registered in the interrupt vector table (ST19), and performing the interrupt after performing the routine. Disabling (ST20), after disabling the interrupt, unmasking an interrupt below the level (ST21), and checking the completion of interrupt processing after the interrupt unmasking (ST22), As a result, when the interrupt processing is completed, a step (ST23) of performing an ISR in an Interrupt Service Routine (ISR) task is performed.

상기와 같은 구성을 갖는 본 발명을 좀 더 구체적으로 설명하면 다음과 같다.The present invention having the above configuration will be described in more detail as follows.

즉, 단계 ST11에서 인터럽트가 발생되면, 단계 ST12에서는 상기 발생된 인터럽트 처리를 시작(ST12)하고, 인터럽트 처리가 시작되면 단계 ST13에서와 같이 인터럽트를 디스에이블(disable)한다.That is, when an interrupt is generated in step ST11, in step ST12, the generated interrupt processing is started (ST12). When interrupt processing is started, the interrupt is disabled as in step ST13.

상기에서 인터럽트 디스에이블 후, 단계 ST14에서 해당 인터럽트 레벨을 산출하고, 단계 ST15에서 상기 산출된 해당 인터럽트 레벨 이하로 발생된 인터럽트를 체크하여 마스크(mask)를 수행한다.After the interrupt is disabled, the corresponding interrupt level is calculated in step ST14, and the interrupt generated below the corresponding interrupt level calculated in step ST15 is checked to perform a mask.

여기서, 상기 마스크(mask)는, 운영체제(OS)에서 인터럽트의 발생을 억제하는 것으로, 이것은 인터럽트 마스크(Interrupt Mask)라고 하며, 인터럽트 마스크에 의해 인터럽트가 발생하여도 그것이 해제될 때까지 상기 발생된 인터럽트는 무시된다.Here, the mask is to suppress the occurrence of the interrupt in the operating system (OS), which is called the interrupt mask (Interrupt Mask), even if an interrupt is generated by the interrupt mask until the interrupt is generated until it is released Is ignored.

한편, 상기 인터럽트 마스크 후, 단계 ST16에서는 해당 레벨에 등록된 예외 핸들러(Exception Handler)의 테이블 값을 산출하는데, 여기서 상기 예외(Exception)라 함은, 프로그램의 실행 중에 정상적인 실행 처리의 일시적인 중단을 일으키는 원인이 되는 사상(event)이나, 예측하지 않은 데이터가 들어오는 것 등을 총칭하는 단어로, 예를 들어, 산술 연산을 실행했을 때의 오버플로, 주변 장치에 발생하는 고장 등이 포함된다. 일반적으로, 이와 같은 예외의 발생에 대해서는 프로그램 중에 그 예외마다 대처하는 루틴(routine)을 내장해 놓고, 그 루틴을 실행하여 적절한 액션을 취한 다음, 정상적인 처리로 돌아오게 하도록 되어 있다. 이와 같은 처리를 예외(例外) 처리(Exception Handling)라 하며, 그것을 처리하는 루틴을 예외 핸들러(Exception Handler)라고 한다.On the other hand, after the interrupt mask, in step ST16, a table value of an exception handler registered at the corresponding level is calculated, wherein the exception causes a temporary interruption of normal execution processing during program execution. It is a general term for the event which causes a cause, the unexpected data coming in, etc., for example, the overflow when an arithmetic operation is performed, the fault which arises in a peripheral device, etc. are included. In general, for the occurrence of such an exception, a program has a built-in routine for each exception, executes the routine, takes appropriate action, and returns to normal processing. Such processing is called exception handling, and the routine that handles it is called an exception handler.

한편, 상기 예외 핸들러의 테이블 값 산출 후, 단계 ST17에서는 인터럽트를 인에이블하고, 단계 ST18에서 상기 해당 레벨에 등록된 예외 핸들러를 수행한다.On the other hand, after calculating the table value of the exception handler, in step ST17, the interrupt is enabled, and in step ST18, the exception handler registered at the corresponding level is performed.

상기 예외 핸들러 수행 후, 단계 ST19에서는 인터럽트 벡터 테이블(Interrupt Vector Table)에 등록된 루틴을 수행하고, 단계 ST20에서 인터럽트를 디스에이블 한다.After performing the exception handler, in step ST19, the routine registered in the interrupt vector table is executed, and in step ST20, the interrupt is disabled.

상기 인터럽트 디스에이블 후에는 단계 ST21에서와 같이, 해당 레벨 이하의 인터럽트를 언마스크(unmask)하고, 단계 ST22에서는 인터럽트 처리 완료 여부를 체크한다. 상기 체크결과 인터럽트 처리가 완료되면, 단계 ST23에서 ISR 타스크(Interrupt Service Routine Task)에서 ISR을 수행한다.After disabling the interrupt, as in step ST21, the interrupt below the level is unmasked, and in step ST22, it is checked whether the interrupt processing is completed. When the interrupt processing is completed as a result of the check, the ISR is performed in the ISR task (Interrupt Service Routine Task) in step ST23.

이상에서 상술한 본 발명 "실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법"에 따르면, 실시간 운영체제(RTOS)에서 인터럽트 처리 루틴을 인터럽트 타스크에 등록하여 타스크 레벨(Task Level)에서의 ISR(Interrupt Service Routine)을 수행하고, 상기 ISR 실행으로 인해 지연되는 인터럽트 수행시간의 지연을 ISR 타스크 레벨에서 관리함으로써, 인터럽트 처리과정을 최소화할 수 있으며, 이를 통해 시스템의 성능을 향상시킬 수 있는 이점을 가진다.According to the present invention described above, the "task level interrupt processing method in a real-time operating system", an interrupt processing routine is registered in an interrupt task in a real-time operating system (RTOS) to perform an Interrupt Service Routine (ISR) at a task level. In addition, by managing the delay of the interrupt execution time delayed by the ISR execution at the ISR task level, it is possible to minimize the interrupt processing process, thereby improving the performance of the system.

또한, 개발자들에게 ISR 구현시 발생하는 인터럽트 유실 등의 문제점을 상당히 줄일 수 있으며, 보다 유연한 ISR을 만들 수 있도록 해주는 이점을 가진다.In addition, developers can considerably reduce problems such as interrupts caused by ISR implementation, and have the advantage of making the ISR more flexible.

Claims (1)

실시간 운영체제(RealTime Operating System)에서 타스크 레벨(Task Level) 인터럽트 처리 방법에 있어서,In the method for handling task level interrupt in a real-time operating system, 인터럽트가 발생하면 인터럽트 처리를 시작하는 단계와;Starting interrupt processing when an interrupt occurs; 상기 인터럽트 처리가 시작되면, 인터럽트 디스에이블(disable) 후 인터럽트 레벨(Interrupt Level)을 산출하는 단계와;Calculating an interrupt level after the interrupt is disabled when the interrupt processing is started; 상기 산출한 인터럽트 레벨이 미리 설정된 레벨 이하의 인터럽트일 경우 이를 마스크(mask)하고, 상기 레벨에 대응하게 등록된 예외 핸들러(Exception Handler)의 테이블 값을 산출하는 단계와;Masking the calculated interrupt level when the interrupt level is equal to or lower than a predetermined level, and calculating a table value of an exception handler registered corresponding to the level; 상기 테이블 값 산출 후, 인터럽트를 인에이블(enable)하고, 등록된 예외 핸들러를 수행하는 단계와;Enabling the interrupt and calculating the registered exception handler after calculating the table value; 상기 예외 핸들러 수행이 종료되면 인터럽트 벡터 테이블에 등록된 루틴을 수행한 후 인터럽트를 디스에이블하는 단계와;Disabling the interrupt after performing the routine registered in the interrupt vector table when the exception handler finishes performing; 상기 인터럽트 디스에이블 후, 해당 레벨 이하의 인터럽트를 언마스크(unmask)하는 단계와;Unmasking an interrupt below the level after the interrupt is disabled; 상기 인터럽트 언마스크 후, 인터럽트 처리 완료 여부를 체크하고, 그 결과 인터럽트 처리가 완료된 경우에는 ISR(Interrupt Service Routine) 타스크에서 ISR을 수행하는 단계를 포함하여 이루어진 것을 특징으로 하는 실시간 운영체제에서 타스크 레벨 인터럽트 처리 방법.After the interrupt unmasking, checking whether the interrupt processing is completed, and if the interrupt processing is completed as a result, performing the ISR in the Interrupt Service Routine (ISR) task. Way.
KR1020020016524A 2002-03-26 2002-03-26 Method for task level interrupt handling in realtime operating system KR20030077696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020020016524A KR20030077696A (en) 2002-03-26 2002-03-26 Method for task level interrupt handling in realtime operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020020016524A KR20030077696A (en) 2002-03-26 2002-03-26 Method for task level interrupt handling in realtime operating system

Publications (1)

Publication Number Publication Date
KR20030077696A true KR20030077696A (en) 2003-10-04

Family

ID=32376726

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020020016524A KR20030077696A (en) 2002-03-26 2002-03-26 Method for task level interrupt handling in realtime operating system

Country Status (1)

Country Link
KR (1) KR20030077696A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7836291B2 (en) 2006-02-06 2010-11-16 Samsung Electronics Co., Ltd. Method, medium, and apparatus with interrupt handling in a reconfigurable array
US20120284443A1 (en) * 2010-03-18 2012-11-08 Panasonic Corporation Virtual multi-processor system
CN105138360A (en) * 2015-08-19 2015-12-09 惠州Tcl移动通信有限公司 Wearable device system function call method and wearable device
US9424105B2 (en) 2011-12-07 2016-08-23 Samsung Electronics Co., Ltd. Preempting tasks at a preemption point of a kernel service routine based on current execution mode

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7836291B2 (en) 2006-02-06 2010-11-16 Samsung Electronics Co., Ltd. Method, medium, and apparatus with interrupt handling in a reconfigurable array
US20120284443A1 (en) * 2010-03-18 2012-11-08 Panasonic Corporation Virtual multi-processor system
US8725921B2 (en) * 2010-03-18 2014-05-13 Panasonic Corporation Virtual multi-processor system
US9424105B2 (en) 2011-12-07 2016-08-23 Samsung Electronics Co., Ltd. Preempting tasks at a preemption point of a kernel service routine based on current execution mode
CN105138360A (en) * 2015-08-19 2015-12-09 惠州Tcl移动通信有限公司 Wearable device system function call method and wearable device

Similar Documents

Publication Publication Date Title
US6895460B2 (en) Synchronization of asynchronous emulated interrupts
US5659679A (en) Method and apparatus for providing breakpoints on taken jumps and for providing software profiling in a computer system
US7020871B2 (en) Breakpoint method for parallel hardware threads in multithreaded processor
US5740413A (en) Method and apparatus for providing address breakpoints, branch breakpoints, and single stepping
US5511217A (en) Computer system of virtual machines sharing a vector processor
US7849465B2 (en) Programmable event driven yield mechanism which may activate service threads
US5621886A (en) Method and apparatus for providing efficient software debugging
US8868887B2 (en) Programmable event driven yield mechanism which may activate other threads
US5109329A (en) Multiprocessing method and arrangement
US6687903B1 (en) Inhibiting starvation in a multitasking operating system
RU2224280C1 (en) Mechanism for detecting exclusive underflow situations during speculative execution of floating-point operations in compliance with iere standard
JP6508851B2 (en) Avoid early enablement of non-maskable interrupts when returning from an exception
US20080148259A1 (en) Structured exception handling for application-managed thread units
US8713371B2 (en) Controlling generation of debug exceptions
US8056078B2 (en) Cooperatively multitasking in an interrupt free computing environment
US20070239917A1 (en) Interrupt routing within multiple-processor system
US7296271B1 (en) Replaceable scheduling algorithm in multitasking kernel
JP2013058207A (en) Non-intrusive, thread-selective debugging method and system for multi-thread digital signal processor
KR20030077696A (en) Method for task level interrupt handling in realtime operating system
US7516311B2 (en) Deterministic microcontroller context arrangement
US7562207B2 (en) Deterministic microcontroller with context manager
TW202008159A (en) Circuitry system for processing interrupt priority
CN114218067A (en) Heterogeneous many-core software debugging device and method
JPH0895798A (en) Data processor
KR100672550B1 (en) Method for processing multiple interrupt

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination