KR20100078974A - Operating system based osek and its software update system for wireless sensor nodes - Google Patents

Operating system based osek and its software update system for wireless sensor nodes Download PDF

Info

Publication number
KR20100078974A
KR20100078974A KR1020080137368A KR20080137368A KR20100078974A KR 20100078974 A KR20100078974 A KR 20100078974A KR 1020080137368 A KR1020080137368 A KR 1020080137368A KR 20080137368 A KR20080137368 A KR 20080137368A KR 20100078974 A KR20100078974 A KR 20100078974A
Authority
KR
South Korea
Prior art keywords
operating system
osek
task
software update
kernel
Prior art date
Application number
KR1020080137368A
Other languages
Korean (ko)
Inventor
홍춘표
김창훈
박종태
Original Assignee
대구대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 대구대학교 산학협력단 filed Critical 대구대학교 산학협력단
Priority to KR1020080137368A priority Critical patent/KR20100078974A/en
Publication of KR20100078974A publication Critical patent/KR20100078974A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/226Microinstruction function, e.g. input/output microinstruction; diagnostic microinstruction; microinstruction format
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4893Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues taking into account power or heat criteria

Abstract

PURPOSE: An operating system based on OSEK(Open Systems and their Interfaces for the Electronics in Motor Vehicles) and a software update system thereof for wireless sensor nodes are provided to perform a software update function by using wireless communication with a software update manager. CONSTITUTION: An OS(Operating System) for sensor node observes the standard of an intelligent OS defined in an OSEK. A kernel is classified into the processing levels for an interrupt, a scheduler and a task. A service or object within each level has priority and a size and function depending on CC(Conformance Classes). A high speed ISP(In-System-Programming) module is inserted into the kernel, and an update manage of a GUI(Graphic User Interface) environment is operated in a PC.

Description

OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템{Operating system based OSEK and its software update system for wireless sensor nodes}Operating system based OSEK and its software update system for wireless sensor nodes

본 발명은 OSEK 기반 센서 노드용 운영체제에 관한 것으로서, 더욱 상세하게는 계층화된 커널 구조, 적용되는 응용에 따른 운영체제의 크기 조절, 선점형 우선순위 기반 태스크 스케줄링을 통한 실시간 처리 지원, 복잡한 제어 동작 수행을 위한 태스크 모델 구분, 안정적인 인터럽트 처리, 효율적인 이벤트 관리 메커니즘, 공유 자원 관리 정책, 순환되는 작업을 위한 타이머 서비스, 그리고 소프트웨어 업데이트 매니저를 이용한 원격 소프트웨어 업데이트 기능을 제공함으로써 다양한 센서 네트워크 응용에 적합할 뿐만 아니라 OSEK 표준을 준수하였기 때문에 저가형 CPU를 사용하는 지능형 자동차용으로도 충분히 활용 가능한 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템에 관한 것이다.The present invention relates to an OSEK-based operating system for sensor nodes, and more particularly, to a layered kernel structure, to size an operating system according to an applied application, to support real-time processing through preemptive priority-based task scheduling, and to perform complex control operations. OSEK not only suitable for various sensor network applications by providing task model classification, stable interrupt handling, efficient event management mechanism, shared resource management policy, timer service for recurring tasks, and remote software update function using Software Update Manager. It is an operating system and software update system for OSEK-based sensor nodes that can be fully utilized for intelligent vehicles using low-cost CPUs because of compliance with the standard.

무선 센서 네트워크는 각종 센서가 부착되어 있어 센싱이 가능하고 센싱된 정보를 가공할 수 있는 소형 MCU(Micro Control Unit) 및 이를 송수신할 수 있는 무선 통신 칩으로 구성된 저가의 소형 장치, 즉 센서 노드로 구성된 네트워크를 의 미한다.The wireless sensor network is composed of a small microcontrol unit (MCU) capable of sensing and processing sensed information with various sensors attached to it, and a low-cost compact device, that is, a sensor node composed of a wireless communication chip capable of transmitting and receiving the sensor. Means network.

하지만 센서 노드는 적은 메모리, 배터리 용량의 제한, 컴퓨팅 성능의 제약 등 제한적인 하드웨어 자원을 가지고 있기 때문에 효율적으로 자원을 관리하고 센서 네트워크상에서의 다양한 응용 환경을 제공하기 위한 센서 노드용 운영체제 연구의 필요성이 강조되고 있다.However, since sensor nodes have limited hardware resources such as limited memory, limited battery capacity, and limited computing power, there is a need for research on operating system for sensor nodes to manage resources efficiently and provide various application environments on sensor networks. It is emphasized.

OSEK(Open Systems and their Interfaces for the Electronics in Motor Vehicles)은 지능형 자동차에서 복잡한 실시간 어플리케이션을 수행하면서도 자원의 사용을 최소화하여 효율적으로 동작할 수 있도록 정의한 지능형 자동차용 실시간 운영체제 표준이다.Open Systems and their Interfaces for the Electronics in Motor Vehicles (OSEK) is a real-time operating system standard for intelligent vehicles that enables intelligent vehicles to perform complex real-time applications while operating efficiently with minimal use of resources.

