KR101928349B1 - Apparatus for monitoring run-time of real time operating system and thereof - Google Patents

Apparatus for monitoring run-time of real time operating system and thereof Download PDF

Info

Publication number
KR101928349B1
KR101928349B1 KR1020160123117A KR20160123117A KR101928349B1 KR 101928349 B1 KR101928349 B1 KR 101928349B1 KR 1020160123117 A KR1020160123117 A KR 1020160123117A KR 20160123117 A KR20160123117 A KR 20160123117A KR 101928349 B1 KR101928349 B1 KR 101928349B1
Authority
KR
South Korea
Prior art keywords
time
task
start time
end time
information
Prior art date
Application number
KR1020160123117A
Other languages
Korean (ko)
Other versions
KR20180033761A (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 KR1020160123117A priority Critical patent/KR101928349B1/en
Publication of KR20180033761A publication Critical patent/KR20180033761A/en
Application granted granted Critical
Publication of KR101928349B1 publication Critical patent/KR101928349B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 실시간 운영체제의 태스크 실행 시간 모니터링 장치 및 그 방법에 관한 것이다.
본 발명에 따르면, 실시간 운영체제의 태스크 실행 시간 모니터링 장치를 이용한 실시간 운영체제의 태스크 실행 시간 모니터링 방법에 있어서, 태스크 실행 시간 모니터링 방법은 복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정하는 단계, 상기 측정된 시작 시간 및 종료시간을 각각의 태스크 별로 저장하는 단계, 그리고 사용자 단말로부터 상기 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신하면, 상기 정보 출력 메시지를 수신한 시점 이전에 저장된 시작 시간 및 종료 시간에 대한 정보를 사용자 단말로 출력하는 단계를 포함한다.
이와 같이 본 발명에 따르면, 사용자로부터 태스크의 모니터링 정보 요청이 있는 경우에만 기 저장된 시작 시간 및 종료 시간을 일괄 제공하게 되므로, 각 태스크가 종료될 때마다 시작 시간 및 종료 시간을 사용자에게 제공하는 종래의 기술에 비해 정보 출력에 따른 시스템의 부하를 크게 줄일 수 있다.
The present invention relates to an apparatus and a method for monitoring a task execution time of a real-time operating system.
According to the present invention, there is provided a method for monitoring a task execution time of a real-time operating system using a task execution time monitoring apparatus of a real-time operating system, wherein the task execution time monitoring method measures a start time and an end time of a plurality of tasks Storing the measured start time and end time for each task, and upon receiving an information output message requesting transmission of information on the start time and the end time from the user terminal, And outputting information on the start time and the end time stored before the time point to the user terminal.
As described above, according to the present invention, since only the pre-stored start time and end time are collectively provided when there is a request for monitoring information of the task from the user, the conventional method of providing start time and end time to each user The load of the system according to the information output can be greatly reduced.

Description

실시간 운영체제의 태스크 실행 시간 모니터링 장치 및 그 방법{APPARATUS FOR MONITORING RUN-TIME OF REAL TIME OPERATING SYSTEM AND THEREOF} [0001] APPARATUS FOR MONITORING RUN-TIME OF REAL TIME OPERATING SYSTEM AND THEREOF [0002]

본 발명은 실시간 운영체제의 태스크 실행 시간 모니터링 장치 및 그 방법에 관한 것으로서, 더욱 상세하게는 실시간 운영체제의 태스크 실행 시간에 관한 정보를 제공하는데 있어 발생하는 운영체제의 부하를 줄이기 위한 실시간 운영체제의 태스크 실행 시간 모니터링 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus and method for monitoring a task execution time of a real-time operating system, and more particularly, to an apparatus and method for monitoring a task execution time of a real-time operating system to reduce a load of an operating system, Device and method thereof.

실시간 운영 체제(Real Time Operating System, RTOS)는 실시간 응용 프로그램을 위해 개발된 운영 체제로서, 운영 체제의 기능 중 중앙 처리 장치(Central Processing Unit, CPU)의 시간 관리 부분에 초점을 맞추어 설계되었다. 실시간 운영 체제는 프로그래머가 프로세스 우선 순위에 더 많은 제어를 할 수 있도록 설계되어 있으므로, 응용 프로그램의 우선 순위가 시스템 프로그램의 우선 순위를 넘어설 수도 있다. 그러므로, 실시간 운영 체제에서는 태스크의 시작 시간, 종료 시간 및 실행 시간에 대한 정보에 대한 모니터링이 매우 중요한 역할을 한다. Real Time Operating System (RTOS) is an operating system developed for real-time applications. It is designed to focus on the time management part of the central processing unit (CPU) of the operating system. Real-time operating systems are designed so that programmers have more control over process priorities, so application priorities can exceed system program priorities. Therefore, in real-time operating system, monitoring of information about task start time, end time and execution time plays a very important role.

도 1은 종래 실시간 운영체제에서 태스크의 시작 시간 및 종료 시간 정보를 제공하는 방법을 설명하기 위한 도면이다. 1 is a view for explaining a method of providing start time and end time information of a task in a conventional real-time operating system.

종래에는 실시간 운영 체제가 태스크의 수행이 종료될 때마다 시작 해당 태스크의 시작 시간 및 종료 시간 정보를 사용자에게 제공한다. 이때, 실시간 운영 체제는 인터럽트 서비스 루틴(Interrupt Service Routine, ISR)을 이용하여 시간 정보를 전송하게 되는데, 인터럽트 서비스 루틴의 특성상 정보 전송 시에는 태스크의 실행이 중단된다. Conventionally, the real-time operating system provides the start time and end time information of the start task to the user every time the execution of the task is terminated. At this time, the real-time operating system transmits time information using the interrupt service routine (ISR). Due to the nature of the interrupt service routine, execution of the task is interrupted when information is transmitted.

예를 들어, 도 1에 도시된 바와 같이, 첫번째 Task 1의 실행이 종료되면 TASK 1의 시작 시간(a) 및 종료 시간(b) 정보를 사용자에게 제공하기 위하여 Task 3의 실행을 잠시 보류한다. 이에 따라 Task 3 이 실행되기 전 공백 시간(c-b)이 발생하게 된다. For example, as shown in FIG. 1, when the execution of the first Task 1 ends, execution of Task 3 is suspended for providing the user with the start time (a) and end time (b) information of TASK 1. Thus, a blank time (c-b) occurs before Task 3 is executed.

이에 따라, 실시간 운영 체제는 시간 정보 전송에 따른 태스크 실행의 딜레이(delay)가 발생할 뿐만 아니라, 잦은 시간 정보 전송에 따른 시스템 과부하가 발생하는 문제점이 있다. Accordingly, the real-time operating system has a problem in that not only a delay of task execution due to transmission of time information occurs but also system overload due to frequent transmission of time information occurs.

본 발명의 배경이 되는 기술은 한국등록특허 제10-1203099호(2012.11.20.공고)에 개시되어 있다.The technology which is the background of the present invention is disclosed in Korean Patent No. 10-1203099 (published on Nov. 20, 2012).

본 발명이 이루고자 하는 기술적 과제는 실시간 운영체제의 태스크 실행 시간에 관한 정보를 제공하는데 있어 발생하는 운영체제의 부하를 줄이기 위한 실시간 운영체제의 태스크 실행 시간 모니터링 장치 및 그 방법을 제공하기 위한 것이다.An object of the present invention is to provide an apparatus and method for monitoring a task execution time of a real-time operating system for reducing a load of an operating system occurring in providing information on a task execution time of a real-time operating system.

이러한 기술적 과제를 이루기 위한 본 발명의 실시예에 따르면 실시간 운영체제의 태스크 실행 시간 모니터링 장치를 이용한 실시간 운영체제의 태스크 실행 시간 모니터링 방법에 있어서, 태스크 실행 시간 모니터링 방법은 복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정하는 단계, 상기 측정된 시작 시간 및 종료시간을 각각의 태스크 별로 저장하는 단계, 그리고 사용자 단말로부터 상기 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신하면, 상기 정보 출력 메시지를 수신한 시점 이전에 저장된 시작 시간 및 종료 시간에 대한 정보를 사용자 단말로 출력하는 단계를 포함한다. According to an aspect of the present invention, there is provided a method for monitoring a task execution time of a real-time operating system using a task execution time monitoring apparatus of a real-time operating system, the method comprising: Storing the measured start time and end time for each task, and receiving an information output message requesting transmission of information about the start time and the end time from the user terminal And outputting information on a start time and an end time stored before the time when the information output message is received to the user terminal.

상기 정보 출력 요청 메시지를 수신한 시점 이전에 측정된 시작 시간 및 종료 시간을 이용하여 상기 복수의 태스크 각각의 실행 시간을 연산하는 단계를 더 포함할 수 있으며, 상기 정보를 출력하는 단계는, 상기 연산된 태스크의 실행 시간에 대한 정보를 더 출력할 수 있다. The method may further include calculating an execution time of each of the plurality of tasks using a start time and an end time measured before the time when the information output request message is received, It is possible to output more information about the execution time of the executed task.

상기 시작 시간과 종료 시간을 측정하는 단계는, 상기 태스크가 러닝 상태가 되면 실시간 운영체제에 포함된 프리태스크 훅(PreTaskHook) 함수를 이용하여 상기 시작 시간을 측정하고, 상기 태스크가 러닝 상태를 벗어나면 실시간 운영체제에 포함된 포스트태스크 훅(PostTaskHook) 함수를 이용하여 상기 종료 시간을 측정할 수 있다. Wherein the step of measuring the start time and the end time comprises: measuring the start time using a PreTaskHook function included in the real-time operating system when the task is in a running state; The end time can be measured using a post task hook function included in the operating system.

상기 측정된 시작 시간 및 종료 시간을 저장하는 단계는, 태스크의 식별자인 태스크 아이디, 시작 시간 및 종료 시간을 인덱스로 하는 메모리 구조체에 상기 복수의 태스크 각각의 태스크 아이디, 상기 측정된 시작 시간 및 종료 시간을 저장할 수 있다. Wherein the step of storing the measured start time and the end time includes storing the task ID of each of the plurality of tasks, the measured start time and the end time of each of the plurality of tasks in a memory structure having a task ID, a start time, Lt; / RTI >

본 발명의 다른 실시예에 따른 태스크 실행 시간 모니터링 장치는 복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정하는 측정부, 상기 측정된 시작 시간 및 종료시간을 각각의 태스크 별로 저장하는 저장부, 그리고 사용자 단말로부터 상기 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신하면, 상기 정보 출력 메시지를 수신한 시점 이전에 저장된 시작 시간 및 종료 시간에 대한 정보를 사용자 단말로 출력하는 출력부를 포함한다.The apparatus for monitoring a task execution time according to another embodiment of the present invention includes a measurement unit for measuring a start time and an end time of a start time point and a end time point of a plurality of tasks and storing the measured start time and end time for each task And information on the start time and the end time stored before the reception of the information output message to the user terminal when receiving the information output message requesting the transmission of the information about the start time and the end time from the user terminal, And an output unit for outputting.

이와 같이 본 발명에 따르면, 사용자로부터 태스크의 모니터링 정보 요청이 있는 경우에만 기 저장된 시작 시간 및 종료 시간을 일괄 제공하게 되므로, 각 태스크가 종료될 때마다 시작 시간 및 종료 시간을 사용자에게 제공하는 종래의 기술에 비해 정보 출력에 따른 시스템의 부하를 크게 줄일 수 있다.As described above, according to the present invention, since only the pre-stored start time and end time are collectively provided when there is a request for monitoring information of the task from the user, the conventional method of providing start time and end time to each user The load of the system according to the information output can be greatly reduced.

도 1은 종래 실시간 운영체제에서 태스크의 시작 시간 및 종료 시간 정보를 제공하는 방법을 설명하기 위한 도면이다.
도 2는 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행 시간 모니터링 장치의 구성도이다.
도 3은 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행시간 모니터링 방법의 순서도이다.
도 4는 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행시간 모니터링 방법을 상세하게 설명하기 위한 도면이다.
1 is a view for explaining a method of providing start time and end time information of a task in a conventional real-time operating system.
2 is a block diagram of an apparatus for monitoring a task execution time of a real-time operating system according to an embodiment of the present invention.
3 is a flowchart of a method of monitoring a task execution time of a real-time operating system according to an embodiment of the present invention.
4 is a diagram for explaining a method of monitoring a task execution time of a real-time operating system according to an embodiment of the present invention in detail.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있다는 것을 의미한다.Throughout the specification, when an element is referred to as " comprising ", it means that it can include other elements as well, without excluding other elements unless specifically stated otherwise.

그러면 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention.

도 2는 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행 시간 모니터링 장치의 구성도이다. 도 2에 도시된 바와 같이, 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행 시간 모니터링 장치(200)는 측정부(210), 저장부(220) 및 출력부(240)를 포함하며, 연산부(230)를 더 포함할 수 있다. 2 is a block diagram of an apparatus for monitoring a task execution time of a real-time operating system according to an embodiment of the present invention. 2, an apparatus 200 for monitoring a task execution time of a real-time operating system according to an exemplary embodiment of the present invention includes a measurement unit 210, a storage unit 220, and an output unit 240, 230).

