KR20120064553A - Method for measuring real-time performance in linux-based embedded system and the system - Google Patents
Method for measuring real-time performance in linux-based embedded system and the system Download PDFInfo
- Publication number
- KR20120064553A KR20120064553A KR1020100125832A KR20100125832A KR20120064553A KR 20120064553 A KR20120064553 A KR 20120064553A KR 1020100125832 A KR1020100125832 A KR 1020100125832A KR 20100125832 A KR20100125832 A KR 20100125832A KR 20120064553 A KR20120064553 A KR 20120064553A
- Authority
- KR
- South Korea
- Prior art keywords
- time
- interrupt
- real
- task
- value
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
The present invention relates to a real-time performance measurement method and a system in the Linux-based embedded system.
Recently, the demand for Linux-based smartphones such as Android is exploding, and the demand for Linux-based embedded systems is rapidly expanding in various fields such as IPTV set-top boxes, MIDs, and industrial devices. Among the services using the Linux-based embedded system, the real-time performance is required to be good in various services such as video playback, call function, and control through the Internet.
Due to the services that require good real-time performance of Linux-based embedded systems, technologies that support real-time performance for platforms for embedded systems are required. Therefore, in order to develop a technology supporting the real-time performance and apply it to an embedded system, a real-time performance measurement technique for a Linux-based embedded system is required.
In this regard, the real-time performance measurement technique for Linux-based embedded systems, which is mainly used, has not been widely used in development because the interval to measure performance is somewhat unclear, the measurement results are inaccurate and not intuitive.
Accordingly, the present invention is to solve the above-mentioned problems and to propose a new method, and an object of the present invention is to clarify a real-time performance measurement interval, and to accurately measure real-time performance in a Linux-based embedded system. It provides a real-time performance measurement method and system.
According to an aspect of the present invention for achieving the above object, a Linux-based embedded system is configured to operate in kernel mode and generates a real time clock (RTC) that generates periodic interrupts, and is configured to operate in kernel mode, the RTC An interrupt handler configured to receive an interrupt from the interrupt, write a system counter value at the time the interrupt is received as an interrupt occurrence value, and wake up a task corresponding to the interrupt; When a task wakes up, it is configured to operate in user mode, with a scheduler that performs scheduling so that the task with the highest priority executes preferentially and generates a task execution signal for executing the task, from the interrupt handler The interrupt foot Receives a starting point value, when receiving the task execution signal from the scheduler, records the system counter value at the received starting point as a task starting starting point value and subtracts an interrupt occurrence starting point value from the task starting starting point value It includes a real-time performance measurement device to calculate the.
According to another aspect of the present invention, a method for measuring real-time performance in a Linux-based embedded system includes generating a periodic interrupt by a Real Time Clock (RTC) configured to operate in kernel mode, and configured to operate in kernel mode. Receiving an interrupt from the RTC by an interrupt handler, recording a system counter value at the time the interrupt is received as an interrupt occurrence time value, and waking up the task corresponding to the interrupt by the interrupt handler; And scheduling by the scheduler configured to operate in kernel mode so that, when the task corresponding to the interrupt wakes up, the task having the highest priority is preferentially executed; A task to run it Generating a signal, receiving, by the real time performance measuring device configured to operate in a user mode, the interrupt occurrence time value from the interrupt handler, and receiving the task execution signal from the scheduler by the real time performance measuring device. Calculating a preemption delay time by subtracting an interrupt occurrence time point value from the task start time point value by the real time performance measuring apparatus by recording a system counter value at the received time point as a task start time point when receiving; It includes.
According to another aspect of the present invention, a method for measuring real-time performance in a real-time performance measuring device is set such that a real time clock (RTC) configured to operate in the kernel mode by the real-time performance measuring device periodically generates an interrupt. Receiving an interrupt occurrence time value from an interrupt handler configured to operate in kernel mode, and receiving a task execution signal for executing a task corresponding to the interrupt from a scheduler configured to operate in kernel mode; Recording a system counter value at the time point of receiving the task execution signal from the scheduler as a task start time point value, and calculating a preemption delay time by subtracting the interrupt occurrence time point value from the task start time point value; do.
According to the present invention, a delay time corresponding to a clear real-time performance measurement interval can be precisely measured using a hardware system counter than a real-time performance measurement of a conventional Linux-based embedded system, and is more user intuitive than the conventional methods. The advantage is that you get the result of time.
In addition, the apparatus and method for measuring real-time performance in the Linux-based embedded system according to the present invention can be utilized as a performance measurement tool for improving the real-time performance of Linux for embedded systems.
1 is a diagram schematically showing a Linux-based embedded system including a real-time performance measurement apparatus according to the present invention.
2 is a diagram showing a real-time performance measurement interval according to the present invention.
3 is a diagram illustrating a process of measuring a preemption delay time according to an embodiment of the present invention.
4 is a block diagram of a real-time performance measurement apparatus according to an embodiment of the present invention.
5 is a flowchart illustrating a real-time performance measurement method according to an embodiment of the present invention.
As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.
The terms first, second, A, B, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.
When a component is referred to as being "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that other components may be present in between. Should be. On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.
The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.
Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in the commonly used dictionaries should be construed as having meanings consistent with the meanings in the context of the related art and shall not be construed in ideal or excessively formal meanings unless expressly defined in this application. Do not.
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
1 is a diagram schematically showing a Linux-based embedded system including a real-time performance measurement apparatus according to the present invention.
In the present invention, the meaning of the real-time performance measurement is to measure which event (RTC interrupt in this specification) can drive a task corresponding to the event within a certain delay time.
In general, task preemption delay is a task having a high priority by an interrupt when a interrupt occurs when a task having a higher priority than a task currently being performed due to a hardware interrupt occurs. Means the time until it starts to run.
However, a technique for measuring such task preemption delay is not currently explicitly defined. In addition, the task preemption delay time should be measured from the time when the hardware interrupt occurs, and the prior art does not define how to specify this time point.
The
To this end, the real-time
The
Kernel mode components include an
The
The
In accordance with the present invention, the
According to the present invention, the
2 is a diagram showing a real-time performance measurement interval according to the present invention.
Referring to FIG. 2, the preemption delay time includes a hardware interrupt
The hardware interrupt
Originally, the preemption delay time corresponds to the time from the time point 410 to the time point 460. In other words, the part to be measured in time is the section from point 410 to point 460. However, the hardware interrupt
However, this hardware interrupt
As described above, when the interrupt for the task is generated to measure the real-time performance according to the present invention, the
To this end, the real-time
3 is a diagram illustrating a process of measuring a preemption delay time according to an embodiment of the present invention.
1 and 3, the
The interrupt
In this case, the high precision system counters available in both kernel mode and user mode are used. As is known in the art, embedded systems include a system clock. The system clock resides in the processor so that all the circuits and devices that operate within the computer system can work at the same time. It is a device that generates pulses at regular intervals to synchronize. The system counter can provide accurate time to the system by counting these clock pulses.
Therefore, the interrupt
Next, when the task corresponding to the interrupt wakes up by the interrupt
The
The process of Figure 3 is to measure one preemption delay time, according to an embodiment of the present invention to measure the average of a plurality of preemption delay time, and accordingly, the average of the preemption delay time is a real-time performance measurement value Used as The configuration of a real-time performance measuring apparatus operating as described above will be described with reference to FIG. 4.
4 is a block diagram of a real-time performance measurement apparatus according to an embodiment of the present invention. The real-time performance measuring device may be implemented in hardware or in software.
The real-time
The input /
The preprocessor 120 performs a memory lock. A memory lock prevents the task from being ejected or imported to memory so that tasks cannot be exported from memory and then fetched back to the hard disk. Specifically, since the amount of memory in the system is not infinite, the tasks are in memory and automatically exported to the hard disk if needed by the
The preprocessor 120 also gives the highest priority to the task for performance measurement. Specifically, the task for real-time performance measurement has the highest priority so that the task for real-time performance measurement is performed before other tasks. This is because if there is a higher priority task in the system than the task for real-time performance measurement, the scheduler in the system may show lower performance since the task for real-time performance measurement is scheduled for later execution.
In addition, the preprocessor 120 performs a measurement time calibration. As described above, the interrupt occurrence time point value and the task start time point value are obtained from counter values provided by the system counter. Accordingly, the preprocessor 120 converts the measurement unit into a unit readable by the user, for example, μsec, so that the user can intuitively recognize the measurement result.
In addition, the preprocessor 120 opens, sets and runs the periodic RTC. As mentioned above, the
The
The
The
5 is a flowchart illustrating a real-time performance measurement method according to an embodiment of the present invention.
Referring to FIG. 5, the real-time performance measuring device performs a memory lock in
Next, the apparatus for real-time performance measurement gives the highest priority to the task for performance measurement in
The real-time performance measuring device then sets up and executes the periodic RTC in
After executing the RTC, the real-time performance measuring apparatus determines whether an interrupt generation time point A is received from the interrupt handler in
In
The real-time performance measuring apparatus then calculates the preemption delay time by subtracting the interrupt occurrence time value A from the task start time value B in step 616.
The real-time performance measuring device performs statistical processing on the currently calculated preemption delay time and at least one or more preemption delay times previously calculated. For example, the real-time performance measuring apparatus may average the plurality of delay times and output the average value as the real-time performance measurement.
In
According to the present invention, it is possible to precisely measure the delay time corresponding to the clear real-time performance measurement interval using the hardware system counter than the real-time performance measurement of the existing Linux-based embedded system, and is much more user intuitive than the various methods. There is an advantage that the result of preemption delay time can be obtained.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that
100: real-time performance measurement device 200: system interface
310: interrupt handler 320: scheduler
330: device driver 332: network driver
334: Display driver 336: Real-Time Clock (RTC)
415: hardware interrupt delay time 425: interrupt handler interval
435: Scheduler delay time 445: Scheduling delay time
455: mode switch delay time
Claims (17)
Real Time Clock (RTC), which is configured to run in kernel mode and generates periodic interrupts,
An interrupt handler configured to operate in a kernel mode, receiving an interrupt from the RTC, recording a system counter value at the point of time at which the interrupt is received as an interrupt occurrence point value, and waking up a task corresponding to the interrupt;
A scheduler configured to operate in kernel mode, when a task corresponding to the interrupt wakes up, schedules the task having the highest priority to be executed first, and generates a task execution signal for executing the task;
Receive the interrupt occurrence time value from the interrupt handler, when receiving the task execution signal from the scheduler, record a system counter value at the received time point as a task start time value, and Linux-based embedded system including a real-time performance measurement device that calculates the preemption delay by subtracting the interrupt occurrence time value from the task start time value.
A preprocessor configured to periodically set the RTC to generate an interrupt;
A counter reading unit for reading a counter value of a system counter and outputting the counter value as a task starting time point at the time when the task execution signal is received from the scheduler;
And a delay time calculating unit configured to receive an interrupt occurrence time point value from the interrupt handler and calculate a preemption delay time by subtracting the interrupt occurrence time point value from the task start time point value when the task start time point value is provided from the counter reading unit. Featured Linux-based embedded system.
Generating a periodic interrupt by a Real Time Clock (RTC) configured to operate in kernel mode,
Receiving, by an interrupt handler configured to operate in kernel mode, an interrupt from the RTC, recording a system counter value at the time the interrupt was received as an interrupt occurrence time value,
Waking up the task corresponding to the interrupt by the interrupt handler;
Scheduling by the scheduler configured to operate in kernel mode so that when the task corresponding to the interrupt wakes up, the task having the fastest priority is executed first;
Generating a task execution signal for executing the task by the scheduler;
Receiving, by the real time performance measurement apparatus, configured to operate in a user mode, the interrupt occurrence time point value from the interrupt handler;
Recording the system counter value at the received time point as a task start time point value when the task execution signal is received from the scheduler by the real-time performance measuring device;
And calculating a preemption delay time by subtracting an interrupt occurrence time point value from the task start time point value by the real-time performance measurement device.
And outputting the average value as a real-time performance measurement value by the real-time performance measurement device.
Setting a real time clock (RTC) configured to operate in the kernel mode by the real-time performance measuring device to generate an interrupt periodically;
Receiving an interrupt occurrence time value from an interrupt handler configured to operate in kernel mode,
Receiving a task execution signal for executing a task corresponding to the interrupt from a scheduler configured to operate in kernel mode;
Recording a system counter value at the time point of receiving the task execution signal from the scheduler as a task start time point value;
And calculating a preemption delay time by subtracting the interrupt occurrence time value from the task start time value.
And outputting said average value as a real-time performance measurement.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100125832A KR20120064553A (en) | 2010-12-09 | 2010-12-09 | Method for measuring real-time performance in linux-based embedded system and the system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100125832A KR20120064553A (en) | 2010-12-09 | 2010-12-09 | Method for measuring real-time performance in linux-based embedded system and the system |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20120064553A true KR20120064553A (en) | 2012-06-19 |
Family
ID=46684640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020100125832A KR20120064553A (en) | 2010-12-09 | 2010-12-09 | Method for measuring real-time performance in linux-based embedded system and the system |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20120064553A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106155865A (en) * | 2016-08-01 | 2016-11-23 | 浪潮(北京)电子信息产业有限公司 | A kind of CPI acquisition methods, system and process performance judgement system in real time |
-
2010
- 2010-12-09 KR KR1020100125832A patent/KR20120064553A/en not_active Application Discontinuation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106155865A (en) * | 2016-08-01 | 2016-11-23 | 浪潮(北京)电子信息产业有限公司 | A kind of CPI acquisition methods, system and process performance judgement system in real time |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8402463B2 (en) | Hardware threads processor core utilization | |
US20150082325A1 (en) | Apparatuses and methods for generating and tracing event codes | |
US9400734B2 (en) | Apparatuses and methods for generating event codes including event source | |
JP4840455B2 (en) | Field control system | |
CN100338581C (en) | Operating system-independent method and system of determining CPU utilization | |
Neukirchner et al. | Monitoring arbitrary activation patterns in real-time systems | |
US11392475B2 (en) | Job power predicting method and information processing apparatus | |
JP2007026095A (en) | Parallel arithmetic operation device | |
US11249512B2 (en) | Frequency execution monitoring in a real-time embedded system | |
US9600023B2 (en) | Method and data processing unit for providing a timestamp | |
de Oliveira et al. | Operating system noise in the linux kernel | |
KR20120064553A (en) | Method for measuring real-time performance in linux-based embedded system and the system | |
US10819896B1 (en) | Computer readable recording medium can perform image sensing system control method and image sensing system | |
Emde | Long-term monitoring of apparent latency in PREEMPT RT Linux realtime systems | |
US20160299787A1 (en) | System, method and managing device | |
US8160845B2 (en) | Method for emulating operating system jitter | |
KR101674324B1 (en) | Task scheduling device and method for real-time control applications | |
JP4996623B2 (en) | Detection apparatus, program, and detection method | |
CN114071127A (en) | Live video delay testing method and device, storage medium and electronic equipment | |
WO2009026361A2 (en) | Method, system and apparatus for measuring an idle value of a central processing unit | |
CN112882857A (en) | Performance problem positioning method and device, electronic equipment and storage medium | |
Lakhani et al. | Applying design patterns to improve the reliability of embedded systems through a process of architecture migration | |
Fujimoto et al. | PWU: Pre-Wakeup for CPU Idle to Reduce Latency and Power Consumption | |
CN115826731B (en) | Sleep control method and device, storage medium and computing equipment | |
CN105630714B (en) | Interface resource analytical equipment and its method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WITN | Withdrawal due to no request for examination |