그리고 OSEK 운영체제의 효율적인 자원 관리 및 실시간 처리 기법은 센서 네트워크에서도 그대로 적용될 수 있다.And the efficient resource management and real-time processing of the OSEK operating system can be applied to the sensor network.

무선 센서 네트워크는 100에서 1000개 이상의 노드들로 구성되는 큰 규모로 동작할 수 있다. 그러나 배포된 노드에 적재된 프로그램은 새로운 소프트웨어로 교체되거나 버그가 발생하여 수정되어야 하는 경우, 수 많은 노드 들을 수거하고 모든 노드들을 다시 프로그래밍하는 것은 많은 노력이 요구되며 거의 불가능하다고 할 수 있다.The wireless sensor network can operate on a large scale consisting of 100 to 1000 or more nodes. However, if a program loaded on a distributed node needs to be replaced with new software or a bug has to be fixed, then retrieving a large number of nodes and reprogramming all nodes can be difficult and almost impossible.

이를 위해서 네트워크를 통해서 새로운 프로그램을 전파하고 프로그램을 업데이트하는 것은 센서네트워크에 있어서 꼭 필요한 기술로 인식되었고 현재까지 많은 연구가 진행되어 왔다.To this end, propagating new programs and updating programs through the network have been recognized as essential technologies for sensor networks, and many studies have been conducted to date.

최근 지능형 자동차 부품의 다기능화와 이를 제어하는 어플리케이션의 복잡 도가 증가하고 각 ECU(Electronic Control Unit)가 사용하는 자원 요구량과 비용이 증가하게 되었다. OSEK은 각 ECU가 복잡한 실시간 어플리케이션을 수행하면서도 자원의 사용을 최소화하여 효율적으로 동작할 수 있도록 유럽계의 유명 자동차 회사들이 공동으로 협의하여 정의한 지능형 자동차용 실시간 운영체제 표준이다. Recently, the versatility of intelligent automotive parts and the complexity of the applications that control them have increased, and the resource requirements and costs used by each ECU (Electronic Control Unit) have increased. OSEK is an intelligent automotive real-time operating system standard that is jointly defined by leading European carmakers to enable each ECU to operate efficiently while minimizing resource use while performing complex real-time applications.

OSEK 운영체제 표준은 실시간 처리를 위한 멀티태스킹, 이벤트 및 자원관리, 인터럽트 처리, 알람 기능을 정의하고 있다.The OSEK operating system standard defines multitasking, event and resource management, interrupt handling, and alarm functions for real-time processing.

OSEK 운영체제는 태스크의 수행 상태를 관리하고 스케줄러를 통해 태스크의 수행 순서를 결정하는 기능을 제공한다. 태스크는 도 1과 같이 4가지 상태를 가지며 각 상태가 의미하는 것은 아래의 표 1과 같다.The OSEK operating system provides the ability to manage the execution status of tasks and determine the order in which tasks are performed through the scheduler. The task has four states as shown in FIG. 1 and the meanings of the states are shown in Table 1 below.

OSEK 운영체제의 태스크 상태Task status of the OSEK operating system 상 태  condition 의 미               meaning RUNNING RUNNING 태스크가 현재 수행 중인 상태 Task is currently running READY READY 스케줄링을 위한 대기 상태 Wait state for scheduling WAITING WAITING 특정한 이벤트가 발생하기를 기다리며 작업을 일시적으로 중단한 상태 Temporarily interrupted work while waiting for a specific event to occur SUSPENDED SUSPENDED 태스크의 작업이 종료된 상태 The job's job has ended

태스크는 별도의 메모리 영역을 가지고 있으며 이 영역에 각 태스크 제어를 위한 정보를 저장한다. 스케줄러는 READY 상태로 존재하는 태스크들 중에서 우선순위가 가장 높은 태스크를 선택하고 문맥 교환을 통해 선택된 태스크가 이전에 수행하던 작업을 재개할 수 있도록 한다. 도 2는 OSEK 운영체제의 태스크 스케줄링 방식을 나타낸 것이다.The task has a separate memory area and stores information for controlling each task in this area. The scheduler selects the highest priority task among the tasks that exist in the READY state and allows context selection to resume the work previously performed by the selected task. 2 illustrates a task scheduling method of an OSEK operating system.

이벤트는 특정한 사건이 발생하였음을 태스크에게 알리기 위한 용도로 사용되며 태스크 또는 커널에 의해서 발생하여 지정한 태스크로 전달된다. 태스크는 특정한 이벤트가 발생하기를 기다릴 수 있으며 이 경우 WAITING 상태가 되고 수행 중이던 작업은 해당 이벤트가 발생할 때까지 중단된다. An event is used to notify a task that a particular event has occurred. It is generated by a task or kernel and delivered to a specified task. The task can wait for a specific event to occur, in which case it will be in the WAITING state and any work it is doing will be suspended until that event occurs.

OSEK 운영체제는 우선순위 상한 프로토콜(Priority Ceiling Protocol)을 사용하여 일반적인 자원 공유 프로토콜에서 발생할 수 있는 우선순위 역전 및 데드락 현상을 방지한다.The OSEK operating system uses the Priority Ceiling Protocol to prevent priority reversal and deadlock that can occur with common resource sharing protocols.