우선, 측정부(210)는 복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정한다. First, the measuring unit 210 measures the start time and the end time of the start and end points of a plurality of tasks.

구체적으로, 측정부(210)는 태스크가 러닝 상태가 되면 실시간 운영체제에 포함된 프리태스크 훅(PreTaskHook) 함수를 이용하여 시작 시간을 측정한다. 그리고, 측정부(210)는 태스크가 러닝 상태를 벗어나면 실시간 운영체제에 포함된 포스트태스크 훅(PostTaskHook) 함수를 이용하여 종료 시간을 측정한다. Specifically, when the task is in the running state, the measuring unit 210 measures a start time using a PreTaskHook function included in the real-time operating system. When the task is out of the running state, the measuring unit 210 measures the end time using a post task hook function included in the real-time operating system.

다음으로, 저장부(220)는 측정된 시작 시간 및 종료시간을 각각의 태스크 별로 저장한다. 이때, 저장부(220)는, 태스크의 식별자인 태스크 아이디, 시작 시간 및 종료 시간을 인덱스로 하는 메모리 구조체에 복수의 태스크 각각의 태스크 아이디, 측정된 시작 시간 및 종료 시간을 저장한다. Next, the storage unit 220 stores the measured start time and end time for each task. At this time, the storage unit 220 stores the task ID, the measured start time, and the end time of each of the plurality of tasks in the memory structure having the task ID, start time, and end time, which are identifiers of the task, as indexes.

