KR20190132097A - Method and apparatus of real-time scheduling for industrial robot system - Google Patents

Method and apparatus of real-time scheduling for industrial robot system Download PDF

Info

Publication number
KR20190132097A
KR20190132097A KR1020180057344A KR20180057344A KR20190132097A KR 20190132097 A KR20190132097 A KR 20190132097A KR 1020180057344 A KR1020180057344 A KR 1020180057344A KR 20180057344 A KR20180057344 A KR 20180057344A KR 20190132097 A KR20190132097 A KR 20190132097A
Authority
KR
South Korea
Prior art keywords
module
type
execution
real time
scheduling
Prior art date
Application number
KR1020180057344A
Other languages
Korean (ko)
Other versions
KR102149171B1 (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 KR1020180057344A priority Critical patent/KR102149171B1/en
Publication of KR20190132097A publication Critical patent/KR20190132097A/en
Application granted granted Critical
Publication of KR102149171B1 publication Critical patent/KR102149171B1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • G05B19/41865Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by job scheduling, process planning, material flow
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25419Scheduling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

Disclosed are a real-time scheduling method of an industrial robot and an apparatus thereof. According to one embodiment of the present invention, the real-time scheduling method comprises the steps of: receiving information on a process and a thread; using the information and generating a module file; extracting the information from the module file and generating a scheduling table; and executing the process and the thread based on the scheduling table.

Description

산업용 로봇 시스템의 실시간 스케줄링 방법 및 장치{METHOD AND APPARATUS OF REAL-TIME SCHEDULING FOR INDUSTRIAL ROBOT SYSTEM}Real-time scheduling method and apparatus of industrial robot system {METHOD AND APPARATUS OF REAL-TIME SCHEDULING FOR INDUSTRIAL ROBOT SYSTEM}

아래 실시예들은 산업용 로봇 시스템의 실시간 스케줄링 방법 및 장치에 관한 것이다.The following embodiments are related to a real time scheduling method and apparatus of an industrial robot system.

최근에는 다양한 형태의 산업용 로봇이 존재하는데, 주로 조립 및 용접, 이송 공정에 사용되는 경우가 대부분이다. 그러나 스마트 공장이 로봇 기반으로 진화하면서, 로봇의 역할이 강화되고 있다. 즉 스마트 공장에서는 모바일 매니퓰레이터(mobile manipulator)가 공정 시스템을 연결시키고, 공정 라인들을 재구성 가능하게 한다. 즉 산업용 로봇이 다른 입출력 모듈들을 제어하는 산업용 로봇 시스템으로 변화하고 있다. Recently, there are various types of industrial robots, which are mostly used for assembly, welding and transfer processes. However, as smart factories evolve to robotics, the role of robots is strengthening. In a smart factory, a mobile manipulator connects the process system and allows the process lines to be reconfigured. In other words, the industrial robot is changing to an industrial robot system that controls other input / output modules.

이에 최근의 스마트 공장 시스템은 인간-로봇 협업을 필요로하고 있다. 이러한 태스크를 위해서는 공정의 변화에 따라 유연하게 대응할 수 있는 로봇 시스템의 개발이 필요하다.In recent years, smart factory systems require human-robot collaboration. This task requires the development of a robotic system that can flexibly respond to changes in the process.

특히 이러한 변화의 중심에는 IT 기술이 존재하고 있다. 그러나 기존 산업용 로봇 기술로는 빠르게 변하는 IT 기술을 접목하는 것이 어렵다.In particular, IT technology is at the center of these changes. However, it is difficult to combine the rapidly changing IT technology with existing industrial robot technology.

이에 따라 미들웨어 기술이 로봇에 사용되기 시작하였다. 그러나 미들웨어 기술은 로봇에 활용되는 다양한 SW 모듈들을 쉽게 활용하는데 있어서 어려움이 많아, 특정 SW(Software) 모듈만을 활용하고 있다.Accordingly, middleware technology has begun to be used in robots. However, middleware technology has difficulty in easily utilizing various SW modules used for robots, and utilizes only specific SW (Software) modules.

이러한 특정 SW 모듈은 주기적으로 수행하는 모션/휠 제어 명령 생성 모듈, 키네틱 및 인버스 키네틱 모듈(kinematics and inverse kinematics module) 등이 있다. 현 로봇 미들웨어들은 이러한 모듈들을, 엄밀하게 말하면, 주기적으로(periodically) 수행시키는 것이 아니고 순환적으로(cyclically) 수행시킨다고 말할 수 있다.This particular SW module includes a motion / wheel control command generation module that performs periodically, and kinematics and inverse kinematics modules. Current robotic middleware can be said to perform these modules cyclically, rather than performing them cyclically.

즉, 주기가 설정되면 해당 모듈이 수행되고 나머지 시간동안 슬립(sleep)을 한 후 다시 웨이크업(wakeup) 하여 해당 모듈이 수행되는 형태로 동작한다. 이 경우 사이클 시간(cyclic time)이 주기와 같이 정확하게 동작하지 않고 약간 슬라이딩(sliding)하는 문제가 있다. 이러한 시간이 누적이 되면 주기들이 사라지는 경우가 발생한다.That is, when the period is set, the corresponding module is executed, sleeps for the rest of the time, wakes up again, and operates in the form of executing the corresponding module. In this case, there is a problem in that the cyclic time does not operate exactly as a cycle but slides slightly. When this time accumulates, the periods disappear.

현존하는 로봇용 미들웨어에서 이벤트가 처리되는 경우는 거의 없다. 물론 SW 모듈이 이벤트를 전송하여 해당 이벤트를 처리하는 경우는 존재하지만, 이 경우는 실시간으로 처리하지는 않는다.Few events are processed in existing robot middleware. Of course, there is a case where the SW module sends an event to process the event, but this case is not processed in real time.

여기서 사이클 시간(cycle time)과 주기(period)는 구분되어야 하는 데, 사이클 시간은 일정시간마다 반복되는 것이지만 약간의 시간 지연이 발생하더라도 관계없이 해당 사이클 시간을 소요한다. 그러나 주기(period)는 사이클 시간과 유사하지만 시간지연이 발생하면 다음에는 지연 시간만큼 감소하여 관련 프로세스/스레드의 수행 시간을 관리한다.In this case, the cycle time and period should be distinguished. The cycle time is repeated every predetermined time, but the cycle time is taken regardless of a slight time delay. However, a period is similar to a cycle time, but when a time delay occurs, it is then reduced by a delay time to manage the execution time of the related process / thread.

예를 들면 사이클 시간과 주기가 T라는 시간을 반복한다고 하면, 사이클 시간에서 해당 사이클에서 수행을 T+dT1만큼 수행되고 다음 사이클에서는 T-dt1만큼 수행되었다면 3번째 cycle의 시작 시간은 2T+dt1이 되어 실제로 2T 시각에 3번째 cycle이 실행되지 않을 수 있다.For example, if the cycle time and period repeats the time T, if the cycle time is performed by T + dT1 and the next cycle by T-dt1, the start time of the third cycle is 2T + dt1. In fact, the 3rd cycle may not be executed at 2T time.

그러나 주기의 경우, 해당 주기에서 T+dT1만큼 수행되었다면 다음 주기에서는 T-dT1보다 작게 수행되어 3번째 사이클의 시작 시간은 2T 가 되어 주기를 지킬 수 있다. 이렇게 사이클에서는 수행 시간의 오버 타임(over time)이 누적되어 전체적으로 보면 많은 사이클들이 사라져 실제로 시스템 제어에 있어서 문제가 될 수 있다. 그러나 주기는 해당 주기를 엄격하게 유지하므로 주기가 사라지는 것은 없다.However, in the case of a cycle, if T + dT1 is performed in the corresponding cycle, the cycle is performed smaller than T-dT1 in the next cycle, so that the start time of the third cycle is 2T, thereby keeping the cycle. In this cycle, over time of execution time accumulates, and as a whole, many cycles disappear, which may actually be a problem in system control. However, the cycle keeps the cycle strictly, so the cycle never disappears.

대부분의 로봇 SW들은 주기적으로 동작하면서 이벤트에 따라 관련된 동작을 처리하게 해야 하는데, 이러한 작업들을 로봇 미들웨어에서 해주면 사용자들이 매우 편리하게 SW 모듈들을 활용할 수 있다. Most robot SWs have to operate periodically and process related actions according to events. If these tasks are performed in robot middleware, users can use SW modules very conveniently.

산업용 로봇에 활용되는 미들웨어로 ROS(Robot Operating System)가 산업용 로봇에 맞게 적용되었으며, OPRoS(Open Platform for Robotic Services)와 openRTM(open Robot Technology Middleware)도 산업용 로봇에 적용되었다.ROS (Robot Operating System) was applied to industrial robots as middleware used for industrial robots, and OPRoS (Open Platform for Robotic Services) and openRTM (open Robot Technology Middleware) were also applied to industrial robots.

그러나 이러한 미들웨어들은 앞에서 언급한 주기성과 이벤트 처리 문제들 외에 다른 문제들이 존재한다. ROS는 주기 프로세스의 경우에 주기에 해당 프로세스 실행시간을 빼고 남은 시간 동안 슬립하는 형태로 수행되고 있고, OPRoS와 openRTM도 유사한 방법을 사용하고 있다.However, these middlewares have other problems besides the periodicity and event handling problems mentioned above. In the case of a cyclic process, the ROS process is performed in the form of slipping the remaining time after subtracting the execution time of the process, and OPRoS and openRTM use a similar method.

그리고 주기에 사용되는 SW 모듈은 ROS는 프로세스를, OPRoS와 openRTM은 스레드를 사용한다. 즉 로봇 SW 모듈로는 프로세스와 스레드(thread) 형이 사용될 수 있기 때문에 스케줄러는 프로세스형과 스레드형의 SW 모듈을 지원해야 한다. 그러나 현 로봇 미들웨어는 프로세스와 스레드를 동시에 지원하지 못하는 단점이 있다. The SW module used in the cycle uses ROS for processes and OPRoS and openRTM for threads. In other words, process and thread type can be used as the robot SW module, so the scheduler must support SW type of process type and thread type. However, the current robot middleware has a drawback that it cannot support processes and threads at the same time.

실제로 프로세스 형은 사용자 관점에서 사용하기가 편하고 스레드는 데이터의 관리와 프로세스보다는 실행시간 오버헤드가 적다는 장점이 있다. 그러나 스레드는 오류가 생기면 관련 스레드를 모두 중지시켜야 하는 단점이 있지만 프로세스는 그 프로세스만 중지시킬 수 있다. 따라서 해당 응용에 따라 알맞게 혼합하여 사용하면 편리하다. 특히 프로세스 형은 레가시(legacy) SW를 동작시킬 수 있기 때문에 더 유용하다.In practice, the process type is easy to use from the user's point of view, and threads have less run-time overhead than data management and processes. However, a thread has the disadvantage of stopping all associated threads when an error occurs, but a process can only stop that process. Therefore, it is convenient to mix and use according to the application. In particular, process types are more useful because they can run legacy software.

스레드 형은 하나의 동작 스레드가 관련된 SW 모듈의 함수를 호출하여 수행하는 형태를 말한다. 즉 SW 모듈이 개별적으로 스레드가 되어 동작되지 않는다. 이 경우, 스레드를 만들고 스레드간 스위칭하는데 오버헤드가 존재할 수 있다. 실제로 많은 상용을 포함한 실시간 운영체제에서 엄격한 주기적(periodic) 수행과 스포라딕 수행을 할 수 있도록 하였다. The thread type refers to a form in which one working thread calls a related SW module function to execute. In other words, SW modules are individually threaded and do not work. In this case, there may be overhead in creating threads and switching between threads. In fact, it enables strict periodic and sporadic performance in real-time operating systems, including many commercials.

실제로 이러한 동작들을 원하는 형태는 프로세스 형(process type)과 스레드 형(thread type)의 2가지 종류가 존재한다. 일반 운영체제에서는 프로세스와 스레드 형 2개를 동시에 지원하지만 실시간성을 지원하지 않는 단점이 있다. 제노마이(Xenomai)와 QNX와 같은 실시간 운영체제는 스레드 형만을 지원하고 있다. In fact, there are two types of types that want these operations: process type and thread type. The general operating system supports two processes and two thread types at the same time, but does not support real time. Real-time operating systems such as Xenomai and QNX only support thread types.

즉, 대부분의 실시간 운영체제는 주기성을 엄격하게 맞추기 위하여 주기성과 스포라딕 성질을 가진 프로세스 형을 지원하지 않고 있다. 또한 다른 문제는 스레드 형을 지원하더라도 사용하는 API가 다르기 때문에 소프트웨어의 이식성이 거의 없다. 예를 들면 제노마이 혹은 QNX에서 개발한 SW 들을 QNX혹은 제노마이로 각각 이식하기 위해서 표준 인터페이스인POSIX를 사용하더라도 해당 운영체제의 특별한 기능과 관련된 프로그램 내용(OS와의 연결부분)을 모두 수정하여야 하는 단점이 존재한다. That is, most real-time operating systems do not support process types with periodicity and sporadic properties in order to strictly meet periodicity. Another problem is that even though the thread type is supported, there is little portability of the software because the API used is different. For example, even if you use the standard interface POSIX for porting SWs developed by Xenomai or QNX to QNX or Xenomai, respectively, you need to modify all program contents related to the special functions of the operating system. exist.

따라서 이러한 단점을 보완하기 위하여 미들웨어를 사용하고 있지만 현존하는 미들웨어는 이식성을 높이기 위하여 주기성보다는 순환성을 중심으로 동작하고 있고, 프로세스 혹은 스레드 한 종류만 지원하고 있으며 스포라딕 이벤트 처리도 많이 약하다. 사실 주기성은 타이머와 연결되어 있고, 순환성은 운영체제의 기본인 슬립(sleep) 혹은 웨이커업(wake up)기능을 활용하고 있기 때문에 이식성이 좋은 면이 있다. Therefore, the middleware is used to compensate for these shortcomings. However, existing middleware operates around circularity rather than periodicity to increase portability, supports only one type of process or thread, and is very weak in sporadic event processing. In fact, periodicity is connected to a timer, and circularity is portable because it uses the operating system's basic sleep or wake up function.

실제로 산업용 시스템에서는 엄격한 주기적 실행(periodic execution)와 스포라딕 이벤트(sporadic event)를 많이 활용하고 있기 때문에 이를 대응해야 하며, 응용에 따라서는 스레드와 프로세스 형을 동시에 혹은 한 형태로 사용할 수 있으며, 다양한 운영체제를 지원하여 소프트웨어들의 이식성을 보장하여야 하지만, 이러한 요구조건들을 완전히 제공하여 주는 미들웨어 혹은 운영 체제가 없다. In fact, industrial systems use strict periodic execution and sporadic events, so they must respond to them. Depending on the application, threads and process types can be used simultaneously or in one form. It must support software to ensure portability of software, but there is no middleware or operating system that fully provides these requirements.

제노마이와 QNX는 스레드를 주기성과 같이 실시간성을 지원하지만 프로세스를 지원하지 못하지만 리눅스와 윈도우는 프로세스와 스레드를 모두 지원하지만 실시간성을 지원하지 못하는 단점이 있다. 그리고 직접적으로 운영체제를 활용하는 경우에는 사용하는 API가 달라서 다른 운영체제로 이식할 때는 관련 모든 내용을 변경해야 하는 단점이 있다. Xenomy and QNX support threads for real-time like periodicity, but they do not support processes, but Linux and Windows support both processes and threads, but they do not support real-time. In addition, when using the operating system directly, the API used is different, and when porting to another operating system, all related contents need to be changed.

따라서 이러한 단점을 없애기 위해서 가능한 많은 부분을 변경하지 않도록 하면서 주기성과 스포라딕 이벤트를 처리하는 프로세스 형과 스레드 형을 동시에 지원하여 주며 실시간 운영체제 혹은 운영체제의 종류에 관계없이 동작할 수 있는 미들웨어용 스케쥴러가 필요하다.Therefore, in order to eliminate these shortcomings, a middleware scheduler that can run regardless of the real-time operating system or the type of operating system that supports both the process type and the thread type that handles the periodicity and the sporadic event at the same time without changing as much as possible is needed. Do.

실시예들은 산업용 로봇 시스템을 제어하기 위해 실시간으로 스케줄링하는 기술을 제공할 수 있다.Embodiments may provide a technique for scheduling in real time to control an industrial robotic system.

일 실시예에 따른 실시간 스케줄링 방법은, 실시간 스케줄링에 있어서, 프로세스 및 스레드에 대한 정보를 수신하는 단계와, 상기 정보를 이용하여 모듈 파일(module file)을 생성하는 단계와, 상기 모듈 파일로부터 상기 정보를 추출하여 스케줄링 테이블을 생성하는 단계와, 상기 스케줄링 테이블에 기초하여 상기 프로세스 및 상기 스레드를 실행하는 단계를 포함한다.According to an embodiment of the present invention, a real-time scheduling method includes receiving information on a process and a thread in real time scheduling, generating a module file using the information, and generating the information from the module file. Generating a scheduling table by extracting and executing the process and the thread based on the scheduling table.

상기 모듈 파일은 복수의 모듈을 포함하고, 각각의 모듈은 모듈의 유형에 관한 정보, 모듈의 실행 유형에 관한 정보, 주기 정보, 데드라인(deadline) 정보 및 우선 순위 정보 중 적어도 하나의 정보를 포함할 수 있다.The module file includes a plurality of modules, each module including at least one of information on the type of the module, information on the type of execution of the module, period information, deadline information and priority information. can do.

상기 모듈의 유형은, 프로세스 유형 및 스레드 유형을 포함할 수 있다.The type of module may include a process type and a thread type.

상기 모듈의 실행 유형은, 주기(periodic) 실행 유형, 스포라딕(sporadic) 실행 유형 및 비실시간(non-real time) 실행 유형을 포함할 수 있다.The execution type of the module may include a periodic execution type, a sporadic execution type, and a non-real time execution type.

상기 스케줄링 테이블을 생성하는 단계는, 상기 복수의 모듈을 이용하여 주기 실행을 위한 스케줄링 테이블을 생성하는 단계와, 상기 복수의 모듈을 이용하여 스포라딕 실행을 위한 스케줄링 테이블을 생성하는 단계를 포함할 수 있다.The generating of the scheduling table may include generating a scheduling table for periodic execution using the plurality of modules and generating a scheduling table for sporadic execution using the plurality of modules. have.

상기 실행하는 단계는, 상기 실행 유형이 상기 비실시간 실행 유형인 모듈을 실행하는 단계와, 상기 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계와, 상기 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계를 포함할 수 있다.The executing may include executing a module whose execution type is the non-real time execution type, acquiring and executing a module from the scheduling table for the periodic execution, and from the scheduling table for the sporadic execution. It may include the step of obtaining and executing.

상기 실행하는 단계는, 상기 프로세스 및 상기 스레드의 실행 주기의 최소 공배수인 매크로 주기(macro period)를 계산하는 단계를 더 포함할 수 있다.The executing may further include calculating a macro period, which is a least common multiple of execution cycles of the process and the thread.

상기 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계는, 상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하는 단계와, 상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보내는 단계를 포함할 수 있다.Acquiring and executing a module from the scheduling table for executing the cycle includes: invoking an execution function for execution of the thread when the module type is the thread type, and the type of the module is the process type. In this case, the method may include sending a signal to execute the process.

상기 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계는, 상기 모듈의 컨디션(condition)을 판별하는 단계와, 상기 컨디션에 기초하여 상기 모듈을 실행하는 단계를 포함할 수 있다.Acquiring and executing a module from the scheduling table for Sporadic execution may include determining a condition of the module and executing the module based on the condition.

상기 모듈을 실행하는 단계는, 상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하는 단계와, 상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보내는 단계를 포함할 수 있다.The step of executing the module may include calling an execution function for execution of the thread if the type of the module is the thread type, and for executing the process if the type of the module is the process type. And sending a signal.

일 실시예에 따른 실시간 스케줄링 장치는, 실시간 스케줄링에 있어서, 프로세스 및 스레드에 대한 정보를 수신하는 수신기와, 상기 프로세스 및 상기 스레드에 대한 정보에 기초한 스케줄링 테이블을 이용하여 상기 프로세스 및 상기 스레드를 실행하는 컨트롤러를 포함하고, 상기 컨트롤러는, 상기 정보를 이용하여 모듈 파일(module file)을 생성하는 모듈 파일 생성기와, 상기 모듈 파일로부터 상기 정보를 추출하여 스케줄링 테이블을 생성하는 스케줄링 테이블 생성기와, 상기 스케줄링 테이블에 기초하여 상기 프로세스 및 상기 스레드를 실행하는 실행기를 포함한다.According to an embodiment of the present invention, a real-time scheduling apparatus includes a receiver for receiving information about a process and a thread, and executing the process and the thread by using a scheduling table based on the information about the process and the thread in real time scheduling. A controller comprising: a module file generator for generating a module file using the information, a scheduling table generator for extracting the information from the module file, and a scheduling table generator for generating a scheduling table; And an executor that executes the process based on the thread.

상기 모듈 파일은 복수의 모듈을 포함하고, 각각의 모듈은 모듈의 유형에 관한 정보, 모듈의 실행 유형에 관한 정보, 주기 정보, 데드라인(deadline) 정보 및 우선 순위 정보 중 적어도 하나의 정보를 포함할 수 있다.The module file includes a plurality of modules, each module including at least one of information on the type of the module, information on the type of execution of the module, period information, deadline information and priority information. can do.

상기 모듈의 유형은, 프로세스 유형 및 스레드 유형을 포함할 수 있다.The type of module may include a process type and a thread type.

상기 모듈의 실행 유형은, 주기(periodic) 실행 유형, 스포라딕(sporadic) 실행 유형 및 비실시간(non-real time) 실행 유형을 포함할 수 있다.The execution type of the module may include a periodic execution type, a sporadic execution type, and a non-real time execution type.

상기 스케줄링 테이블 생성기는, 상기 복수의 모듈을 이용하여 주기 실행을 위한 스케줄링 테이블을 생성하고, 상기 복수의 모듈을 이용하여 스포라딕 실행을 위한 스케줄링 테이블을 생성할 수 있다.The scheduling table generator may generate a scheduling table for periodic execution using the plurality of modules and generate a scheduling table for sporadic execution using the plurality of modules.

상기 실행기는, 상기 실행 유형이 상기 비실시간 실행 유형인 모듈을 실행하는 비실시간 실행기와, 상기 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 주기 실행기와, 상기 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 스포라딕 실행기를 포함할 수 있다.The executor may include a non-real time executor for executing a module whose execution type is the non-real time execution type, a periodic executor for acquiring and executing a module from the scheduling table for the periodic execution, and a scheduling table for the sporadic execution. It may include a Sporadic Launcher that acquires and executes a module.

상기 실행기는, 상기 프로세스 및 상기 스레드의 실행 주기의 최소 공배수인 매크로 주기(macro period)를 계산할 수 있다.The executor may calculate a macro period, which is a least common multiple of execution cycles of the process and the thread.

상기 주기 실행기는, 상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하고, 상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보낼 수 있다.The periodic executor invokes an execution function for the execution of the thread if the type of the module is the thread type and signals a signal for execution of the process if the type of the module is the process type. can send.

상기 스포라딕 실행기는, 상기 모듈의 컨디션(condition)을 판별하고, 상기 컨디션에 기초하여 상기 모듈을 실행할 수 있다.The sporadic executor may determine a condition of the module and execute the module based on the condition.

상기 스포라딕 실행기는, 상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하고, 상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보낼 수 있다.The sporadic executor invokes an execution function for execution of the thread if the type of the module is the thread type, and signals for execution of the process if the type of the module is the process type. You can send

도 1은 일 실시예에 따른 실시간 스케줄링 장치의 개략적인 블록도를 나타낸다.
도 2는 도 1에 도시된 컨트롤러의 개략적인 블록도를 나타낸다.
도 3은 도 2에 도시된 모듈 파일 생성기가 생성한 모듈 파일의 예를 나타낸다.
도 4a는 도 2에 도시된 스케줄링 테이블 생성기가 생성한 주기 실행을 위한 스케줄링 테이블의 예를 나타낸다.
도 4b는 도 2에 도시된 스케줄링 테이블 생성기가 생성한 스포라딕 실행을 위한 스케줄링 테이블의 예를 나타낸다.
도 5는 도 2에 도시된 실행기의 개략적인 블록도를 나타낸다.
도 6은 도 2에 도시된 실행기의 알고리즘의 예를 나타낸다.
도 7a는 도 2에 도시된 실행기가 매크로 주기를 계산하는 동작의 예를 나타낸다.
도 7b는 도 7a에 기초한 주기 실행 테이블의 예를 나타낸다.
도 8은 스레드 유형 주기 모듈의 구조의 예를 나타낸다.
도 9는 프로세스 유형 주기 모듈의 구조의 예를 나타낸다.
도 10은 스레드 유형 스포라딕 모듈의 구조의 예를 나타낸다.
도 11은 프로세스 유형 스포라딕 모듈의 구조의 예를 나타낸다.
도 12는 도 1에 도시된 실시간 스케줄링 장치에 의한 타이밍 다이어그램의 예를 나타낸다.
도 13은 도 5에 도시된 주기 실행기 및 스포라딕 실행기의 동작의 예를 나타낸다.
도 14a는 도 1에 도시된 실시간 스케줄링 장치의 성능의 일 예를 나타낸다.
도 14b는 도 1에 도시된 실시간 스케줄링 장치의 성능의 다른 예를 나타낸다.
1 is a schematic block diagram of a real-time scheduling apparatus according to an embodiment.
FIG. 2 shows a schematic block diagram of the controller shown in FIG. 1.
3 illustrates an example of a module file generated by the module file generator illustrated in FIG. 2.
4A illustrates an example of a scheduling table for executing a period generated by the scheduling table generator illustrated in FIG. 2.
4B illustrates an example of a scheduling table for sporadic execution generated by the scheduling table generator illustrated in FIG. 2.
FIG. 5 shows a schematic block diagram of the executor shown in FIG. 2.
FIG. 6 shows an example of the algorithm of the executor shown in FIG. 2.
FIG. 7A illustrates an example of an operation in which the executor shown in FIG. 2 calculates a macro period.
FIG. 7B shows an example of a period execution table based on FIG. 7A.
8 shows an example of the structure of a thread type cycle module.
9 shows an example of the structure of a process type cycle module.
10 shows an example of the structure of a thread type sporadic module.
11 shows an example of the structure of a process type sporadic module.
FIG. 12 shows an example of a timing diagram by the real time scheduling apparatus shown in FIG. 1.
FIG. 13 shows an example of operations of the cycle executor and the sporadic executor shown in FIG. 5.
14A illustrates an example of the performance of the real time scheduling apparatus shown in FIG. 1.
14B illustrates another example of the performance of the real time scheduling apparatus shown in FIG. 1.

이하에서, 첨부된 도면을 참조하여 실시예들을 상세하게 설명한다. 그러나, 실시예들에는 다양한 변경이 가해질 수 있어서 특허출원의 권리 범위가 이러한 실시예들에 의해 제한되거나 한정되는 것은 아니다. 실시예들에 대한 모든 변경, 균등물 내지 대체물이 권리 범위에 포함되는 것으로 이해되어야 한다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. However, various changes may be made to the embodiments so that the scope of the patent application is not limited or limited by these embodiments. It is to be understood that all changes, equivalents, and substitutes for the embodiments are included in the scope of rights.

실시예에서 사용한 용어는 단지 설명을 목적으로 사용된 것으로, 한정하려는 의도로 해석되어서는 안된다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of description and should not be construed as limiting. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, terms such as "comprise" or "have" are intended to indicate that there is a feature, number, step, action, component, part, or combination thereof described on 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.

제1 또는 제2등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들은 용어들에 의해서 한정되어서는 안 된다. 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만, 예를 들어 실시예의 개념에 따른 권리 범위로부터 이탈되지 않은 채, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다. Terms such as first or second may be used to describe various components, but the components should not be limited by the terms. The terms are for the purpose of distinguishing one component from another component only, for example, without departing from the scope of the rights according to the concepts of the embodiment, the first component may be named a second component, and similarly The second component may also be referred to as the first component.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.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.

또한, 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조부호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 실시예의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.In addition, in the description with reference to the accompanying drawings, the same components regardless of reference numerals will be given the same reference numerals and duplicate description thereof will be omitted. In the following description of the embodiment, when it is determined that the detailed description of the related known technology may unnecessarily obscure the gist of the embodiment, the detailed description thereof will be omitted.

본 명세서에서의 모듈(module)은 본 명세서에서 설명되는 각 명칭에 따른 기능과 동작을 수행할 수 있는 하드웨어를 의미할 수도 있고, 특정 기능과 동작을 수행할 수 있는 컴퓨터 프로그램 코드를 의미할 수도 있고, 또는 특정 기능과 동작을 수행시킬 수 있는 컴퓨터 프로그램 코드가 탑재된 전자적 기록 매체, 예를 들어 프로세서 또는 마이크로 프로세서를 의미할 수 있다.A module in the present specification may mean hardware capable of performing functions and operations according to each name described in the present specification, and may mean computer program code capable of performing specific functions and operations. Or an electronic recording medium, for example, a processor or a microprocessor, in which computer program code capable of performing specific functions and operations is mounted.

다시 말해, 모듈이란 본 발명의 기술적 사상을 수행하기 위한 하드웨어 및/또는 상기 하드웨어를 구동하기 위한 소프트웨어의 기능적 및/또는 구조적 결합을 의미할 수 있다.In other words, a module may mean a functional and / or structural combination of hardware for performing the technical idea of the present invention and / or software for driving the hardware.

도 1은 일 실시예에 따른 실시간 스케줄링 장치의 개략적인 블록도를 나타낸다.1 is a schematic block diagram of a real-time scheduling apparatus according to an embodiment.

도 1을 참조하면, 실시간 스케줄링 장치(10)는 프로세스(process) 유형 및 스레드(thread) 유형을 포함하는 작업(task)에 대한 스케줄링을 수행할 수 있다. 실시간 스케줄링 장치(10)는 작업에 대하여 하드웨어 자원을 적절히 배정함으로써 컴퓨팅 시스템의 성능을 향상시킬 수 있다.Referring to FIG. 1, the real-time scheduling apparatus 10 may perform scheduling for a task including a process type and a thread type. The real-time scheduling apparatus 10 may improve the performance of the computing system by appropriately allocating hardware resources to tasks.

실시간 스케줄링 장치(10)는 스레드 유형과 프로세스 유형의 작업을 동시에 지원하는 실시간 스케줄링을 수행할 수 있다. 실시간 스케줄링 장치(10)는 엄격한 주기(period)를 지키면서 프로세스와 스레드를 동작시키고, 이벤트 발생을 검사(또는 판별)하여 이벤트를 스포라딕 유형으로 처리할 수 있다.The real-time scheduling apparatus 10 may perform real-time scheduling that simultaneously supports tasks of thread type and process type. The real-time scheduling apparatus 10 may process processes and threads while maintaining a strict period, and check (or determine) occurrence of an event and process the event as a sporadic type.

실시간 스케줄링 장치(10)는 엄격하게 주기 실행을 하면서 실시간 스포라딕 실행을 처리할 수 있다. 즉, 실시간 스케줄링 장치(10)는 SW(Software) 모듈의 프로세스 유형과 스레드 유형을 주기에 따라 엄격하게 관리할 수 있다.The real-time scheduling apparatus 10 may process real-time sporadic execution while strictly performing periodic execution. That is, the real-time scheduling apparatus 10 may strictly manage the process type and the thread type of the SW module.

실시간 스케줄링 장치(10)는 이벤트 검사 여부에 기초하여 프로세스 또는 스레드를 실시간으로 처리할 수 있다.The real-time scheduling apparatus 10 may process a process or a thread in real time based on whether an event is checked.

실시간 스케줄링 장치(10)는 주기적(periodic) 실행, 스포라딕(sporadic) 실행, 비실시간(non-real time) 실행을 처리할 수 있다. 실시간 스케줄링 장치(10)는 비실시간 실행을 처리하지 않고 운영체제의 기능에 맡길 수 있다.The real-time scheduling apparatus 10 may process periodic execution, sporadic execution, and non-real time execution. The real-time scheduling apparatus 10 may leave the function of the operating system without processing non-real-time execution.

실시간 스케줄링 장치(10)는 다양한 운영 체제에서 스케줄링을 실행할 수 있다. 예를 들어, 실시간 스케줄링 장치(10)는 Xenomai 실시간 운영 시스템 및 Linux에서스케줄링을 실행할 수 있다.The real-time scheduling apparatus 10 may execute scheduling in various operating systems. For example, the real-time scheduling apparatus 10 may execute scheduling in the Xenomai real-time operating system and Linux.

실시간 스케줄링 장치(10)는 레거시(legacy) SW(Software)를 처리할 수 있다. 실시간 스케줄링 장치(10)는 레거시 SW를 프로세스로 처리하며, 주기적 실행과 비실시간 실행을 처리할 수 있다.The real-time scheduling apparatus 10 may process legacy SW (Software). The real-time scheduling apparatus 10 processes the legacy SW as a process and may process periodic execution and non-real time execution.

실시간 스케줄링 장치(10)는 스포라딕 실행을 이벤트에 의해 시작시킬 수 있다. 실시간 스케줄링 장치(10)는 주기적 실행을 스레드와 프로세스로 구분하며, 이들에 대한 정보를 수신할 수 있다.The real-time scheduling apparatus 10 may start the sporadic execution by an event. The real-time scheduling apparatus 10 divides periodic execution into threads and processes, and may receive information about them.

실시간 스케줄링 장치(10)는 이벤트와 관련된 컨디션 함수와 트리거링 함수를 등록할 수 있다. 실시간 스케줄링 장치(10)는 컨디션 함수의 해당 컨디션이 만족되를 판별하여, 해당 컨디션을 만족하면 관련 트리거링 함수를 스레드 유형으로 수행할 수 있다.The real-time scheduling apparatus 10 may register a condition function and a triggering function related to the event. The real-time scheduling apparatus 10 may determine whether the corresponding condition of the condition function is satisfied, and when the condition is satisfied, perform the related triggering function as a thread type.

실시간 스케줄링 장치(10)의 스케줄링에 있어서, 주기 실행이 우선 순위가 가장 높으며, 스포라딕 실행이 다음으로 높을 수 있다.In the scheduling of the real-time scheduling apparatus 10, the periodic execution may have the highest priority, and the sporadic execution may be next higher.

주기 실행 프로세스와 스레드 간에도 우선 순위가 존재할 수 있고, 스포라딕 실행 스레드와 프로세스 간에도 우선 순위가 존재할 수 있다.Priority may exist between the cycle execution process and the thread, and priority may exist between the sporadic execution thread and the process.

실시간 스케줄링 장치(10)는 스포라딕 실행을 위한 이벤트 확인 스레드를 포함할 수 있다. 실시간 스케줄링 장치(10)는 이벤트 확인 스레드를 주기적으로 실행하고, 이벤트 확인 주기는 디폴트(default)로 기본 주기(basic period) 동일하거나 상이하게 설정될 수 있다.The real-time scheduling apparatus 10 may include an event confirmation thread for Sporadic execution. The real-time scheduling apparatus 10 periodically executes an event confirmation thread, and the event confirmation period may be set as the same or different from a basic period as a default.

실시간 스케줄링 장치(10)는 수신기(100) 및 컨트롤러(200)를 포함한다.The real time scheduling apparatus 10 includes a receiver 100 and a controller 200.

수신기(100)는 프로세스 및 스레드에 대한 정보를 수신할 수 있다. 정보는 파일을 포함할 수 있다. 수신기(100)는 정보를 읽음으로써 정보를 수신할 수 있다. 예를 들어, 수신기(100)는 파일을 직접 읽을 수 있고, 외부로부터 통신 수단을 통하여 관련 정보를 얻을 수 있다. 수신기(100)는 프로세스 및 스레드에 대한 정보를 컨트롤러(200)로 출력할 수 있다.The receiver 100 may receive information about processes and threads. The information may include a file. The receiver 100 may receive the information by reading the information. For example, the receiver 100 may read the file directly and obtain related information from the outside through a communication means. The receiver 100 may output information about a process and a thread to the controller 200.

컨트롤러(200)는 프로세스 및 스레드에 대한 정보에 기초한 스케줄링 테이블을 이용하여 프로세스 및 스레드를 실행할 수 있다.The controller 200 may execute a process and a thread using a scheduling table based on the information about the process and the thread.

도 2는 도 1에 도시된 컨트롤러의 개략적인 블록도를 나타낸다.FIG. 2 shows a schematic block diagram of the controller shown in FIG. 1.

도 2를 참조하면, 컨트롤러(200)는 모듈 파일(module file) 생성기(210), 스케줄링 테이블 생성기(230) 및 실행기(250)를 포함할 수 있다.Referring to FIG. 2, the controller 200 may include a module file generator 210, a scheduling table generator 230, and an executor 250.

모듈 파일 생성기(210)는 프로세스 및 스레드에 대한 정보를 이용하여 모듈 파일을 생성할 수 있다. 모듈 파일 생성기(210)는 생성한 모듈 파일을 스케줄링 테이블 생성기(230)로 출력할 수 있다. 모듈 파일 생성기(210)의 동작은 도 3을 참조하여 상세하게 설명할 것이다.The module file generator 210 may generate a module file by using information about a process and a thread. The module file generator 210 may output the generated module file to the scheduling table generator 230. The operation of the module file generator 210 will be described in detail with reference to FIG. 3.

스케줄링 테이블 생성기(230)는 모듈 파일로부터 프로세스 및 스레드에 대한 정보를 추출하여 스케줄링 테이블(scheduling table)을 생성할 수 있다. 스케줄링 테이블 생성기(230)의 동작은 도 4a 및 4b를 참조하여 상세하게 설명할 것이다.The scheduling table generator 230 may generate a scheduling table by extracting information about processes and threads from the module file. The operation of the scheduling table generator 230 will be described in detail with reference to FIGS. 4A and 4B.

실행기(250)는 스케줄링 테이블에 기초하여 프로세스 및 스레드를 실행할 수 있다. 또한, 실행기(250)는 프로세스 및 스레드의 실행 주기의 최소 공배수인 매크로 주기(macro period)를 계산할 수 있다. 실행기(250)의 동작은 도 5 내지 도 11을 참조하여 자세하게 설명할 것이다.The executor 250 may execute processes and threads based on the scheduling table. In addition, the executor 250 may calculate a macro period, which is the least common multiple of the execution periods of processes and threads. The operation of the executor 250 will be described in detail with reference to FIGS. 5 to 11.

도 3은 도 2에 도시된 모듈 파일 생성기가 생성한 모듈 파일의 예를 나타낸다.3 illustrates an example of a module file generated by the module file generator illustrated in FIG. 2.

도 3을 참조하면, 모듈 파일 생성기(210)는 프로세스 및 스레드의 정보에 기초하여 모듈 파일을 생성할 수 있다. 모듈 파일은 복수의 모듈을 포함할 수 있다. 예를 들어, 모듈 파일은 .xml의 형태를 가질 수 있다. 도 3의 예시와 같이 모듈 파일은 module.xml 파일로 제공될 수 있다.Referring to FIG. 3, the module file generator 210 may generate a module file based on information of a process and a thread. The module file may include a plurality of modules. For example, a module file may have a form of .xml. As illustrated in FIG. 3, the module file may be provided as a module.xml file.

각각의 모듈은 모듈의 유형(type)에 관한 정보, 모듈의 실행 유형에 관한 정보, 주기 정보, 데드라인(deadline) 정보 및 우선 순위 정보 중 적어도 하나의 정보를 포함할 수 있다.Each module may include at least one of information on a type of the module, information on an execution type of the module, period information, deadline information, and priority information.

모듈의 유형은 프로세스 유형 및 스레드 유형을 포함할 수 있다. 모듈의 실행 유형은 주기(periodic) 실행 유형, 스포라딕(sporadic) 실행 유형 및 비실시간(non-real time) 실행 유형을 포함할 수 있다.The type of module may include a process type and a thread type. The execution type of a module may include a periodic execution type, a sporadic execution type, and a non-real time execution type.

스레드 유형은 Linux에서 .so 형으로 제공될 수 있고, 프로세스 유형은 실행 파일로 제공될 수 있다. 또한, 레거시(legacy) SW도 실행 파일로 제공될 수 있다.The thread type can be provided in Linux as a .so type, and the process type can be provided as an executable file. Legacy SW can also be provided as an executable file.

도 4a는 도 2에 도시된 스케줄링 테이블 생성기가 생성한 주기 실행을 위한 스케줄링 테이블의 예를 나타내고, 도 4b는 도 2에 도시된 스케줄링 테이블 생성기가 생성한 스포라딕 실행을 위한 스케줄링 테이블의 예를 나타낸다.FIG. 4A illustrates an example of a scheduling table for periodic execution generated by the scheduling table generator illustrated in FIG. 2, and FIG. 4B illustrates an example of a scheduling table for sporadic execution generated by the scheduling table generator illustrated in FIG. 2. .

도 4a 및 도 4b를 참조하면, 스케줄링 테이블 생성기(230)는 복수의 모듈을 이용하여 주기 실행을 위한 스케줄링 테이블을 생성할 수 있다. 스케줄링 테이블 생성기(230)는 복수의 모듈을 이용하여 스포라딕 실행을 위한 스케줄링 테이블을 생성할 수 있다. 스케줄링 테이블은 산업용 로봇을 위한 실시간 스케줄링 알고리즘에 사용될 수 있다.4A and 4B, the scheduling table generator 230 may generate a scheduling table for periodic execution using a plurality of modules. The scheduling table generator 230 may generate a scheduling table for sporadic execution using a plurality of modules. The scheduling table can be used for real-time scheduling algorithms for industrial robots.

도 4a에 나타난 [0], [1] 및 [2]는 스케줄링 테이블의 인덱스를 의미할 수 있다. 도 4a의 [0]은 100 ms의 .so 형을 의미하고, [1] 및 [2]는 각각 주기 200 ms, 400 ms의 프로세스 형을 의미할 수 있다.[0], [1], and [2] shown in FIG. 4A may mean an index of a scheduling table. [0] of FIG. 4A may refer to a .so type of 100 ms, and [1] and [2] may refer to a process type of 200 ms and 400 ms, respectively.

스케줄링 테이블 생성기(230)는 주기에 따라 복수의 행(row)으로 이루어진 스케줄링 테이블을 생성할 수 있다. 예를 들어, 스케줄링 테이블 생성기(230)는 도 4a의 예시와 같이 각 주기에 따라 4 개의 행(row)을 생성할 수 있다.The scheduling table generator 230 may generate a scheduling table composed of a plurality of rows according to a period. For example, the scheduling table generator 230 may generate four rows according to each period as illustrated in FIG. 4A.

스케줄링 테이블 생성기(230)는 생성한 스케줄링 테이블을 실행기(250)로 출력할 수 있다.The scheduling table generator 230 may output the generated scheduling table to the executor 250.

이하에서, 도 5 내지 도 11을 참조하여 실행기(250)의 동작을 자세하게 설명할 것이다.Hereinafter, the operation of the executor 250 will be described in detail with reference to FIGS. 5 to 11.

도 5는 도 2에 도시된 실행기의 개략적인 블록도를 나타낸다.FIG. 5 shows a schematic block diagram of the executor shown in FIG. 2.

도 5를 참조하면, 실행기(250)는 비실시간 실행기(251), 주기 실행기(253) 및 스포라딕 실행기(255)를 포함할 수 있다.Referring to FIG. 5, the executor 250 may include a non-real time executor 251, a cycle executor 253, and a sporadic executor 255.

비실시간 실행기(251)는 실행 유형이 비실시간 실행 유형인 모듈을 실행할 수 있다. 주기 실행기(253)는 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행할 수 있다. 스포라딕 실행기(255)는 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행할 수 있다.The non-real time executor 251 may execute a module whose execution type is a non-real time execution type. The periodic executor 253 may obtain and execute a module from a scheduling table for periodic execution. Sporadic executor 255 may obtain and execute a module from a scheduling table for sporadic execution.

주기 실행기(253)는 모듈의 유형이 스레드 유형인 경우에 스레드의 실행을 위해 실행 함수를 호출할 수 있다. 주기 실행기(253)는 모듈의 유형이 프로세스 유형인 경우에 프로세스의 실행을 위해 신호(signal)을 보낼 수 있다.The cycle executor 253 may call an execution function for execution of a thread when the type of the module is a thread type. The cycle executor 253 may send a signal for the execution of a process if the type of the module is a process type.

스포라딕 실행기(255)는 모듈의 컨디션(condition)을 판별하고, 컨디션에 기초하여 모듈을 실행할 수 있다. 스포라딕 실행기(255)는 모듈의 유형이 스레드 유형인 경우에 스레드의 실행을 위해 실행 함수를 호출할 수 있다. 스포라딕 실행기(255)는 모듈의 유형이 프로세스 유형인 경우에 프로세스의 실행을 위해 신호(signal)를 보낼 수 있다.Sporadic executor 255 may determine the condition of the module and execute the module based on the condition. Sporadic executor 255 may call an execution function for execution of a thread if the type of the module is a thread type. Sporadic executor 255 may signal for execution of a process if the module type is a process type.

도 6은 도 2에 도시된 실행기의 알고리즘의 예를 나타낸다.FIG. 6 shows an example of the algorithm of the executor shown in FIG. 2.

도 6을 참조하면, 실행기(250)는 매크로 주기를 계산할 수 있다. 그 후, 비실시간 실행기(251)는 스케줄러를 실행시키면서 비실시간 모듈들을 실행시킬 수 있다. 즉, 실행기(250)는 비실시간 모듈들의 실행을 일반적인 실시간 스케줄러가 담당하게 할 수 있지만, 실시간 스케줄러의 부담을 줄여주기 위해 비실시간 모듈들의 실행을 관리하지 않을 수 있다.Referring to FIG. 6, the executor 250 may calculate a macro period. The non-real time executor 251 may then execute the non-real time modules while executing the scheduler. That is, the executor 250 may allow a general real-time scheduler to take charge of the execution of the non-real-time modules, but may not manage the execution of the non-real-time modules in order to reduce the burden of the real-time scheduler.

이 경우에는 비실시간 실행기(251)는 주기 실행과 스포라딕 실행을 모두 수행한 후 시간이 남는 경우에만 서비스를 수행할 수 있다.In this case, the non-real time executor 251 may perform a service only when time remains after performing both the periodic execution and the sporadic execution.

비실시간 실행기(250)는 비실시간 실행의 우선 순위를 낮게 설정한 후, 주기 실행기(253)는 주기 실행을 위한 스케줄링 테이블에 기초하여 스레드 유형 및 프로세스 유형의 모듈을 실행할 수 있다. 주기 실행기(253)의 동작은 도 8 및 도 9를 참조하여 더 자세하게 설명할 것이다.After the non-real time executor 250 lowers the priority of the non-real time execution, the periodic executor 253 may execute the module of the thread type and the process type based on the scheduling table for the periodic execution. The operation of the period executor 253 will be described in more detail with reference to FIGS. 8 and 9.

그 후, 스포라딕 실행기(255)는 스포라딕 실행을 위한 스케줄링 테이블에 기초하여 스레드 유형 및 프로세스 유형의 모듈을 실행할 수 있다. 스포라딕 실행기(255)의 동작은 도 10 및 도 11을 참조하여 더 자세하게 설명할 것이다.The sporadic executor 255 may then execute the module of the thread type and the process type based on the scheduling table for the sporadic execution. The operation of Sporadic executor 255 will be described in more detail with reference to FIGS. 10 and 11.

도 7a는 도 2에 도시된 실행기가 매크로 주기를 계산하는 동작의 예를 나타내고, 도 7b는 도 7a에 기초한 주기 실행 테이블의 예를 나타낸다.FIG. 7A shows an example of an operation in which the executor shown in FIG. 2 calculates a macro period, and FIG. 7B shows an example of a period execution table based on FIG. 7A.

도 7a 및 7b를 참조하면, 실행기(250)는 프로세스 및 상기 스레드의 실행 주기의 최소 공배수인 매크로 주기(macro period)를 계산할 수 있다. 산업용 로봇(Industrial robot)은 주기 실행을 기본적으로 동작할 수 있다. 필요한 기능들을 주기적으로 실행해야 하는 기능들의 수행 주기가 서로 다르기 때문에 실행기(250)는 이 주기들을 맞추어 줄 수 있다. 7A and 7B, the executor 250 may calculate a macro period, which is the least common multiple of the execution period of the process and the thread. Industrial robots can basically operate cycle execution. The executor 250 may match these periods because the performance cycles of the functions that need to be periodically executed are different.

예를 들어, 도 7a의 예시에서 10ms, 20ms, 30ms의 주기로 실행되는 프로세스가 존재하고, 이를 각각 프로세스 A, B, C로 나타낼 수 있다.For example, in the example of FIG. 7A, there are processes that are executed at intervals of 10 ms, 20 ms, and 30 ms, and these may be represented as processes A, B, and C, respectively.

실행기(250)는 이 프로세스들의 최대공약수인 10ms를 기본 주기(basic period)로 해당 프로세스들을 수행시킬 수 있다. 또한, 실행기(250)는 이 프로세스들의 실행 주기의 최소 공배수인 60ms마다 같은 내용이 반복되게 동작시킬 수 있다. 이 최소 공배수의 주기는 매크로 주기를 의미할 수 있다.The executor 250 may execute the processes with a basic period of 10 ms, which is the greatest common divisor of these processes. In addition, the executor 250 may operate the same content repeatedly every 60 ms, which is the least common multiple of the execution cycle of these processes. The period of the least common multiple may mean a macro period.

도 8은 스레드 유형 주기 모듈의 구조의 예를 나타내고, 도 9는 프로세스 유형 주기 모듈의 구조의 예를 나타낸다.8 shows an example of the structure of a thread type cycle module, and FIG. 9 shows an example of the structure of a process type cycle module.

도 8 및 도 9를 참조하면, 주기 실행기(253)는 스레드 유형의 주기 모듈 및 프로세스 유형의 주기 모듈을 실행할 수 있다. 주기 실행기(253)는 스레드 유형의 주기 모듈과 프로세스 유형의 주기 모듈을 상이한 방법으로 제어할 수 있다.8 and 9, the cycle executor 253 may execute a cycle module of a thread type and a cycle module of a process type. The cycle executor 253 may control the thread type cycle module and the process type cycle module in different ways.

주기 실행기(253)는 스레드 유형을 .so 파일의 run() 함수를 호출하여 수행하지만, 프로세스 형은 스케줄러와 독립적인 프로세스이기 때문에 신호(signal)로 제어할 수 있다.The cycle executor 253 executes the thread type by calling the run () function of the .so file, but since the process type is a process independent of the scheduler, it can be controlled by a signal.

만일 해당 주기에 여러 개의 .so 파일이 수행된다면 주기 실행기(253)는 해당 .so 파일들의 run() 함수들을 모두 호출할 수 있다. 이러한 방법을 통해 주기 실행기(253)는 스레드 또는 프로세스를 제어할 때 필요한 오버헤드 시간을 줄일 수 있다.If several .so files are executed in a given cycle, the cycle executor 253 may call all the run () functions of the corresponding .so files. In this way, the cycle executor 253 can reduce the overhead time required to control a thread or process.

주기 실행기(253)는 run() 함수를 수행하기 위해서는 초기화 등의 과정을 선행적으로 수행할 수 있다. 이를 위한 .so 파일의 구조는 도 8의 예시와 같을 수 있다. 주기 실행기(253)는 초기화 과정은 initialize()를 통해 수행하고, start() 함수를 통해 실제 run()이 수행되기 전에 필요한 작업들을 수행할 수 있다.The cycle executor 253 may perform a process such as initialization prior to performing the run () function. The structure of the .so file for this may be the same as the example of FIG. The cycle executor 253 may perform an initialization process through initialize () and perform necessary tasks before actual run () is performed through the start () function.

주기 실행기(253)는.so 파일의 수행을 멈추고 싶을 때 stop() 함수를 호출하고, 완전히 종료하고자 할 때는 destroy()를 호출할 수 있다. 또한, 주기 실행기(253)는 오류가 생길 경우 error() 를 호출하여 해당 오류를 처리할 수 있다.The cycle executor 253 may call the stop () function when it wants to stop the execution of the .so file, and call destroy () when it wants to completely terminate. In addition, when an error occurs, the cycle executor 253 may call error () to handle the error.

주기 실행기(253)는 신호(signal)를 사용하여 프로세스 유형의 모듈을 제어할 수 있다. 주기 실행기(253)가 제어하는 프로세스 유형의 구조는 도 9와 같을 수 있다.The cycle executor 253 may use a signal to control a module of the process type. The structure of the process type controlled by the cycle executor 253 may be the same as that of FIG. 9.

주기 실행기(253)는 initPeriodExe() 함수를 통해 레거시 모듈이 스케줄러의 관리하에 있을 수 있도록 초기 설정을 할 수 있다. 주기 실행기(253)는 이 함수를 통해 모듈이 스케줄러에 의해 보내진 신호를 처리하도록 하기 위해 스케줄러에 신호를 등록할 수 있다.The cycle executor 253 may initially set the legacy module under the management of the scheduler through the initPeriodExe () function. Period executor 253 may register a signal with the scheduler through this function to cause the module to process the signal sent by the scheduler.

주기 실행기(253)는 waitPeriod() 함수를 이용해 모듈이 자신의 실행 순서가 아닐 경우 대기하게 할 수 있다. 주기 실행기(253)는 스케줄러가 신호를 보내면 대기 상태에서 벗어나 한 주기를 실행하고 다시 대기상태에 들어가면서 스케줄러의 신호를 받을 때마다 반복적으로 주기 수행을 할 수 있다.The cycle executor 253 may use the waitPeriod () function to cause the module to wait if it is not in its execution order. When the scheduler sends a signal, the cycle executor executes a cycle from the standby state, and enters the standby state again, and repeats the cycle whenever the scheduler receives the signal.

주기 실행기(253)는 신호의 순서를 제어하고 프로세스에 우선순위를 부여함으로써 해당 프로세스들의 실행 순서를 제어할 수 있다.The periodic executor 253 may control the order of execution of the processes by controlling the order of signals and giving priority to the processes.

도 10은 스레드 유형 스포라딕 모듈의 구조의 예를 나타내고, 도 11은 프로세스 유형 스포라딕 모듈의 구조의 예를 나타낸다.10 shows an example of the structure of a thread type sporadic module, and FIG. 11 shows an example of the structure of a process type sporadic module.

도 10 및 도 11을 참조하면, 스포라딕 실행기(255)는 주기 모듈의 실행이 전부 완료된 후, 스포라딕 모듈의 이벤트(event) 발생여부를 확인할 수 있다. 스포라딕 실행기(255)는 이벤트를 발생에 관한 .so를 확인하여 EDF(Earliest Deadline First) 또는 RM(Rate Monotonic) 방법을 사용하여 데드라인(deadline)이 가장 짧은 스포라딕 모듈부터 실행시킬 수 있다.10 and 11, after all execution of the periodic module is completed, the sporadic executor 255 may check whether the sporadic module generates an event. Sporadic executor 255 checks .so for the occurrence of an event and executes the Sporadic module with the shortest deadline using the Earliest Deadline First (EDF) or Rate Monotonic (RM) method.

스포라딕 실행기(255)는 프로세스 유형에 대해서도 이벤트를 확인할 수 있다. 다만, 스포라딕 실행기(255)는 프로세스에 대해 제어권을 확보하기가 힘들어서 데드라인에 기반한 스케줄링 어려울 수 있다.  Sporadic executor 255 may check the event for the process type as well. However, the Sporadic executor 255 may have difficulty in obtaining control over a process and may be difficult to schedule based on a deadline.

즉 데드라인에 따른 스케쥴링은 .so 유형에서만 가능할 수 있다. 그러나, 스포라딕 실행기(255)는 프로세스 유형도 조건이 만족하면 스포라딕 동작을 실행할 수 있다.That is, deadline scheduling may be possible only in the .so type. However, the sporadic executor 255 may execute the sporadic operation when the process type and the condition are satisfied.

스포라딕 실행기(255)는 condition() 함수에 의해 이벤트 발생 여부를 확인할 수 있다. 스포라딕 실행기(255)는 condition() 함수의 리턴 값이 TRUE이면 이벤트가 발생한 것으로 판별하여 .so 혹은 프로세스를 등록하여 데드라인을 확인할 수 있다.The sporadic executor 255 can check whether an event has occurred by the condition () function. If the return value of the condition () function is TRUE, the Sporadic executor 255 may determine that an event has occurred and register a .so or a process to check the deadline.

스포라딕 실행기(255)가 스레드 유형 및 프로세스 유형의 모듈을 실행하는 동작은 상술한 주기 실행기(255)에서의 동작과 동일할 수 있다.The operation of the sporadic executor 255 to execute the module of the thread type and the process type may be the same as the operation in the periodic executor 255 described above.

도 12는 도 1에 도시된 실시간 스케줄링 장치에 의한 타이밍 다이어그램의 예를 나타내고, 도 13은 도 5에 도시된 주기 실행기 및 스포라딕 실행기의 동작의 예를 나타낸다.FIG. 12 shows an example of a timing diagram by the real time scheduling apparatus shown in FIG. 1, and FIG. 13 shows an example of the operation of the periodic executor and the sporadic executor shown in FIG.

도 12 및 도 13을 참조하면, 실행기(253)는 스케줄링 테이블의 각 행에 나열된 모듈들을 각 주기에 따라 순차적으로 실행할 수 있다. 주기 실행기(253)는 우선적으로 주기 모듈을 실행하고, 스포라딕 실행에 대한 모듈의 컨디션(또는 이벤트 컨디션)을 판별할 수 있다.12 and 13, the executor 253 may sequentially execute modules listed in each row of the scheduling table according to each period. The cycle executor 253 may first execute the cycle module and determine the condition (or event condition) of the module for sporadic execution.

그 후, 모듈의 컨디션 판별 결과에 기초하여 스포라딕 모듈을 실행할 수 있다. 그 후, 시간이 남으면 비실시간 모듈을 실행할 수 있다.Thereafter, the sporadic module can be executed based on the condition determination result of the module. Then, if time remains, the non-real time module can be executed.

기본 주기만큼의 시간이 지나고 나면 실행기(250)는 상술한 동작을 반복적으로 실행할 수 있다.After a period of time equal to the basic period, the executor 250 may repeatedly execute the above-described operation.

주기 실행과 스포라딕 실행은 스레드 유형과 프로세스 유형의 2가지 유형을 포함할 수 있다. 실행 유형에 따라 실행기(250)는 스케줄러의 제어 방식을 변형시킬 수 있다.Cycle execution and sporadic execution can include two types: thread type and process type. Depending on the type of execution, the executor 250 may modify the scheduler's control scheme.

주기 실행기(253)는 도 13의 예시와 같이, 주기 실행에 대한 스레드 유형(.so 유형) 모듈의 스레드를 실행하기 위해 실행함수를 호출하고, 주기 프로세스 유형의 경우, 프로세스의 실행을 위해 신호를 보낼 수 있다.The cycle executor 253 calls an execution function to execute a thread of a thread type (.so type) module for cycle execution, as shown in the example of FIG. can send.

스포라딕 실행기(255) 모듈의 컨디션을 판별하여 스레드 유형(.so) 및 프로세스 유형의 스포라딕 모듈을 실행할 수 있다. 그 후, 비실시간 실행기(251)는 비실시간 모듈을 실행할 수 있다.The condition of the Sporadic executor 255 module can be determined to execute the Sporadic module of thread type (.so) and process type. Thereafter, the non-real time executor 251 may execute the non-real time module.

도 14a는 도 1에 도시된 실시간 스케줄링 장치의 성능의 일 예를 나타내고, 도 14b는 도 1에 도시된 실시간 스케줄링 장치의 성능의 다른 예를 나타낸다.14A illustrates an example of the performance of the real-time scheduling apparatus illustrated in FIG. 1, and FIG. 14B illustrates another example of the performance of the real-time scheduling apparatus illustrated in FIG. 1.

도 14a 및 14b를 참조하면, 실시간 스케줄링 장치(10)의 성능이 검증될 수 있다.14A and 14B, the performance of the real time scheduling apparatus 10 may be verified.

실시간 스케줄링 장치(10)의 스케줄링 알고리즘의 유효성을 검증하기 위하여 아래와 같은 운영체제 및 사양의 PC(Personal Computer)에서 표 1과 같은 데이터를 사용하여 실험이 수행될 수 있다.In order to verify the validity of the scheduling algorithm of the real-time scheduling apparatus 10, an experiment may be performed using the data shown in Table 1 in a personal computer (PC) of the following operating system and specifications.

- Ubuntu 14.04 LTS, - Ubuntu 14.04 LTS,

- Xenomai-3.0.3- Xenomai-3.0.3

- CPU: Intel i5-2500, 3.3GHz, X86_64- CPU: Intel i5-2500, 3.3 GHz, X86_64

NoNo Number of
Periodic modules
Number of
Periodic modules
Number of
Sporadic
modules
Number of
Sporadic
modules
Number of Non- real-time
modules
Number of non-real-time
modules
Type of
measured
module
Type of
measured
module
.so.so exeexe 1One 1One 00 00 00 threadthread 22 55 00 00 00 threadthread 33 99 00 00 00 threadthread 44 00 1One 00 00 ProcessProcess 55 00 55 00 00 ProcessProcess 66 00 99 00 00 ProcessProcess 77 44 55 00 00 ThreadThread 88 99 99 55 1One ProcessProcess 99 99 99 55 1One ThreadThread

테스트는 주기 모듈들이 주기 수행에 얼마나 영향을 받는지에 관해 평가할 수 있다. 테스트를 통해, 주기 지터(jitter)에 관련된 통계가 측정될 수 있다. The test can evaluate how cycle modules are affected by cycle performance. Through testing, statistics relating to periodic jitter can be measured.

실시간 스케줄링 장치(10)는 표 1의 주기 모듈, 스포라딕 모듈 및 비실시간 모듈을 사용하여 테스트를 수행할 수 있다. 표 1의 테스트 케이스들은 주기 300 us로 동작할 수 있다. 표 1의 Type of measured module은 지터를 측정하는 모듈이 스레드 유형(.so) 인지 프로세스 유형(exe) 형인지를 나타낼 수 있다. The real time scheduling apparatus 10 may perform a test using the periodic module, the Sporadic module, and the non-real time module of Table 1. The test cases in Table 1 can operate with a period of 300 us. The Type of measured module of Table 1 may indicate whether a module for measuring jitter is a thread type (.so) or a process type (exe) type.

표 1에 따른 수행 결과는 표 2와 같이 나타낼 수 있다.Performance results according to Table 1 may be represented as shown in Table 2.

NoNo Jitter mean
(us)
Jitter mean
(us)
Jitter variance
(us)
Jitter variance
(us)
Jitter(%) mean*100 basic periodJitter (%) mean * 100 basic period Jitter 최악
(us)
Jitter worst
(us)
Jitter (%)
최악*100
/주기
Jitter (%)
Worst * 100
/Cycle
1One 0.0100.010 0.0370.037 0.003%0.003% 4.44.4 1.5%1.5% 22 0.0100.010 0.0370.037 0.003%0.003% 2.32.3 0.76%0.76% 33 0.0100.010 0.0300.030 0.003%0.003% 26.3026.30 8.78%8.78% 44 0.0100.010 0.360.36 0.003%0.003% 7.507.50 2.5%2.5% 55 0.0100.010 0.330.33 0.003%0.003% 8.218.21 2.7%2.7% 66 0.0100.010 0.470.47 0.003%0.003% 28.1028.10 9.4%9.4% 77 0.0100.010 0.0200.020 0.003%0.003% 4.594.59 1.5%1.5% 88 0.2380.238 0.0000.000 0.08%0.08% 25.70925.709 8.57%8.57% 99 1.5171.517 0.005260.00526 0.50%0.50% 36.82336.823 12.27%12.27%

도 14a 및 14b는 각각 테스트케이스 8과 9에 대한 지터 변화를 나타낼 수 있다. 표 2, 도 14a 및 14b를 참조하면, 가장 실행 횟수가 많은 테스트 케이스 9에서도 실시간 스케줄링 장치(10)가 거의 주기를 지키고 있음을 알 수 있다. 테스트 케이스 9의 경우에 최악 지터가 발생되는데, 최악임에도 불구하고 실제로 12.27% 정도의 지터가 발생함이 확인될 수 있다.14A and 14B may show jitter variations for test cases 8 and 9, respectively. Referring to Tables 2 and 14A and 14B, it can be seen that the real-time scheduling apparatus 10 almost maintains the cycle even in the test case 9 having the highest number of executions. The worst case jitter occurs in test case 9, and although it is the worst, it can be seen that there is actually about 12.27% jitter.

즉, 표 2는 실시간 스케줄링 장치(10)가 산업용 로봇의 제어에 효율적으로 활용될 수 있음을 보여 주고 있다.That is, Table 2 shows that the real-time scheduling device 10 can be effectively used for the control of the industrial robot.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. Computer-readable media may include, alone or in combination with the program instructions, data files, data structures, and the like. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device. Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. Or may be permanently or temporarily embodied in a signal wave to be transmitted. The software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner. Software and data may be stored on one or more computer readable recording media.

이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described with reference to the accompanying drawings, those skilled in the art may apply various technical modifications and variations based on the above. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the following claims.

Claims (18)

실시간 스케줄링에 있어서,
프로세스 및 스레드에 대한 정보를 수신하는 단계;
상기 정보를 이용하여 모듈 파일(module file)을 생성하는 단계;
상기 모듈 파일로부터 상기 정보를 추출하여 스케줄링 테이블을 생성하는 단계; 및
상기 스케줄링 테이블에 기초하여 상기 프로세스 및 상기 스레드를 실행하는 단계
를 포함하는 실시간 스케줄링 방법.
In real time scheduling,
Receiving information about processes and threads;
Generating a module file using the information;
Extracting the information from the module file to generate a scheduling table; And
Executing the process and the thread based on the scheduling table
Real time scheduling method comprising a.
제1항에 있어서,
상기 모듈 파일은 복수의 모듈을 포함하고,
각각의 모듈은 모듈의 유형에 관한 정보, 모듈의 실행 유형에 관한 정보, 주기 정보, 데드라인(deadline) 정보 및 우선 순위 정보 중 적어도 하나의 정보를 포함하는
실시간 스케줄링 방법.
The method of claim 1,
The module file includes a plurality of modules,
Each module includes at least one of information about the type of the module, information about the type of execution of the module, cycle information, deadline information and priority information
Real time scheduling method.
제2항에 있어서,
상기 모듈의 유형은,
프로세스 유형 및 스레드 유형을 포함하는
실시간 스케줄링 방법.
The method of claim 2,
The module type is
Including process type and thread type
Real time scheduling method.
제3항에 있어서,
상기 모듈의 실행 유형은,
주기(periodic) 실행 유형, 스포라딕(sporadic) 실행 유형 및 비실시간(non-real time) 실행 유형을 포함하는
실시간 스케줄링 방법.
The method of claim 3,
The execution type of the module is
Including periodic run types, sporadic run types, and non-real time run types
Real time scheduling method.
제4항에 있어서,
상기 스케줄링 테이블을 생성하는 단계는,
상기 복수의 모듈을 이용하여 주기 실행을 위한 스케줄링 테이블을 생성하는 단계; 및
상기 복수의 모듈을 이용하여 스포라딕 실행을 위한 스케줄링 테이블을 생성하는 단계
를 포함하는 실시간 스케줄링 방법.
The method of claim 4, wherein
Generating the scheduling table,
Generating a scheduling table for executing a period using the plurality of modules; And
Generating a scheduling table for sporadic execution using the plurality of modules
Real time scheduling method comprising a.
제5항에 있어서,
상기 실행하는 단계는,
상기 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계;
상기 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계; 및
상기 실행 유형이 상기 비실시간 실행 유형인 모듈을 실행하는 단계
를 포함하는 실시간 스케줄링 방법.
The method of claim 5,
The step of performing,
Obtaining and executing a module from a scheduling table for executing the period;
Obtaining and executing a module from the scheduling table for executing Sporadic; And
Executing a module of which the execution type is the non-real-time execution type
Real time scheduling method comprising a.
제6항에 있어서,
상기 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계는,
상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하는 단계; 및
상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보내는 단계
를 포함하는 실시간 스케줄링 방법.
The method of claim 6,
Acquiring and executing a module from the scheduling table for executing the cycle,
Calling an execution function for execution of the thread if the type of the module is the thread type; And
Sending a signal for execution of the process if the type of the module is the process type
Real time scheduling method comprising a.
제6항에 있어서,
상기 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 단계는,
상기 모듈의 컨디션(condition)을 판별하는 단계; 및
상기 컨디션에 기초하여 상기 모듈을 실행하는 단계
를 포함하는 실시간 스케줄링 방법.
The method of claim 6,
Acquiring and executing a module from the scheduling table for Sporadic execution,
Determining a condition of the module; And
Executing the module based on the condition
Real time scheduling method comprising a.
제8항에 있어서,
상기 모듈을 실행하는 단계는,
상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하는 단계; 및
상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보내는 단계
를 포함하는 실시간 스케줄링 방법.
The method of claim 8,
The step of executing the module,
Calling an execution function for execution of the thread if the type of the module is the thread type; And
Sending a signal for execution of the process if the type of the module is the process type
Real time scheduling method comprising a.
실시간 스케줄링에 있어서,
프로세스 및 스레드에 대한 정보를 수신하는 수신기; 및
상기 프로세스 및 상기 스레드에 대한 정보에 기초한 스케줄링 테이블을 이용하여 상기 프로세스 및 상기 스레드를 실행하는 컨트롤러
를 포함하고,
상기 컨트롤러는,
상기 정보를 이용하여 모듈 파일(module file)을 생성하는 모듈 파일 생성기;
상기 모듈 파일로부터 상기 정보를 추출하여 스케줄링 테이블을 생성하는 스케줄링 테이블 생성기; 및
상기 스케줄링 테이블에 기초하여 상기 프로세스 및 상기 스레드를 실행하는 실행기
를 포함하는 실시간 스케줄링 장치.
In real time scheduling,
A receiver for receiving information about processes and threads; And
A controller that executes the process and the thread using a scheduling table based on information about the process and the thread
Including,
The controller,
A module file generator for generating a module file using the information;
A scheduling table generator for extracting the information from the module file to generate a scheduling table; And
An executor executing the process and the thread based on the scheduling table
Real time scheduling device comprising a.
제10항에 있어서,
상기 모듈 파일은 복수의 모듈을 포함하고,
각각의 모듈은 모듈의 유형에 관한 정보, 모듈의 실행 유형에 관한 정보, 주기 정보, 데드라인(deadline) 정보 및 우선 순위 정보 중 적어도 하나의 정보를 포함하는
실시간 스케줄링 장치.
The method of claim 10,
The module file includes a plurality of modules,
Each module includes at least one of information about the type of the module, information about the type of execution of the module, cycle information, deadline information and priority information
Real time scheduling device.
제11항에 있어서,
상기 모듈의 유형은,
프로세스 유형 및 스레드 유형을 포함하는
실시간 스케줄링 장치.
The method of claim 11,
The module type is
Including process type and thread type
Real time scheduling device.
제12항에 있어서,
상기 모듈의 실행 유형은,
주기(periodic) 실행 유형, 스포라딕(sporadic) 실행 유형 및 비실시간(non-real time) 실행 유형을 포함하는
실시간 스케줄링 장치.
The method of claim 12,
The execution type of the module is
Including periodic run types, sporadic run types, and non-real time run types
Real time scheduling device.
제13항에 있어서,
상기 스케줄링 테이블 생성기는,
상기 복수의 모듈을 이용하여 주기 실행을 위한 스케줄링 테이블을 생성하고, 상기 복수의 모듈을 이용하여 스포라딕 실행을 위한 스케줄링 테이블을 생성하는
실시간 스케줄링 장치.
The method of claim 13,
The scheduling table generator,
Generating a scheduling table for periodic execution using the plurality of modules, and generating a scheduling table for sporadic execution using the plurality of modules
Real time scheduling device.
제14항에 있어서,
상기 실행기는,
상기 주기 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 주기 실행기;
상기 스포라딕 실행을 위한 스케줄링 테이블로부터 모듈을 획득하여 실행하는 스포라딕 실행기; 및
상기 실행 유형이 상기 비실시간 실행 유형인 모듈을 실행하는 비실시간 실행기
를 포함하는 실시간 스케줄링 장치.
The method of claim 14,
The launcher,
A cycle executor for acquiring and executing a module from a scheduling table for executing the cycle;
A sporadic executor for obtaining and executing a module from the scheduling table for executing the sporadic; And
A non-real time launcher for executing a module of which the execution type is the non-real time execution type.
Real time scheduling device comprising a.
제15항에 있어서,
상기 주기 실행기는,
상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하고, 상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보내는
실시간 스케줄링 장치.
The method of claim 15,
The cycle executor,
Invoke an execution function for execution of the thread when the type of the module is the thread type and send a signal for execution of the process when the type of the module is the process type.
Real time scheduling device.
제15항에 있어서,
상기 스포라딕 실행기는,
상기 모듈의 컨디션(condition)을 판별하고, 상기 컨디션에 기초하여 상기 모듈을 실행하는
실시간 스케줄링 장치.
The method of claim 15,
The Sporadic Launcher,
Determine a condition of the module, and execute the module based on the condition
Real time scheduling device.
제17항에 있어서,
상기 스포라딕 실행기는,
상기 모듈의 유형이 상기 스레드 유형인 경우에 상기 스레드의 실행을 위해 실행 함수를 호출하고, 상기 모듈의 유형이 상기 프로세스 유형인 경우에 상기 프로세스의 실행을 위해 신호(signal)를 보내는
실시간 스케줄링 장치.
The method of claim 17,
The Sporadic Launcher,
Invoke an execution function for execution of the thread when the type of the module is the thread type and send a signal for execution of the process when the type of the module is the process type.
Real time scheduling device.
KR1020180057344A 2018-05-18 2018-05-18 Method and apparatus of real-time scheduling for industrial robot system KR102149171B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180057344A KR102149171B1 (en) 2018-05-18 2018-05-18 Method and apparatus of real-time scheduling for industrial robot system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180057344A KR102149171B1 (en) 2018-05-18 2018-05-18 Method and apparatus of real-time scheduling for industrial robot system

Publications (2)

Publication Number Publication Date
KR20190132097A true KR20190132097A (en) 2019-11-27
KR102149171B1 KR102149171B1 (en) 2020-08-28

Family

ID=68730077

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180057344A KR102149171B1 (en) 2018-05-18 2018-05-18 Method and apparatus of real-time scheduling for industrial robot system

Country Status (1)

Country Link
KR (1) KR102149171B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102250716B1 (en) * 2020-02-04 2021-05-11 선문대학교 산학협력단 Scheduling system under blockchain mechanism

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010044784A (en) * 1998-11-09 2010-02-25 Intel Corp Scheduling request in system
KR101313692B1 (en) * 2009-12-18 2013-10-02 한국전자통신연구원 Fault Tolerance Method for Robot Software Component

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010044784A (en) * 1998-11-09 2010-02-25 Intel Corp Scheduling request in system
KR101313692B1 (en) * 2009-12-18 2013-10-02 한국전자통신연구원 Fault Tolerance Method for Robot Software Component

Also Published As

Publication number Publication date
KR102149171B1 (en) 2020-08-28

Similar Documents

Publication Publication Date Title
Burns Preemptive priority based scheduling: An appropriate engineering approach
US6625635B1 (en) Deterministic and preemptive thread scheduling and its use in debugging multithreaded applications
US10274936B2 (en) Control apparatus
US9417930B2 (en) Time slack application pipeline balancing for multi/many-core PLCs
CN104008005B (en) Apparatus, method and system for controlling a processor
CN110955503B (en) Task scheduling method and device
KR20190132097A (en) Method and apparatus of real-time scheduling for industrial robot system
Carnevali et al. A formal approach to design and verification of two-level hierarchical scheduling systems
EP3401784A1 (en) Multicore processing system
US20100325635A1 (en) Method for correct-by-construction development of real-time-systems
JP2011192166A (en) Task schedule device and task schedule method
US20120173928A1 (en) Analyzing Simulated Operation Of A Computer
Cinque et al. Rpuguard: Real-time processing unit virtualization for mixed-criticality applications
KR101674324B1 (en) Task scheduling device and method for real-time control applications
US20100180279A1 (en) Field control device and field control method
Chen et al. Integrating I/O Time to Virtual Time System for High Fidelity Container-based Network Emulation
CN115599507A (en) Data processing method, execution workstation, electronic device and storage medium
US20150363227A1 (en) Data processing unit and method for operating a data processing unit
DE602005002533D1 (en) DMAC OUTPUT MECHANISM USING A STEAMING ID PROCESS
Park et al. Real-time scheduler for Middleware of Industrial Robot
Crespo et al. Execution control in mixed-criticality systems
Micea et al. Highly predictable execution support for critical applications with HARETICK kernel
Moisuc et al. Hardware event handling in the hardware real-time operating systems
CN110109743B (en) Real-time process scheduling method
JP3358123B2 (en) Controller input / output simulation method and apparatus

Legal Events

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