OSEK 운영체제는 인터럽트에 대한 2개의 카테고리를 정의하고 있다. 카테고리 1은 시스템 서비스를 사용하지 않는 인터럽트 루틴으로 태스크 관리에 영향을 주지 않으며 적은 오버헤드를 가지는 특징이 있다. 카테고리 2는 인터럽트 루틴 내에서 시스템 서비스를 호출할 수 있다. 이는 태스크 스케줄링에 영향을 줄 수 있기 때문에 인터럽트 루틴이 종료한 후에는 반드시 다시 스케줄링을 수행해야 한다.OSEK The operating system defines two categories of interrupts. Category 1 is an interrupt routine that does not use system services. It does not affect task management and is characterized by low overhead. Category 2 can call a system service from within an interrupt routine. This can affect task scheduling, so you must reschedule after the interrupt routine has finished.

순환 또는 반복되는 작업을 처리하기 위해서 OSEK 운영체제는 알람 서비스를 제공한다. 알람은 3가지 유형(태스크 활성화, 이벤트 발생, 콜백 루틴 수행)으로 동작할 수 있으며 이에 대한 정보는 시스템 생성 단계에서 정적으로 할당된다.To handle recurring or recurring tasks, the OSEK operating system provides an alarm service. Alarms can operate in three types: task activation, event generation, and callback routine execution. Information about them is statically assigned during system generation.

TinyOS는 UC Berkeley에서 개발되었으며 다양한 하드웨어 및 시스템 기능을 모듈의 형태로 지원하며 프로그램은 모듈화 된 컴포넌트를 연결하고 컴포넌트 사이에 이벤트를 주고받게 함으로써 전체 기능을 수행한다. 모든 시스템 컴포넌트와 응용 코드는 TinyOS 프로그래밍 언어인 nesC로 개발되며, nesC 컴파일러는 컴포넌트를 서로 조합하고 커널을 포함하여 한 개의 바이너리를 생성한다. TinyOS는 이벤트 기반(event-driven), 그리고 단일(monolithic) 커널 센서 운영체제의 특징을 가진다.TinyOS was developed at UC Berkeley and supports various hardware and system functions in the form of modules. The program performs the full function by connecting modular components and sending events between components. All system components and application code are developed in nesC, the TinyOS programming language, and the nesC compiler combines the components together and generates a binary, including the kernel. TinyOS features event-driven and monolithic kernel sensor operating systems.

MANTIS는 콜로라도 대학에서 개발되었으며 멀티 스레드 및 빠른 프로토타이핑을 지원한다. 스레드는 다섯 단계의 우선순위를 가지고 있으며 선점 가능하여 작은 단위로 스케줄링 할 수 있다. 실행 시 응용 스레드는 커널 메모리와 별도의 스택에서 작업을 수행하며 세마포어 등 기본적인 동기화 기법을 지원한다.MANTIS was developed at the University of Colorado and supports multithreading and rapid prototyping. Threads have five levels of priority and can be preempted and scheduled in small increments. At run time, the application thread runs on a separate stack from kernel memory and supports basic synchronization techniques such as semaphores.

SOS]는 모듈 기반의 센서 운영체제로써 UCLA의 NESL에서 개발하였다. 커널을 정적인 모듈과 동적 모듈 두 개의 영역으로 구분하고 동적 모듈을 커널과 독립적으로 개발 및 링크하여 시스템이 배포된 후 수정이 비교적 자유롭다는 장점을 가진다. SOS는 동적 모듈을 지원하기 위해 상대 주소 참조(Position Independent Code)방식을 사용한다. 동적 모듈과 정적 커널은 상호 간 통신을 위해 이벤트를 사용하며 우선순위 기반의 이벤트 스케줄링 기법과 동적 메모리 할당 및 메모리 보호 기능을 제공한다.SOS] is a module based sensor operating system developed by NESL of UCLA. By dividing the kernel into two areas, static and dynamic modules, and developing and linking dynamic modules independently of the kernel, the modification is relatively free after the system is deployed. SOS uses Position Independent Code to support dynamic modules. Dynamic modules and static kernels use events to communicate with each other and provide priority-based event scheduling techniques, dynamic memory allocation, and memory protection.

Swedish Institute of Computer Science에서 개발된 Contiki는 멀티태스킹 지원을 위한 센서 운영체제이다. 커널은 이벤트 드리븐 방식의 커널에서 응용 프로그램을 실행 중에 동적으로 적재할 수 있으며 Protothreads를 사용하여 멀티태스킹 응용 개발 환경을 제공한다. 프로세스 단위의 선점형 멀티 스레드와 이벤트를 통한 메시지 전달, Rime 통신 스택, 네트워크 시뮬레이터 그리고 에너지 측정 기능을 제공한다.Contiki, developed by the Swedish Institute of Computer Science, is a sensor operating system for multitasking support. The kernel can dynamically load an application at runtime in an event-driven kernel and uses Protothreads to provide a multitasking application development environment. It provides process-level preemptive multithreading and message passing through events, Rime communication stack, network simulator, and energy measurement.