다음으로, 연산부(230)는 상기 정보 출력 요청 메시지를 수신한 시점 이전에 측정된 시작 시간 및 종료 시간을 이용하여 복수의 태스크 각각의 실행 시간을 연산한다. Next, the operation unit 230 calculates the execution time of each of the plurality of tasks using the start time and the end time measured before the time when the information output request message is received.

다음으로, 출력부(240)는 사용자 단말로부터 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신하면, 정보 출력 메시지를 수신한 시점 이전에 저장된 시작 시간 및 종료 시간에 대한 정보를 사용자 단말로 출력한다. 그리고, 출력부(240)는 연산된 태스크의 실행 시간에 대한 정보를 더 출력한다. When the information output message requesting transmission of information about the start time and the end time is received from the user terminal, the output unit 240 outputs information on the start time and the end time stored before the reception of the information output message And outputs it to the user terminal. The output unit 240 further outputs information on the execution time of the computed task.

이하에서는 도 3 및 도 4를 통해 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행 시간 모니터링 장치를 이용한 실시간 운영체제의 태스크 실행시간 모니터링 방법에 대해 살펴보도록 한다. Hereinafter, a method of monitoring a task execution time of a real-time operating system using a task execution time monitoring apparatus of a real-time operating system according to an embodiment of the present invention will be described with reference to FIG. 3 and FIG.