본 발명은 상기한 실정을 감안하여 소프트웨어 업데이트 매니저를 이용한 원격 소프트웨어 업데이트 기능을 제공하고자 발명한 것으로서, 그 목적은 계층화된 커널 구조, 적용되는 응용에 따른 운영체제의 크기 조절, 선점형 우선순위 기반 태스크 스케줄링을 통한 실시간 처리 지원, 복잡한 제어 동작 수행을 위한 태스크 모델 구분, 안정적인 인터럽트 처리, 효율적인 이벤트 관리 메커니즘, 공유 자원 관리 정책, 순환되는 작업을 위한 타이머 서비스를 제공함으로써 다양한 센서 네트워크 응용에 적합한 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템을 제공함에 있다.The present invention has been made to provide a remote software update function using a software update manager in view of the above situation, and its object is to provide a layered kernel structure, size adjustment of an operating system according to an applied application, and preemptive priority based task scheduling. OSEK-based sensor node suitable for various sensor network applications by providing real-time processing support, task model classification for performing complex control operations, stable interrupt handling, efficient event management mechanism, shared resource management policy, and timer service for recurring tasks To provide an operating system and software update system.

본 발명의 다른 목적은 소프트웨어 업데이트 매니저와 무선 통신을 이용한 소프트웨어 업데이트 기능을 가능하게 하는 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템을 제공하는 데 있다.Another object of the present invention is to provide an OSEK-based sensor node operating system and software update system for enabling a software update function using a software update manager and wireless communication.

본 발명의 또 다른 목적은 OSEK 표준을 준수하였기 때문에 센서 노드뿐만 아니라 저가형 CPU를 사용하는 지능형 자동차용으로도 활용 가능한 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템을 제공하는 데 있다.Yet another object of the present invention is to provide an OSEK-based sensor node operating system and software update system that can be utilized not only for sensor nodes but also for intelligent vehicles using low-cost CPUs.

상기한 목적을 달성하기 위한 본 발명 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템은 OSEK에서 정의된 지능형 운영체제의 표준을 준수하면서 센서 네트워크 응용환경에 적합한 안정적인 센서 노드용 운영체제(10)와; 인 터럽트, 스케줄러, 태스크의 처리 레벨로 구분되어 각 레벨 내에 있는 서비스나 개체들은 모두 우선순위를 가지고 있으며 CC(Conformance Classes)에 따라 각 개체들의 크기와 기능들이 결정되는 커널(20)과; 상기 커널(20)에 삽입되는 고속 ISP(In-System-Programming) 모듈(30) 및; Host PC 상에서 동작하는 GUI 환경의 업데이트 매니저(40)로 구성된 것을 특징으로 한다.The OSEK-based operating system and software update system for the present invention for achieving the above object is a stable sensor node operating system (10) suitable for the sensor network application environment while complying with the standard of the intelligent operating system defined in OSEK; A kernel 20 which is divided into an interrupt level, a scheduler, and a processing level of a task, and all services or objects within each level have priorities, and sizes and functions of the objects are determined according to Conformance Classes (CCs); A high speed ISP (In-System-Programming) module 30 inserted into the kernel 20; It is characterized by consisting of the update manager 40 of the GUI environment operating on the host PC.

본 발명은 계층화된 커널 구조, 적용되는 응용에 따른 운영체제의 크기 조절, 선점형 우선순위 기반 태스크 스케줄링을 통한 실시간 처리 지원, 복잡한 제어 동작 수행을 위한 태스크 모델 구분, 안정적인 인터럽트 처리, 효율적인 이벤트 관리 메커니즘, 공유 자원 관리 정책, 순환되는 작업을 위한 타이머 서비스를 제공함으로써 다양한 센서 네트워크 응용에 적합하고, 소프트웨어 업데이트 매니저와 무선 통신을 이용한 소프트웨어 업데이트 기능을 가능하게 할 뿐만 아니라 OSEK 표준을 준수하였기 때문에 센서 노드뿐만 아니라 저가형 CPU를 사용하는 지능형 자동차용으로도 활용 가능한 각별한 장점이 있다.The present invention provides a layered kernel structure, size adjustment of the operating system according to the applied application, real-time processing support through preemptive priority-based task scheduling, task model classification for performing complex control operations, stable interrupt handling, efficient event management mechanism, By providing shared resource management policy and timer service for recurring tasks, it is suitable for various sensor network applications and enables software update function using software update manager and wireless communication. There is a special advantage that can be used for intelligent cars using low-cost CPUs.

이하, 첨부 도면을 참조하여 본 발명 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템의 바람직한 실시예를 상세하게 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the operating system and software update system for the OSEK-based sensor node of the present invention.