도 3은 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행시간 모니터링 방법의 순서도이고, 도 4는 본 발명의 실시예에 따른 실시간 운영체제의 태스크 실행시간 모니터링 방법을 상세하게 설명하기 위한 도면이다. FIG. 3 is a flow chart of a method of monitoring a task execution time of a real-time operating system according to an embodiment of the present invention. FIG. 4 is a diagram for explaining a method of monitoring a task execution time of a real time operating system according to an embodiment of the present invention in detail.

먼저, 측정부(210)는 복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정한다(S310). First, the measuring unit 210 measures the start time and the end time of the start and end points of a plurality of tasks (S310).

이때, 측정부(210)는 태스크가 러닝 상태가 되면 실시간 운영체제에 포함된 프리태스크 훅(PreTaskHook) 함수를 이용하여 시작 시간을 측정한다. 그리고, 측정부(210)는 태스크가 러닝 상태를 벗어나면 실시간 운영체제에 포함된 포스트태스크 훅(PostTaskHook) 함수를 이용하여 종료 시간을 측정한다. At this time, when the task is in the running state, the measuring unit 210 measures the start time using a pre-task hook function included in the real-time operating system. When the task is out of the running state, the measuring unit 210 measures the end time using a post task hook function included in the real-time operating system.

예를 들어, 도 4에 도시된 바와 같이, 복수의 태스크(Task 1 내지 4)가 존재한다고 가정한다. 여기서, 도 4에서 Task 1 내지 Task 4가 표시된 박스는 각 태스크의 러닝 상태를 나타낸다. For example, as shown in FIG. 4, it is assumed that there are a plurality of tasks (Task 1 to 4). In FIG. 4, boxes indicating Task 1 to Task 4 indicate the running states of the respective tasks.

그러면, 측정부(210)는 실시간 운영체제에 포함된 프리태스크 훅 함수를 호출하여 각 태스크 러닝 상태의 시작 시간이자 종료 시간인 (ㄱ), (ㄴ), (ㄷ), (ㄹ), (ㅁ) 시점의 시간을 측정한다. Then, the measuring unit 210 calls the free task hook function included in the real-time operating system to determine the start time and end time of each task running state as (a), (b), (c), (d) Measure the time of the point of view.

구체적으로, 측정부(210)는 Task 1이 러닝상태가 되면 프리태스크 훅 함수를 호출하여 Task 1의 시작시점인 ㄱ 시점의 시간을 측정한 다음, Task 1이 러닝상태를 벗어나면 포스트태스크 훅 함수를 호출하여 Task 1의 종료시점인 ㄴ의 시간을 측정한다. 즉, 측정부(210)는 각 태스크의 러닝상태의 시작 시간 및 종료 시간을 실시간으로 측정한다. Specifically, when the task 1 is in the running state, the measuring unit 210 calls the free task hook function to measure the time at the start point of the task 1, and if the task 1 is out of the running state, To measure the time of the end of Task 1. That is, the measuring unit 210 measures the start time and the end time of the running state of each task in real time.

그리고, 저장부(220)는 측정된 시작 시간 및 종료 시간을 각각의 태스크 별로 저장한다(S320). The storage unit 220 stores the measured start time and end time for each task (S320).

구체적으로, 저장부(220)는 태스크의 식별자인 태스크 아이디, 시작 시간 및 종료 시간을 인덱스로 하는 메모리 구조체에 복수의 태스크 각각의 태스크 아이디, 측정된 시작 시간 및 종료 시간을 저장한다. Specifically, the storage unit 220 stores a task ID, a measured start time, and an end time of each of a plurality of tasks in a memory structure having an index as a task ID, a start time, and an end time as identifiers of the task.

예를 들어, 저장부(220)는 도 4의 각 태스크의 러닝상태에 대한 시작 시간 및 종료 시간을 아래의 표 1과 같이 저장할 수 있다. For example, the storage unit 220 may store the start time and the end time of the running state of each task of FIG. 4 as shown in Table 1 below.

태스크 아이디Task ID 시작시간Start time 종료시간End time Task 1Task 1 16:21:06:00916: 21: 06: 009 16:21:58:01416: 21: 58: 014 Task 3Task 3 16:21:58:01416: 21: 58: 014 16:22:28:12416: 22: 28: 124 Task 2Task 2 16:22:28:12416: 22: 28: 124 16:23:14:04616: 23: 14: 046 Task 1Task 1 16:23:14:04616: 23: 14: 046 16:24:06:76616: 24: 06: 766 Task 3Task 3 16:24:06:76616: 24: 06: 766 16:24:57:32116: 24: 57: 321 ... ... ...

표 1에서는 저장부(220)가 밀리세컨드(ms) 단위로 태스크의 시작 시간 및 종료 시간을 저장하고 있으나, 본 발명의 실시예에 따르면, 저장부(220)는 밀리세컨드(ms)단위 뿐만 아니라 마이크로세컨드(μs)나 나노세컨드(ns) 단위로도 태스크의 시작 시간 및 종료 시간을 저장할 수 있다. Although the storage unit 220 stores the start time and the end time of the task in units of milliseconds (ms) in Table 1, according to the embodiment of the present invention, the storage unit 220 stores not only the unit of milliseconds (ms) The start and end times of a task can be stored in microseconds (μs) or nanoseconds (ns).

다음으로, 본 발명의 실시예에 따른 태스크 실행 시간 모니터링 장치(200)는 사용자 단말로부터 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신한다(S330). Next, the task execution time monitoring apparatus 200 according to the embodiment of the present invention receives an information output message requesting transmission of information about start time and end time from the user terminal (S330).

이때, 정보 출력 메시지가 요청하는 정보는 태스크의 시작 시간 및 종료 시간에 대한 정보 요청뿐만 아니라 태스크의 실행시간, 즉, 태스크의 러닝상태 지속 시간에 대한 정보도 포함한다. In this case, the information requested by the information output message includes not only the information on the start time and the end time of the task but also information on the execution time of the task, that is, the running state duration of the task.

그리고, 연산부(230)는 정보 출력 요청 메시지를 수신한 시점 이전에 측정된 시작 시간 및 종료 시간을 이용하여 복수의 태스크 각각의 실행 시간을 연산한다(S340). The operation unit 230 calculates the execution time of each of the plurality of tasks using the start time and the end time measured before the information output request message is received (S340).

예를 들어, 도 4에서와 같이, 본 발명의 실시예에 따른 태스크 실행 시간 모니터링 장치(200)가 Task 3의 두번째 러닝 상태에서 정보 출력 요청 메시지를 수신하였다고 가정한다. For example, as shown in FIG. 4, it is assumed that the task execution time monitoring apparatus 200 according to the embodiment of the present invention receives an information output request message in the second running state of Task 3.

그러면, 연산부(230)는 Task 1의 첫번째 및 두번째 러닝 상태의 실행 시간, Task 2의 러닝 상태의 실행 시간, 그리고 Task 3의 첫번째 러닝 상태의 실행 시간을 연산한다. 이때, 연산부(230)는 각 러닝상태의 종료 시간에서 시작 시간을 감산함으로써 각 태스크의 러닝 상태의 실행 시간을 연산할 수 있다. Then, the operation unit 230 calculates the execution time of the first and second running states of Task 1, the execution time of the running state of Task 2, and the execution time of the first running state of Task 3. At this time, the operation unit 230 can calculate the execution time of the running state of each task by subtracting the start time from the end time of each running state.

한편, Task 3의 두번째 러닝 상태가 종료되지 않았으므로, 연산부(230)는 이에 대한 실행 시간은 연산하지 않는다. On the other hand, since the second running state of Task 3 has not been terminated, the operation unit 230 does not calculate the execution time.