도 1은 본 발명의 방법으로 제조된 비휘발성 메모리소자의 단면 구성도, 도 2a 내지 도 2e는 본 발명의 방법으로 비휘발성 메모리소자를 제조하는 공정단계로서, 본 발명 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템은 OSEK에서 정의된 지능형 운영체제의 표준을 준수하면서 센서 네트워크 응용환경에 적합한 안정적인 센서 노드용 운영체제(10)와; 인터럽트, 스케줄러, 태스크의 처리 레벨로 구분되어 각 레벨 내에 있는 서비스나 개체들은 모두 우선순위를 가지고 있으며 CC(Conformance Classes)에 따라 각 개체들의 크기와 기능들이 결정되는 커널(20)과; 상기 커널(20)에 삽입되는 고속 ISP(In-System-Programming) 모듈(30) 및; Host PC 상에서 동작하는 GUI 환경의 업데이트 매니저(40)로 구성되어 있다.1 is a cross-sectional view of a nonvolatile memory device manufactured by the method of the present invention, Figures 2a to 2e is a process step of manufacturing a nonvolatile memory device by the method of the present invention, the operating system for the OSEK-based sensor node of the present invention and The software update system includes a stable sensor node operating system 10 suitable for a sensor network application environment while complying with an intelligent operating system standard defined in OSEK; A kernel 20 which is divided into interrupt, scheduler, and processing levels of a task, and all services or objects within each level have a priority, and sizes and functions of the objects are determined according to Conformance Classes (CCs); A high speed ISP (In-System-Programming) module 30 inserted into the kernel 20; It consists of an update manager 40 of a GUI environment operating on a host PC.

상기 커널(20)은 도 4와 같이 인터럽트, 스케줄러, 태스크의 처리 레벨로 3개의 레벨로 구분된다. 각 레벨 내에 있는 서비스나 개체들은 모두 우선순위를 가지고 있으며 CC(Conformance Classes)에 따라 각 개체들의 크기와 기능들이 결정되고, 서비스나 개체의 우선순위를 결정하는 규칙은 OSEK 운영체제의 표준을 따른다.The kernel 20 is divided into three levels, as shown in FIG. 4, for processing interrupts, schedulers, and tasks. The services or entities within each level all have priorities. The size and functions of each entity are determined according to the Conformance Classes (CC), and the rules for determining the priority of services or entities follow the OSEK operating system standard.

상기 커널(20)은 TCB(Task Control Block)를 이용하여 각 태스크의 상태를 저장하고 관리하고, 상기 TCB에는 태스크 사이의 문맥 교환을 위한 스택 관련 정보와 태스크 스레드 함수 포인터, 우선순위, 태스크의 상태 등 태스크 관리를 위한 다양한 정보들을 저장한다. 모든 태스크들은 READY 상태가 되면 스케줄링을 위해서 대기 큐(Ready Queue)에 삽입된다. 대기 큐는 도 5와 같이 각 요소가 하나의 우선순위에 대한 리스트가 되는 배열이며 배열의 인덱스가 곧 리스트를 구성하는 태스크의 우선순위이다.The kernel 20 stores and manages the state of each task using a task control block (TCB). The TCB includes stack related information, task thread function pointers, priorities, and state of tasks for context exchange between tasks. It stores various information for task management. When all tasks are in the READY state, they are inserted into the Ready Queue for scheduling. As shown in FIG. 5, the wait queue is an array in which each element is a list of one priority, and the index of the array is the priority of tasks forming the list.

태스크는 작업의 수행을 처음 시작하는 경우, 작업 수행 중 자신보다 더 높은 우선순위를 가진 태스크에 의해서 선점당하는 경우 그리고 커널이나 다른 태스크로부터 자신이 기다리고 있던 이벤트를 전달받은 경우에 READY 상태가 되어 대기 큐에 삽입된다. 작업의 수행을 처음 시작하는 경우와 이벤트를 전달받은 경우에는 해당 우선순위 리스트의 가장 뒤에 삽입되며 다른 태스크에 의해서 선점당한 경우에는 리스트의 가장 앞에 삽입된다.A task is placed in the READY state when it first starts its work, when it is preempted by a task with a higher priority than itself, and when it receives an event it has been waiting for from a kernel or other task. Is inserted into If the task is started for the first time and an event is delivered, it is inserted at the end of the priority list. If it is preempted by another task, it is inserted at the front of the list.

OSEK 표준에서 정의하는 스케줄링 정책에는 선점형, 비선점형, 혼합형 이렇게 3개의 유형이 있다. 본 발명의 운영체제는 실행중인 태스크의 스케줄링 유형에 따라 스케줄링의 수행 여부가 결정되는 혼합형 스케줄링 정책을 사용하며 이를 위해서 TCB에 스케줄링 유형을 나타내는 필드를 추가하였다. 홉합형 스케줄링 방식은 태스크의 작업을 완료하는데 소요되는 시간이 문맥교환 시간보다 짧거나 비교적 간단한 작업을 수행하는 태스크를 비선점형 태스크로 정의하여 잦은 문맥 교환으로 인한 오버헤드를 줄일 수 있기 때문에 센서 네트워크상의 다양한 응용 환경에 적합하다.There are three types of scheduling policies defined by the OSEK standard: preemptive, non-preemptive, and mixed. The operating system of the present invention uses a hybrid scheduling policy in which scheduling is performed according to a scheduling type of a running task. For this purpose, an operating system adds a field indicating a scheduling type. The hop-scheduled scheduling scheme can reduce the overhead of frequent context switching by defining a task that takes less time than the context switching time or performs a relatively simple task as a non-preemptive task. Suitable for various application environments.