그러면, 출력부(240)는 정보 출력 메시지를 수신한 시점 이전에 저장된 시작 시간 및 종료 시간, 그리고 연산된 태스크의 실행 시간에 대한 정보를 사용자 단말로 출력한다(S350). Then, the output unit 240 outputs information on the start time and the end time stored before the reception of the information output message and the execution time of the calculated task to the user terminal (S350).

예를 들어, 도 4에서와 같이, 출력 요청 메시지를 수신하였다고 가정하면, 출력부(240)는 S340 단계에서 연산된 Task 1의 첫번째 및 두번째 러닝 상태의 실행 시간, Task 2의 러닝 상태의 실행 시간, 그리고 Task 3의 첫번째 러닝 상태의 실행 시간과 각 태스크의 시작 시간 및 종료 시간 정보를 사용자 단말로 일괄 출력한다. For example, assuming that an output request message is received as shown in FIG. 4, the output unit 240 outputs the execution time of the first and second running states of Task 1 calculated in step S340, the execution time of the running state of Task 2 , And the execution time of the first running state of Task 3, and the start time and end time information of each task are collectively output to the user terminal.

이때, 연산부(230)는 Task 3의 두번째 러닝 상태가 종료되지 않았으므로, Task 3의 두번째 러닝 상태에 대한 시작 시간은 사용자 단말로 출력하지 않는다. At this time, since the second running state of Task 3 has not ended, the operation unit 230 does not output the start time of the second running state of Task 3 to the user terminal.

한편, 출력부(240)는 시작 시간, 종료 시간 및 실행 시간에 대한 정보를 사용자 단말로 전송하기 위하여 인터럽트 서비스 루틴(Interrupt Service Routine, ISR)을 이용할 수 있다. Meanwhile, the output unit 240 may use an interrupt service routine (ISR) to transmit information on the start time, the end time, and the execution time to the user terminal.

인터럽트 서비스 루틴이란 인터럽트가 발생했을 때에 주행시키는 루틴으로서, 운영체제의 동작 중 외부로부터 명령이 입력되면 운영체제가 수행중인 동작으로 멈추고 입력된 명령에 따른 동작을 수행하는 것을 말한다. An interrupt service routine is a routine that is executed when an interrupt occurs. When an instruction is input from the outside during the operation of the operating system, the operating system stops at the operation being performed and performs an operation according to the inputted instruction.

본 발명의 실시예에 따르면, 인터럽트 서비스 루틴을 이용하여 시작 시간 등의 정보를 사용자 단말로 송출하는 경우, 출력부(240)는 출력 요청 메시지가 수신된 시점에서만 태스크를 중단하여 수신 시점 이전의 정보를 사용자 단말로 일괄 전송한다. 이에 따라, 본 발명의 실시예에 따른 태스크 실행시간 모니터링 장치는 출력 요청 메시지가 수신되기 전 각 태스크의 실행 시간 등을 전송하기 위한 태스크 러닝 상태 사이의 공백 시간을 발생시키지 않는다.According to the embodiment of the present invention, when the information such as the start time is transmitted to the user terminal using the interrupt service routine, the output unit 240 stops the task only when the output request message is received, To the user terminal. Accordingly, the task execution time monitoring apparatus according to the embodiment of the present invention does not generate a blank time between the task learning states for transmitting the execution time of each task before the output request message is received.

본 발명의 실시예에 따르면, 사용자로부터 태스크의 모니터링 정보 요청이 있는 경우에만 기 저장된 시작 시간 및 종료 시간을 일괄 제공하게 되므로, 각 태스크가 종료될 때마다 시작 시간 및 종료 시간을 사용자에게 제공하는 종래의 기술에 비해 정보 출력에 따른 시스템의 부하를 크게 줄일 수 있다. According to the embodiment of the present invention, since only the pre-stored start time and end time are collectively provided when there is a monitoring information request from the user, the start time and the end time are provided to the user every time the task is finished. The load of the system according to the information output can be greatly reduced.

특히, 종래에는 실시간 운영체제의 특성상 사용자에게 시작 시간 및 종료 시간을 제공하기 위하여 각 태스크가 종료될 때마다 다음 태스크를 시작하기 위한 딜레이 시간이 발생하였으나, 본 발명에서는 정보 요청이 있는 경우에만 시작 시간 및 종료 시간에 대한 정보를 출력하므로, 정보 전송에 따른 태스크 수행의 딜레이 시간을 크게 줄일 수 있어 실시간 운영체제의 성능을 향상시킬 수 있는 장점이 있다. In particular, due to the characteristics of a real-time operating system, a delay time for starting a next task occurs each time each task is terminated in order to provide a start time and an end time to the user. However, Since the information about the end time is output, the delay time of the task execution according to the information transfer can be greatly reduced, thereby improving the performance of the real-time operating system.

본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 다른 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의하여 정해져야 할 것이다.While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.

200 : 태스크 실행 시간 모니터링 장치 210 : 측정부
220 : 저장부 230 : 연산부
240 : 출력부
200: Task execution time monitoring apparatus 210:
220: storage unit 230:
240: Output section

Claims (8)

실시간 운영체제의 태스크 실행 시간 모니터링 장치를 이용한 실시간 운영체제의 태스크 실행 시간 모니터링 방법에 있어서,
복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정하는 단계,
상기 측정된 시작 시간 및 종료시간을 각각의 태스크 별로 저장하는 단계,
사용자 단말로부터 상기 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신하면, 기 정보 출력 요청 메시지를 수신한 시점 이전에 측정된 시작 시간 및 종료 시간을 이용하여 상기 복수의 태스크 각각의 실행 시간을 연산하는 단계, 그리고
상기 정보 출력 메시지를 수신한 시점 이전에 저장된 태스크들의 시작 시간 및 종료 시간에 대한 정보와 상기 연산된 태스크의 실행 시간에 대한 정보를 일괄적으로 사용자 단말로 출력하는 단계를 포함하며,
상기 시작 시간과 종료 시간을 측정하는 단계는,
상기 태스크가 러닝 상태가 되면 실시간 운영체제에 포함된 프리태스크 훅(PreTaskHook) 함수를 이용하여 상기 시작 시간을 측정하고, 상기 태스크가 러닝 상태를 벗어나면 실시간 운영체제에 포함된 포스트태스크 훅(PostTaskHook) 함수를 이용하여 상기 종료 시간을 측정하며,
상기 측정된 시작 시간 및 종료 시간을 저장하는 단계는,
태스크의 식별자인 태스크 아이디, 시작 시간 및 종료 시간을 인덱스로 하는 메모리 구조체에 상기 복수의 태스크 각각의 태스크 아이디, 상기 측정된 시작 시간 및 종료 시간을 저장하는 태스크 실행 시간 모니터링 방법.
A method for monitoring a task execution time of a real-time operating system using a task execution time monitoring apparatus of a real-time operating system,
Measuring a start time of the start time of the plurality of tasks and an end time of the end time,
Storing the measured start time and end time for each task,
When receiving an information output message requesting transmission of information on the start time and the end time from a user terminal, extracting a start time and an end time of each of the plurality of tasks Computing an execution time, and
And outputting information on the start time and the end time of the stored tasks and the information on the execution time of the calculated tasks to the user terminal collectively before the time when the information output message is received,
Wherein the measuring the start time and the end time comprises:
If the task is in a running state, the start time is measured using a PreTaskHook function included in the real-time operating system. If the task is out of the running state, a PostTaskHook function included in the real- The end time is measured by using the above-
Wherein the storing the measured start time and end time comprises:
Wherein the task ID, the measured start time, and the end time of each of the plurality of tasks are stored in a memory structure having an index as a task ID, a start time, and an end time as an identifier of the task.
삭제delete 삭제delete 삭제delete 복수의 태스크의 시작 시점의 시작 시간과 종료 시점의 종료 시간을 측정하는 측정부,
상기 측정된 시작 시간 및 종료시간을 각각의 태스크 별로 저장하는 저장부, 그리고
사용자 단말로부터 상기 시작 시간 및 종료 시간에 대한 정보 송신을 요청하는 정보 출력 메시지를 수신하면, 기 정보 출력 요청 메시지를 수신한 시점 이전에 측정된 시작 시간 및 종료 시간을 이용하여 상기 복수의 태스크 각각의 실행 시간을 연산하는 연산부, 그리고
상기 정보 출력 메시지를 수신한 시점 이전에 저장된 태스크들의 시작 시간 및 종료 시간에 대한 정보와 상기 연산된 태스크의 실행 시간에 대한 정보를 일괄적으로 사용자 단말로 출력하는 출력부를 포함하며,
상기 측정부는,
상기 태스크가 러닝 상태가 되면 실시간 운영체제에 포함된 프리태스크 훅(PreTaskHook) 함수를 이용하여 상기 시작 시간을 측정하고, 상기 태스크가 러닝 상태를 벗어나면 실시간 운영체제에 포함된 포스트태스크 훅(PostTaskHook) 함수를 이용하여 상기 종료 시간을 측정하며,
상기 저장부는,
태스크의 식별자인 태스크 아이디, 시작 시간 및 종료 시간을 인덱스로 하는 메모리 구조체에 상기 복수의 태스크 각각의 태스크 아이디, 상기 측정된 시작 시간 및 종료 시간을 저장하는 태스크 실행 시간 모니터링 장치.
A measuring unit for measuring a start time of the start time of the plurality of tasks and an end time of the end time,
A storage unit for storing the measured start time and end time for each task, and
When receiving an information output message requesting transmission of information on the start time and the end time from a user terminal, extracting a start time and an end time of each of the plurality of tasks An operation unit for calculating an execution time, and
And an output unit for collectively outputting information on a start time and an end time of tasks stored before the time when the information output message is received and information on execution times of the calculated tasks to the user terminal,
Wherein the measuring unit comprises:
If the task is in a running state, the start time is measured using a PreTaskHook function included in the real-time operating system. If the task is out of the running state, a PostTaskHook function included in the real- The end time is measured by using the above-
Wherein,
And stores the task ID, the measured start time, and the end time of each of the plurality of tasks in a memory structure having an index as a task ID, a start time, and an end time as identifiers of the task.
삭제delete 삭제delete 삭제delete
KR1020160123117A 2016-09-26 2016-09-26 Apparatus for monitoring run-time of real time operating system and thereof KR101928349B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160123117A KR101928349B1 (en) 2016-09-26 2016-09-26 Apparatus for monitoring run-time of real time operating system and thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160123117A KR101928349B1 (en) 2016-09-26 2016-09-26 Apparatus for monitoring run-time of real time operating system and thereof