시스템에 공유되는 자원은 동시에 두 개의 태스크에 의해서 점유될 수 없다. OSEK 표준에서는 공유 자원 관리를 위해서 우선순위 상한 프로토콜을 인터럽트 레벨까지 확장하여 사용한다. 그러나 센서 노드용으로 주로 사용되는 ATmega128과 같은 저가형 MCU들은 대부분 벡터형 인터럽트 처리 방식을 사용한다. 벡터형 인터럽트 방식의 경우 각 인터럽트에 대하여 미리 우선선위가 정해져 있으며 이를 변경할 수 없다.Resources shared on the system cannot be occupied by two tasks at the same time. The OSEK standard extends the upper priority protocol to the interrupt level for shared resource management. However, most low-cost MCUs, such as the ATmega128, used primarily for sensor nodes, use vector interrupt handling. In the case of the vector type interrupt method, the priority level is set in advance for each interrupt and cannot be changed.

본 발명의 발명자는 이 문제를 해결하기 위해서 소프트웨어적으로 인터럽트 처리 루틴의 우선순위 설정, 발생된 인터럽트 대기 그리고 대기 중인 인터럽트 루틴의 처리할 수 있도록 도 6과 같은 구조로 인터럽트 서비스 루틴을 정의한다. 또 발생한 인터럽트의 대기와 대기 중인 인터럽트를 처리하는 커널 API를 추가적으로 구현함으로써 인터럽트 레벨까지 확장된 우선순위 상한 프로토콜과 2개의 카테고리로 구분되는 인터럽트 처리가 저가형 MCU에서도 완벽하게 동작하도록 한다.In order to solve this problem, the inventor of the present invention defines the interrupt service routine in the structure as shown in FIG. 6 so that the priority setting of the interrupt processing routine, the wait for the generated interrupt, and the waiting interrupt routine can be handled in software. It also implements a kernel API that handles waits for pending interrupts and pending interrupts, ensuring that the upper priority protocols extended to the interrupt level and the two categories of interrupt handling work perfectly on low-cost MCUs.

되풀이되거나 순환되는 작업들을 처리하기 위해서 카운터와 알람, 2 계층 구조로 알람 서비스를 제공한다. 카운터는 하드웨어 타이머와 운영체제 사이의 중간적인 개념으로 알람을 위한 서비스와 하드웨어 타이머 관리를 위한 서비스를 제공한다. 하나의 카운터는 하나의 하드웨어 타이머와 연결되며 하나 이상의 알람이 하나의 카운터에 연결되어 동작한다. 카운터는 커널에 의해서 내부적으로 관리되며 카운터 API는 알람 API에 의해서만 다루어진다.To handle recurring or recurring tasks, it provides a counter, alarm, and alarm service in a two-tiered hierarchy. The counter is an intermediate concept between the hardware timer and the operating system. It provides a service for alarm and a service for hardware timer management. One counter is linked to one hardware timer and one or more alarms are linked to one counter. Counters are managed internally by the kernel and the counter API is handled only by the alarm API.

알람은 동작하는 시점에 따라 상대적 또는 절대적 알람으로 동작하는 횟수에 따라 단일 또는 반복 알람으로 구분한다. 또한 알람은 태스크 활성화, 태스크에 이벤트 전달 그리고 단순 콜백 루틴 수행과 같이 3가지 유형으로 동작 가능하며 하나의 알람은 오직 하나의 카운터에만 연결될 수 있다.Alarms are classified into single or recurring alarms, depending on the number of times they operate as relative or absolute alarms. Alarms can also be of three types: task activation, event forwarding to a task, and simple callback routine execution. An alarm can be associated with only one counter.

OSEK 기반의 센서 노드용 운영체제는 원격 소프트웨어 업데이트 기능을 제공한다. 소프트웨어 업데이트 시스템은 커널에 삽입되는 고속 ISP(In-System-Programming) 모듈과 Host PC 상에서 동작하는 GUI 환경의 업데이트 매니저로 구성된다.The OSEK-based operating system for sensor nodes provides remote software updates. The software update system consists of a high speed ISP (In-System-Programming) module inserted into the kernel and an update manager of a GUI environment running on the host PC.

고속 ISP 모듈은 무선 통신을 통해서 노드로 전송된 코드 데이터의 유효성을 확인하고 외부 플래시 메모리에 저장하는 기능과 모든 코드 데이터의 수신을 완료하고 업데이트 수행 커맨드를 수신하였을 때 외부 플래시 메모리에 저장되어 있는 코드 데이터를 MCU 내부 플래시 메모리에 고속으로 프로그래밍하는 기능을 제공한다.The high speed ISP module verifies the validity of the code data transmitted to the node through wireless communication and stores it in the external flash memory, and the code stored in the external flash memory when the completion of receiving all the code data and the command to perform the update are received. It provides the ability to program data at high speed into the MCU's internal flash memory.

도 7은 본 발명에서 구현한 Host PC 상에서 동작하는 업데이트 매니저의 실행화면을 나타낸 것이다. 소프트웨어 업데이트 매니저는 컴파일이 완료된 프로그램 이미지 파일을 일정한 크기의 캡슐로 분할하고 이를 HDLC(High Data Link Control) 프로토콜을 이용한 시리얼 통신을 통해서 베이스 노드로 전달한다. 뿐만 아니라 원격 노드의 상태 확인, 수신 패킷 모니터링 그리고 원격 노드의 업데이트 상태 확인 기능을 제공한다. 본 연구팀이 구현한 업데이트 매니저는 간단한 버튼 조작만으로 원격 노드 관리 및 소프트웨어 업데이트를 수행할 수 있다.Figure 7 shows the execution screen of the update manager operating on the host PC implemented in the present invention. The software update manager divides the compiled program image file into capsules of a certain size and delivers them to the base node through serial communication using HDLC (High Data Link Control) protocol. It also provides remote node status check, incoming packet monitoring, and remote node update status check. The update manager implemented by the research team can perform remote node management and software update with a simple button operation.

구현한 운영체제를 경북 유비쿼터스 신기술 연구센터에서 개발한 ATmega128 기반의 SN100 센서 보드에 포팅하여 운영체제의 각 모듈과 소프트웨어 업데이트 시스템의 기능을 테스트하고, 그 결과를 표 2에 시스템의 메모리 사용량을 다른 센서 노드용 운영체제들과 비교하여 나타내었다. 소프트웨어 업데이트 테스트를 위해서 1개의 베이스 노드와 3개의 원격 노드가 존재하는 환경을 구축하였으며 다양한 코드 사이즈에 대한 소프트웨어 업데이트 소요시간을 측정하여 표 3에 나타내었다.The implemented operating system was ported to the ATmega128-based SN100 sensor board developed by Gyeongbuk Ubiquitous New Technology Research Center to test the functions of each module and software update system of the operating system, and the results are summarized in Table 2. Compared to operating systems. For the software update test, an environment in which one base node and three remote nodes exist is constructed and the software update time for various code sizes is measured and shown in Table 3.

코드 전파 및 업데이트 기능을 갖춘 운영체제의 메모리 사용량Memory usage on operating systems with code propagation and updating 플랫폼    platform ROM(Byte) ROM (Byte) RAM(Byte) RAM (Byte) SOS SOS 20464 20464 1163 1163 TinyOS(Deluge) TinyOS (Deluge) 21132 21132 597  597 Bombilla 프 Bombilla fever 39746 39746 3196 3196 본 발명 Invention 17204 17204 2404 2404

소프트웨어 업데이트 소요시간Software update time Hex 이미지 크기(Byte) Hex image size (Byte) Capule 크기 Capule size 소요시간(초) Required time (seconds) 1,048        1,048 24     24 7       7 2,525        2,525 57     57 15       15 3,418        3,418 77     77 21      21 20,149       20,149 449     449 218      218 35,686       35,686 790    790 455     455

본 발명에서는 OSEK 운영체제 표준을 기반으로 센서 네트워크 환경에 적합한 기능을 갖춘 센서 노드용 운영체제와 소프트웨어 업데이트 시스템을 설계 및 구현하고 SN100 센서 보드를 이용하여 구현한 운영체제의 각 모듈과 소프트웨어 업데이트 시스템의 기능을 테스트하였다. 테스트 결과 운영체제의 모든 기능이 안정적으로 동작하며 원격 소프트웨어 업데이트 또한 원활하게 이루어지는 것을 확인하였다.The present invention designs and implements an operating system and software update system for sensor nodes based on the OSEK operating system standard, and tests the functions of each module and software update system of the operating system implemented using the SN100 sensor board. It was. The test results confirmed that all the functions of the operating system are stable and the remote software update is performed smoothly.

본 발명 OSEK 기반의 무선 센서 노드용 운영체제는 다양한 센서 네트워크 응용에 적합할 뿐만 아니라 지능형 자동차용 실시간 운영체제 표준인 OSEK의 요구사항을 만족하는 모든 기능을 적용하였기 때문에 저가형 CPU를 사용하는 지능형 자동차용으로도 활용 가능하다.The OSEK-based operating system for wireless sensor nodes is not only suitable for various sensor network applications, but also applies to all the functions that satisfy the requirements of OSEK, a real-time operating system standard for intelligent automobiles, so that even for intelligent automobiles using low-cost CPUs. It can be utilized.

지금까지 본 발명을 바람직한 실시예로서 설명하였으나, 본 발명은 이에 한정되지 않고 발명의 요지를 이탈하지 않는 범위 내에서 다양하게 변형하여 실시할 수 있음은 물론이다.While the present invention has been described as a preferred embodiment, the present invention is not limited thereto, and various modifications can be made without departing from the gist of the invention.

도 1은 OSEK 운영체제 태스크 상태 모델을 나타낸 도면,1 is a diagram illustrating an OSEK operating system task state model;

도 2는 OSEK 운영체제 태스크 스케줄링을 나타낸 도면,2 is a diagram illustrating OSEK operating system task scheduling;

도 3은 본 발명에 따른 OSEK 기반 센서 노드용 운영체제 구조도,3 is an operating system architecture diagram for an OSEK-based sensor node according to the present invention;

도 4는 본 발명에 따른 3개의 처리 레벨을 가지는 커널 구조도,4 is a kernel structure diagram having three processing levels according to the present invention;