Publications (2)

Publication Number Publication Date
KR20180033761A KR20180033761A (en) 2018-04-04
KR101928349B1 true KR101928349B1 (en) 2018-12-12

Family

ID=61975268

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160123117A KR101928349B1 (en) 2016-09-26 2016-09-26 Apparatus for monitoring run-time of real time operating system and thereof

Country Status (1)

Country Link
KR (1) KR101928349B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220085365A (en) 2020-12-15 2022-06-22 현대오토에버 주식회사 Apparatus for monitoring task execution time and operating method of node

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475374B (en) * 2020-03-17 2023-11-10 创驱(上海)新能源科技有限公司 Time-consuming monitoring method for complex driving task based on AUTOSAR architecture

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101390267B1 (en) 2012-11-09 2014-04-30 재단법인대구경북과학기술원 Method for monitoring of os task and apparatus thereof
KR101554555B1 (en) 2009-10-01 2015-09-21 콘티넨탈 오토모티브 시스템 주식회사 Calculation system for cpu load in real time operation system and method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100820789B1 (en) * 2001-04-06 2008-04-10 엘지전자 주식회사 System based on real time and its monitoring method
KR101203099B1 (en) * 2010-12-27 2012-11-20 재단법인대구경북과학기술원 Method for monitoring running time of OS task framework and apparatus thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101554555B1 (en) 2009-10-01 2015-09-21 콘티넨탈 오토모티브 시스템 주식회사 Calculation system for cpu load in real time operation system and method thereof
KR101390267B1 (en) 2012-11-09 2014-04-30 재단법인대구경북과학기술원 Method for monitoring of os task and apparatus thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220085365A (en) 2020-12-15 2022-06-22 현대오토에버 주식회사 Apparatus for monitoring task execution time and operating method of node

Also Published As

Publication number Publication date
KR20180033761A (en) 2018-04-04

Similar Documents

Publication Publication Date Title
JP5318139B2 (en) Control device and program
US9853906B2 (en) Network prioritization based on node-level attributes
KR101928349B1 (en) Apparatus for monitoring run-time of real time operating system and thereof
CN106844055B (en) Task execution method and device
US20110246596A1 (en) Load-aware method of optimizing command execution in a cloud environment
JP2017531789A (en) Detection distance calibration method, apparatus, and device
CN110990136B (en) Task processing method and task scheduler
JP6398329B2 (en) Control device, control method and program
CN107294911B (en) Data packet monitoring method and device, remote procedure call system and equipment
US10437757B2 (en) Determine priority of requests using request signals and priority signals at an arbitration node
CN110784336A (en) Multi-device intelligent timing delay scene setting method and system based on Internet of things
JP4449929B2 (en) Transaction apparatus, delay fault detection apparatus and method, and program
CN105022333A (en) PLC system having a plurality of CPU modules and control method thereof
CN110502343B (en) Resource allocation method, system, device and computer readable storage medium
CN112583617B (en) Fault determination method, server, control terminal and storage medium
WO2019169727A1 (en) Network traffic test method and apparatus, device, and computer-readable storage medium
CN110941404B (en) Shared printing method and system of laser printer
CN109002044B (en) Robot queuing method and device, background server and storage medium
JPWO2013129061A1 (en) Simultaneous connection number control system, simultaneous connection number control server, simultaneous connection number control method, and simultaneous connection number control program
US8719482B2 (en) Electronic device with bus sharing function
JP2015225578A5 (en) Information processing apparatus, information processing system, information processing method, and program
JP6554011B2 (en) Timeout time setting device and timeout time setting method
JP6479045B2 (en) Control method and control device
CN114610575B (en) Method, apparatus, device and medium for calculating updated peak value of branch
CN112433835B (en) Interrupt processing method and device based on Linux system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)