도 5는 본 발명에 따른 태스크 관리를 위한 대기 큐를 나타낸 도면,5 is a diagram illustrating a waiting queue for task management according to the present invention;

도 6은 본 발명에 따른 저가형 MCU를 위한 인터럽트 서비스루틴 구조도,6 is an interrupt service routine structure diagram for a low-cost MCU according to the present invention;

도 7은 본 발명에 따른 스프트웨어 업데이트 매니저를 나타낸 도면이다.7 is a diagram illustrating a software update manager according to the present invention.

Claims (3)

OSEK에서 정의된 지능형 운영체제의 표준을 준수하면서 센서 네트워크 응용환경에 적합한 안정적인 센서 노드용 운영체제(10)와; 인터럽트, 스케줄러, 태스크의 처리 레벨로 구분되어 각 레벨 내에 있는 서비스나 개체들은 모두 우선순위를 가지고 있으며 CC(Conformance Classes)에 따라 각 개체들의 크기와 기능들이 결정되는 커널(20)과; 상기 커널(20)에 삽입되는 고속 ISP(In-System-Programming) 모듈(30) 및; Host PC 상에서 동작하는 GUI 환경의 업데이트 매니저(40)로 구성된 것을 특징으로 하는 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템.A stable sensor node operating system 10 suitable for a sensor network application environment while complying with an intelligent operating system standard defined in OSEK; A kernel 20 which is divided into interrupt, scheduler, and processing levels of a task, and all services or objects within each level have a priority, and sizes and functions of the objects are determined according to Conformance Classes (CCs); A high speed ISP (In-System-Programming) module 30 inserted into the kernel 20; Operating system and software update system for OSEK-based sensor nodes, characterized in that consisting of the update manager 40 of the GUI environment running on the host PC. 제 1항에 있어서, 상기 커널(20)은 TCB(Task Control Block)를 이용하여 각 태스크의 상태를 저장하고 관리하는 것을 특징으로 하는 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템.The OSEK-based sensor node operating system and software update system of claim 1, wherein the kernel 20 stores and manages a state of each task using a task control block (TCB). 제 2항에 있어서, 상기 TCB에는 태스크 사이의 문맥 교환을 위한 스택 관련 정보와 태스크 스레드 함수 포인터, 우선순위, 태스크의 상태 등 태스크 관리를 위한 다양한 정보들이 저장되는 것을 특징으로 하는 OSEK 기반 센서 노드용 운영체제 및 소프트웨어 업데이트 시스템.The OSB-based sensor node of claim 2, wherein the TCB stores stack related information for context exchange between tasks, task thread function pointers, priority, task status, and the like. Operating system and software update system.
KR1020080137368A 2008-12-30 2008-12-30 Operating system based osek and its software update system for wireless sensor nodes KR20100078974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080137368A KR20100078974A (en) 2008-12-30 2008-12-30 Operating system based osek and its software update system for wireless sensor nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080137368A KR20100078974A (en) 2008-12-30 2008-12-30 Operating system based osek and its software update system for wireless sensor nodes

Publications (1)

Publication Number Publication Date
KR20100078974A true KR20100078974A (en) 2010-07-08

Family

ID=42640134

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080137368A KR20100078974A (en) 2008-12-30 2008-12-30 Operating system based osek and its software update system for wireless sensor nodes

Country Status (1)

Country Link
KR (1) KR20100078974A (en)

Similar Documents

Publication Publication Date Title
Gaur et al. Operating systems for IoT devices: A critical survey
GB2425628A (en) Programming distributed system using data flow diagrams
Sutton et al. Bolt: A stateful processor interconnect
WO2004111840A2 (en) Customer framework for embedded applications
Hofmeijer et al. AmbientRT-real time system software support for data centric sensor networks
Bollella et al. Programming with non-heap memory in the real time specification for Java
Bi et al. Research of key technologies for embedded Linux based on ARM
Bruyninckx Real-time and embedded guide
Fröhlich et al. Operating system support for wireless sensor networks
Biondi et al. Timing-aware FPGA partitioning for real-time applications under dynamic partial reconfiguration
Barr et al. Medusa: Managing concurrency and communication in embedded systems
CN109445959A (en) A kind of sensing data processing real time operating system
KR20100078974A (en) Operating system based osek and its software update system for wireless sensor nodes
Han et al. CoMOS: An operating system for heterogeneous multi-processor sensor devices
Zhou et al. An event-driven multi-threading real-time operating system dedicated to wireless sensor networks
Hofmeijer et al. Dcos, a real-time light-weight data centric operating system
Harbour Real-time POSIX: an overview
Yao et al. System architecture and operating systems
Krejcar et al. Micro operation system for microprocessor applications
Schoeberl Real-time scheduling on a Java processor
Tan et al. StateOS: A memory-efficient hybrid operating system for IoT devices
Höckner et al. Integration of event-driven embedded operating systems into OMNet++ a case study with reflex
Chouteau et al. Design and implementation of a Ravenscar extension for multiprocessors
Zoitl et al. A device and resource execution model for iec 61499 control devices
Locke et al. Java technology comes to real-time applications

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application