KR20050092231A - Operating system for low power sensor module in sensor network and method thereof - Google Patents

Operating system for low power sensor module in sensor network and method thereof Download PDF

Info

Publication number
KR20050092231A
KR20050092231A KR1020040017351A KR20040017351A KR20050092231A KR 20050092231 A KR20050092231 A KR 20050092231A KR 1020040017351 A KR1020040017351 A KR 1020040017351A KR 20040017351 A KR20040017351 A KR 20040017351A KR 20050092231 A KR20050092231 A KR 20050092231A
Authority
KR
South Korea
Prior art keywords
module
sensor
operating system
thread
event
Prior art date
Application number
KR1020040017351A
Other languages
Korean (ko)
Other versions
KR100644799B1 (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 KR1020040017351A priority Critical patent/KR100644799B1/en
Publication of KR20050092231A publication Critical patent/KR20050092231A/en
Application granted granted Critical
Publication of KR100644799B1 publication Critical patent/KR100644799B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Abstract

본 발명은 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법에 관한 것이다.The present invention relates to an operating system and method for a low power sensor module in a sensor network.

본 발명의 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법은 플래시와 램으로 구성되며 메모리의 추상화 역할을 하는 메모리 조직 모듈; 상기 메모리 조직 모듈과 연동되어 하나의 주소를 가지고 접근하여 레지스터를 추상화하는 레지스터 추상화 모듈; 상기 레지스터에 접근하는 인터페이스를 제공하는 레지스터 액세스 메소드; 상기 메모리 조직 모듈에서 추상화한 메모리를 할당하고 할당을 해제하는 메모리 관리 모듈; 주변장치와의 입출력을 통해 메소드를 제공하는 로우 레벨 I/O 주변장치 드라이버; 시스템의 전원상태를 관리하는 전원 관리 모듈; 동작의 트리거로 인터럽트를 처리하여 스레드의 상태를 갱신하는 이벤트 핸들러; 운영체제와 응용 프로그램의 통로로 메모리로부터 태스크 영역의 코드들을 스케줄링을 통해 실행 가능한 스레드 콘텍스트를 스케줄링 큐에 넣는 태스크 로더 및 상기 이벤트 핸들러에 의해 트리거되어 태스크의 스레드를 수행하는 스케줄러로 이루어짐에 기술적 특징이 있다.An operating system and method for a low power sensor module in a sensor network of the present invention comprises a memory organization module consisting of flash and RAM and serving as an abstraction of memory; A register abstraction module interworking with the memory organization module to abstract a register by accessing with a single address; A register access method providing an interface to access the register; A memory management module for allocating and deallocating memory abstracted by the memory organization module; Low-level I / O peripheral drivers that provide methods through inputs and outputs to and from peripherals; A power management module for managing a power state of the system; An event handler which updates the state of a thread by handling an interrupt as a trigger of an operation; Technical features include a task loader that puts a thread context into a scheduling queue that is executable by scheduling codes of a task area from a memory through a path of an operating system and an application program, and a scheduler triggered by the event handler to execute a thread of a task. .

따라서, 본 발명의 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법은 운영체제상에서 모든 수행되는 모든 작업들을 주기적인 작업과 비주기적인 작업으로 분류를 함으로써 센서노드를 최적의 전원관리가 되도록 하였으며 센서용 응용프로그램을 위한 단순한 프로그래밍 구조, 효율적인 작업의 수행, 센서 네트워크에 적합한 컴퓨팅 환경을 제공하는 효과가 있다.Accordingly, the operating system and method for the low power sensor module in the sensor network of the present invention classifies all the tasks performed on the operating system into periodic tasks and aperiodic tasks so that the sensor node is optimized for power management. This has the effect of providing a simple programming structure for the application, performing efficient tasks, and providing a computing environment suitable for sensor networks.

Description

센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법{Operating system for low power sensor module in sensor network and method thereof} Operating system and low power sensor module in sensor network in sensor network

본 발명은 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법에 관한 것으로, 보다 자세하게는 저전력, 작은 코드 사이즈, 최소한의 하드웨어 리소스를 사용하는 임베디드 운영체제에 관한 것이다.The present invention relates to an operating system and method for low power sensor modules in a sensor network, and more particularly, to an embedded operating system using low power, small code size, and minimal hardware resources.

센서 네트워크는 일반적인 네트워크와는 다른 몇 가지 특성을 가지는데, 자율적인 재구성(self reconfigurable)이 가능해야 하고, 데이터 중심(data-centric)의 주소를 지원하며, 자원이 제약적이다는 것이다. 센서 네트워크를 위한 통합 소프트웨어는 이러한 특성을 지원할 수 있어야 한다.Sensor networks have several characteristics that differ from conventional networks: they must be self reconfigurable, support data-centric addresses, and have limited resources. Integrated software for the sensor network must be able to support these characteristics.

센서 네트워크는 전력의 고갈, 노드의 이동성, 노드의 결함, 그리고 환경적인 장애 등으로 인하여 형상이 동적으로 변하며, 심한 경우 네트워크가 분할되기도 하므로 자율적인 재구성이 가능해야 한다. 센서 네트워크의 통신 프로토콜은 이러한 동적인 형상 변화가 있는 경우 Ad-hoc 네트워크를 구성하는데, 저전력 요구조건과 낮은 대역폭, 오류가 많은 채널 특성, 자원의 제약 등 센서 노드의 능력을 고려하여 Multi-hop Ad-hoc 네트워크를 구성한다.The sensor network needs to be autonomously reconfigured because its shape changes dynamically due to power depletion, node mobility, node failure, and environmental disturbances. The communication protocol of the sensor network forms an ad-hoc network when there is such a dynamic shape change. -hoc Configure the network.

센서 네트워크를 위한 통합 소프트웨어는 센서 응용들이 이러한 네트워크의 형상 변화에 관계없이 투명하게 자신들이 수행중인 태스크를 재구성하여 연속적으로 수행할 수 있도록 지원해야 한다. 이를 효과적으로 지원하기 위해서는 그룹 관리와 결함 허용 기술이 필수적이다. 그룹 관리는 목표로 하는 태스크를 성공적으로 수행하기 위해서 필요한 센서 응용들을 그룹으로 유지하며 주어진 태스크를 적절한 센서 노드에 전파하고 수집된 데이터를 통합하는 기능들을 쉽게 구현할 수 있는 프로그래밍 인터페이스를 제공해야 한다. Integrated software for sensor networks must support sensor applications to continuously reconfigure and perform their tasks transparently, regardless of the shape of the network. Group management and fault tolerance techniques are essential to support this effectively. Group management should provide a programming interface that keeps the sensor applications needed to successfully perform the targeted task in a group, and can easily implement the functions of propagating a given task to the appropriate sensor node and integrating the collected data.

센서 네트워크는 일반적인 네트워크에 비하여 오류의 발생 가능성이 많은데 센서 응용에 투명하게 오류 처리 기능을 제공해야 한다. 또한 네트워크의 형상이 변한 경우에는 결함이 발생한 노드를 그룹에서 빼고, 새로운 가용한 노드를 그룹에 추가시켜 주어진 태스크가 연속해서 수행 가능하도록 지원할 수 있어야 한다.Sensor networks are more prone to errors than typical networks, and must provide transparent error handling for sensor applications. In addition, if the shape of the network changes, the failed node should be removed from the group, and a new available node should be added to the group to support a given task in succession.

센서 네트워크는 무수히 많은 센서 노드가 지역적으로 존재하고 응용의 특성으로 인해 노드 중심(node-centric)의 주소를 사용하는 것보다는 데이터 중심 주소를 사용한다. 즉, 인터넷과 같은 전역적인 주소보다는 속성(attribute) 기반의 주소를 사용하는데, 속성 기반의 주소 체계에서는 특정한 노드에게 쿼리를 보내기 보다는 현상의 속성에 대한 쿼리를 이용하게 된다.Sensor networks use data-centric addresses rather than node-centric addresses because of the myriad of sensor nodes locally and the nature of their applications. In other words, it uses attribute-based addresses rather than global addresses such as the Internet. In the attribute-based address system, queries on attributes of a phenomenon are used rather than sending queries to specific nodes.

센서 노드에 탑재된 응용 소프트웨어들을 정적인 것이 아니라 환경의 변화나, 응용 분야의 확장, 그리고 현상을 탐지하기 위한 기능의 부가 등으로 동적으로 다운로드 및 수행이 가능해야 한다. 이러한 응용 프로그램의 변경은 간단한 파라미터의 재조정으로부터 전체 프로그램을 재작성하는 것에 이르기까지 매우 다양하다. Application software installed in the sensor node should be able to be downloaded and executed dynamically, not statically, but due to changes in the environment, expansion of the application area, and the addition of a function for detecting a phenomenon. These application changes can vary from simple recalibration of parameters to rewriting the entire program.

센서 네트워크를 위한 통합 소프트웨어는 이러한 프로그램의 재구성이 용이하고, 융통성이 있으며, 효율적으로 수행될 수 있도록 지원해야 한다. J2ME(Java 2 Micro Edition), KVM(Kilobyte Virtual Machine)과 같은 소형의 장치를 위한 가상 기계에 대한 연구가 활발히 이루어져 왔다. 하지만 이러한 가상 기계는 아직까지 센서 노드에서는 제공하지 못하는 많은 양의 메모리를 요구하고 있으며 저전력에 대한 고려도 미약한 편이다. Integrated software for the sensor network must support the ease of reconfiguration, flexibility and efficiency of these programs. Research into virtual machines for small devices such as Java 2 Micro Edition (J2ME) and Kilobyte Virtual Machine (KVM) has been actively conducted. However, these virtual machines require a large amount of memory that sensor nodes cannot provide yet, and low power considerations are weak.

버클리 대학에서 개발한 TinyOS는 작은 코드 사이즈와 동시성을 보장하도록 스레드 사용을 지원한다. 또한 소프트웨어의 개발이 용이하도록 nesC라는 새로운 프로그래밍 언어를 사용한다. nesC의 사용으로 TinyOS는 재사용이 가능한 소형 응용 소프트웨어를 개발할 수 있는 환경을 제공한다. 상기 TinyOS는 네트워크 임베디드 시스템들을 위해 특별히 디자인 된 운영체제로서 이벤트 기반의 어플리케이션뿐만 아니라 핵심 코드는 4000byte 이하이고 데이터 메모리는 256byte 이하인 초소형 OS이다.Developed by Berkeley University, TinyOS supports the use of threads to ensure small code size and concurrency. It also uses a new programming language called nesC to facilitate software development. With nesC, TinyOS provides an environment for developing small reusable application software. TinyOS is an operating system specially designed for network embedded systems. It is an ultra-small OS whose core code is less than 4000 bytes and data memory is less than 256 bytes as well as event-based applications.

TinyOS는 스택 메모리 영역을 예약해야 하는 스택 기반 멀티스레드 방식의 단점을 대신해서 매우 적은 메모리로 멀티 태스킹을 지원할 수 있는 이벤트 기반(Event Driven) 모델을 선택했다. 이벤트 기반 멀티 태스크 방식을 사용함으로서 초소형 모트(Mote)의 중요한 특징인 저전력 소모가 가능하게 되었다. 이러한 방식은 이벤트의 발생이 없는 시간동안 CPU를 슬립모드(Sleep mode)로 전환하여 효율적인 CPU의 사용을 통해 저전력을 실현할 수 있게 하였다.TinyOS chose an event driven model that could support multitasking with very little memory, instead of the stack-based multithreading approach of reserving stack memory areas. The event-driven multitasking approach enables low power consumption, an important feature of ultra-small Motes. In this way, the CPU is put into sleep mode during the time when no event occurs, thereby enabling low power through efficient use of the CPU.

서울대에서 개발한 SenOS 커널의 구조는 유한 상태 머신 모델에 기반을 두고 있다. SenOS는 핵심 커널부와 런타임 모니터, 교체 가능한 상태 전이 테이블들, 그리고 콜백 라이브러리들로 구성된다. 프로그래머들은 손쉽게 SenOS 응용 프로그램을 디자인할 수 있으며 SenOS 디자인 툴을 이용하여 자동으로 실행 코드로 변환하고 모니터를 이용하여 런타임에 응용 프로그램의 실행 코드를 동적으로 로딩시킬 수 있다.The structure of the SenOS kernel developed by SNU is based on a finite state machine model. SenOS consists of the core kernel section, runtime monitors, replaceable state transition tables, and callback libraries. Programmers can easily design SenOS applications, automatically convert them to executable code using the SenOS design tool, and dynamically load the application's executable code at runtime using a monitor.

SenOS는 많은 장점들을 제공하는데, 우선 상태 머신 모델 기반이라 구현이 간결하고 효율적이라는 장점이 있다. 또한 교체 가능한 상태 전이 테이블과 콜백 라이브러리를 이용하여 매우 효과적인 동적 노드 재구성을 지원한다는 장점이 있다.SenOS offers a number of advantages, first of all based on the state machine model, which makes the implementation simple and efficient. It also has the advantage of supporting highly efficient dynamic node reconfiguration by using interchangeable state transition tables and callback libraries.

또한, Bertha OS는 미국 MIT 대학을 중심으로 진행한 Pushpin 플랫폼을 위해 디자인된 작은 운영체제로서, 분산된 센서 네트워크 상에서 동작 가능한 프로그래밍 모델을 제공하는 것이 가장 큰 목표이다. In addition, Bertha OS is a small operating system designed for the Pushpin platform, centered at MIT University. Its main goal is to provide a programming model that runs on distributed sensor networks.

Pushpin 컴퓨팅의 개념 자체는 Paintable 컴퓨팅으로서 사전에 어떤 위치정보 없이 임의적으로 설치된 Pushpin들 간에 알고리즘적 자동 집결(Algorithmic self-assembly)의 개념을 구현하고, Pushpin 소프트웨어를 통해 네트워크를 포함한 자원을 관리하고, 응용을 위한 프로그래밍 모델을 제공한다. The concept of Pushpin computing itself is Paintable computing, which implements the concept of algorithmic self-assembly among pushpins installed arbitrarily without any location information in advance, and manages resources including network through Pushpin software Provides a programming model for

상기와 같은 종래기술은 저전력 시스템 소프트웨어를 지향하는 센서 노드에서 단순한 이벤트 또는 인터럽트에 의해 동작하고 나머지는 슬립모드(Sleep Mode)로 동작하는 방식의 전원관리 방법은 다양한 센서들을 통한 유비쿼터스 환경의 응용에 있어서 보다 복잡한 응용 프로그램을 탑재하였을 경우 전원관리에 효율적이라 할 수 없다. 뿐만 아니라, TinyOS를 제외한 다른 운영체제의 경우, 효율적인 전원관리의 요구사항을 반영하였다고 보기는 어려운 문제점이 있었다.The prior art as described above is a power management method that operates by a simple event or interrupt in a sensor node oriented to low-power system software and the rest operates in a sleep mode. In the application of a ubiquitous environment through various sensors If you have a more complex application program, it is not efficient for power management. In addition, other operating systems except TinyOS had a difficult problem in reflecting the requirements of efficient power management.

또한, 모든 리소스가 제한적인 센서 노드의 운영체제라 할지라도, 유비쿼터스 환경의 응용을 위해서는 호환성과 이식성을 가진 프로그래밍 모델이 중요하다. TinyOS의 nesC 컴포넌트 기반의 운영체제, SenOS의 유한상태머신 기반의 프로그래밍 모델은 다양한 응용의 개발과 여타 OS와의 호환성, 그리고 이식성 등이 낮다. 대부분의 센서노드용 운영체제는 응용프로그램과 같이 컴파일되어 하나의 이미지로서 센서 노드에 다운로드된다. 때문에 응용프로그램의 작은 수정에 따른 관리적인 오버헤드가 매우 크다고 할 수 있다.In addition, even though all the resources are limited operating systems of sensor nodes, a programming model with compatibility and portability is important for ubiquitous environments. TinyOS's nesC component-based operating system, SenOS's finite state machine-based programming model, has low development and compatibility with other operating systems and portability. Most operating systems for sensor nodes are compiled with applications and downloaded to the sensor node as an image. Because of this, the administrative overhead of small modifications to the application is very high.

센서 네트워크는 유비쿼터스 환경에서의 요구사항을 반영하기 위하여, 실시간적인 처리와 분산적인 처리가 필요하게 된다. 현재까지의 센서노드용 운영체제에서는 상기와 같이 실시간적인 처리를 지원하지 않는 문제점이 있었다.The sensor network needs real-time processing and distributed processing to reflect the requirements in the ubiquitous environment. Until now, there has been a problem that the sensor node operating system does not support the real-time processing as described above.

따라서, 본 발명은 상기와 같은 종래 기술의 제반 단점과 문제점을 해결하기 위한 것으로, 자율적인 센싱과 Ad-hoc 네트워크의 망 구성을 통한 센싱 데이타의 전달을 기본적인 기능으로 한다. 따라서 저전력, 작은 코드 사이즈, 최소한의 하드웨어 리소스를 사용하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법을 제공함에 본 발명의 목적이 있다. Accordingly, the present invention is to solve all the disadvantages and problems of the prior art as described above, the basic function is to transfer the sensing data through the autonomous sensing and the network configuration of the Ad-hoc network. Accordingly, an object of the present invention is to provide an operating system and method for a low power sensor module in a sensor network using low power, small code size, and minimal hardware resources.

본 발명의 상기 목적은 플래시와 램으로 구성되며 메모리의 추상화 역할을 하는 메모리 조직 모듈; 상기 메모리 조직 모듈과 연동되어 하나의 주소를 가지고 접근하여 레지스터를 추상화하는 레지스터 추상화 모듈; 상기 레지스터에 접근하는 인터페이스를 제공하는 레지스터 액세스 메소드; 상기 메모리 조직 모듈에서 추상화한 메모리를 할당하고 할당을 해제하는 메모리 관리 모듈; 주변장치와의 입출력을 통해 메소드를 제공하는 로우 레벨 I/O 주변장치 드라이버; 시스템의 전원상태를 관리하는 전원 관리 모듈; 동작의 트리거로 인터럽트를 처리하여 스레드의 상태를 갱신하는 이벤트 핸들러; 운영체제와 응용 프로그램의 통로로 메모리로부터 태스크 영역의 코드들을 스케줄링을 통해 실행 가능한 스레드 콘텍스트를 스케줄링 큐에 넣는 태스크 로더 및 상기 이벤트 핸들러에 의해 트리거되어 태스크의 스레드를 수행하는 스케줄러를 포함하여 이루어진 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제에 의해 달성된다.The object of the present invention comprises a memory organization module consisting of flash and RAM and serves as an abstraction of the memory; A register abstraction module interworking with the memory organization module to abstract a register by accessing with a single address; A register access method providing an interface to access the register; A memory management module for allocating and deallocating memory abstracted by the memory organization module; Low-level I / O peripheral drivers that provide methods through inputs and outputs to and from peripherals; A power management module for managing a power state of the system; An event handler which updates the state of a thread by handling an interrupt as a trigger of an operation; In the sensor network comprising a scheduler for executing a thread of tasks triggered by the event handler and a task loader to put a thread context executable in the scheduling queue through the scheduling of the code of the task area from the memory through the operating system and the application path Achieved by the operating system for low power sensor module.

또한 발명의 다른 목적은 (a) 스케줄러를 중심으로 주기적 스레드 큐와 비주기적 스레드 큐로 스레드를 분리하는 단계; (b) 태스크 로더가 네트워크 또는 시스템 리셋 이벤트에 의해 동작하는 단계; (c) 상기 태스크 로더에 의해 플래시 메모리로부터 정의된 타입에 근거하여 주기적 스레드 큐와 비주기적 스레드 큐에 각 스레드들이 위치하는 단계; (d) 상기 태스크 로더가 주기적 스레드 큐의 주기를 추정하는 단계 및 (e) 전원관리 시스템 스레드를 상기 주기적 스레드 큐에 삽입하여 주기적으로 시스템의 전원을 관리하는 단계를 포함하여 이루어진 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 방법에 의해 달성된다.Another object of the invention is to (a) split a thread into a periodic thread queue and an aperiodic thread queue around a scheduler; (b) the task loader operating by a network or system reset event; (c) placing each thread in a periodic thread queue and an aperiodic thread queue based on a type defined from flash memory by the task loader; (d) the task loader estimating the period of the periodic thread queue and (e) inserting a power management system thread into the periodic thread queue to periodically manage power of the system. Achieved by an operating system method for the sensor module.

본 발명의 상기 목적과 기술적 구성 및 그에 따른 작용효과에 관한 자세한 사항은 본 발명의 바람직한 실시예를 도시하고 있는 도면을 참조한 이하 상세한 설명에 의해 보다 명확하게 이해될 것이다.Details of the above object and technical configuration of the present invention and the effects thereof according to the present invention will be more clearly understood by the following detailed description with reference to the drawings showing preferred embodiments of the present invention.

센서 네트워크를 구성하는 센서노드인 S-Engine을 위해 설계된 운영체제는 OSFOS(Operating System for Objective Sensor Network)이다. OSFOS 설계에 반영된 이슈들은 최적의 전원관리, 센서용 응용프로그램을 위한 단순한 프로그래밍 구조, 효율적인 작업의 수행, 센서 네트워크에 적합한 컴퓨팅 환경이다.The operating system designed for S-Engine, a sensor node constituting the sensor network, is an operating system for objective sensor network (OSFOS). Issues reflected in OSFOS design are optimal power management, a simple programming structure for sensor applications, efficient operation, and a computing environment suitable for sensor networks.

이러한 목적을 위하여 먼저 운영체제상에서 수행되는 모든 작업들을 주기적인 작업과 비주기적인 작업의 두 가지 카테고리로 분류하는데, 상기 주기적인 작업은 시간적인 주기를 가지고 반복적으로 수행되는 작업들이 해당되고, 상기 비주기적인 작업은 어떤 이벤트에 의해서 조건이 만족되었을 때 수행되는 작업들이 해당된다.For this purpose, all tasks performed on the operating system are first classified into two categories, periodic tasks and aperiodic tasks, which are tasks that are repeatedly performed with a time period. Typical tasks are those performed when a condition is met by an event.

상기와 같이 작업을 두 가지로 분리한 것은 먼저, 센서노드의 전원관리적인 측면에서 유리하기 때문이다. 네트워크의 이벤트에 대해서 정해진 작업을 수행하는 것은 가장 대표적인 비주기적인 작업에 해당된다. 센서 네트워크의 특성상 대부분의 시간을 아무런 작업을 수행하지 않는 IDLE 상태에 있을 가능성이 매우 많다. 따라서, 비주기적인 작업에 대해서는 특별한 전원관리가 필요하지 않다. The reason for separating the work into two as described above is because it is advantageous in terms of power management of the sensor node. Performing a given task on an event in a network is the most representative aperiodic task. Due to the nature of the sensor network, it is very likely to be in the IDLE state most of the time. Thus, no special power management is required for aperiodic tasks.

반면에 센서 노드에서 동작하는 응용 프로그램을 고려한다면, 이는 센서의 데이터를 수집하여 주기적으로 네트워크를 통해 전송하는 것이 가장 대표적인 응용 프로그램이다. 이런 작업의 세부적인 구현은 대부분 주기적으로 일어나게 된다. 운영체제의 스케줄러가 이 주기적인 작업들의 수행을 손쉽게 파악하고 IDLE 간격 및 소모 전원 레벨을 판단할 수 있다면 보다 효율적으로 전원을 관리할 수 있을 것이다.On the other hand, considering the application running on the sensor node, this is the most typical application is to collect the data of the sensor and transmit it periodically over the network. Most implementations of this task occur periodically. If the scheduler of the operating system can easily see the performance of these periodic tasks and determine the IDLE interval and power consumption level, power management will be more efficient.

또 다른 분리의 목적은 프로그래밍의 단순성과 수행의 효율성을 얻을 수 있기 때문이다. 센서 노드의 메모리 용량은 매우 제한적이다. 따라서, 프로그래밍 레벨에서 미리 정의된 시스템 인터페이스를 통해 정해진 사이즈의 정해진 모듈만을 이용하도록 제한하여야 한다. 이런 측면을 고려할 때, 두 가지의 작업에 대한 인터페이스를 구현하고 이들을 조합하여 응용프로그램을 구성하도록 하여, 프로그래밍상에서 단순성을 부여하는 것은 프로그래밍 측면에서 그리고 시스템 측면에서 수행 및 관리에 있어서 큰 장점이다. 따라서, 프로그래밍과 시스템의 동작은 모두 주기적인 작업과 비주기적인 작업의 단위로 처리하도록 설계하였다.Another purpose of separation is to achieve simplicity of programming and efficiency of execution. The memory capacity of the sensor node is very limited. Therefore, at a programming level, it should be limited to using a predetermined module of a predetermined size through a predefined system interface. Given this aspect, it is a great advantage in terms of programming and system implementation and management that implements the interface to the two tasks and combines them to form an application program. Therefore, both programming and system operation are designed to be handled in units of periodic and non-periodic tasks.

센서 노드인 S-Engine을 위한 응용 프로그램은 메모리 및 전원, 그리고 I/O 장치들에 있어서 범용 컴퓨팅 환경에 비해 매우 단순한 구조로 되어 있다. 이러한 특성은 프로그래밍적인 관점에서 다양한 내용의 작업들을 수행하기 어려운 제약사항이 될 수 있다. 즉, S-Engine에서 제공하는 리소스에 국한된 범위 내에서 가능한 응용 프로그램들이 작성되어야 하며, 마찬가지로 단순하면서도 명쾌한 프로그래밍 모델이 필요하다. The application program for S-Engine, a sensor node, is much simpler than a general-purpose computing environment for memory, power, and I / O devices. This feature can be a difficult constraint from a programmatic point of view. In other words, possible applications should be written within the scope of resources provided by S-Engine. Similarly, a simple and clear programming model is needed.

도 1은 본 발명에 의한 어플리케이션 프로그래밍 모델이다. 도 1에서 주기적인 스레드(Periodic Thread : PT)는 시간 트리거 이벤트(Time Triggered Event)에 의해 실행되고, 또한 비주기적인 스레드(Non-Periodic Thread : NPT)는 메세지 트리거 이벤트(Message Triggered Event)에 의해 실행된다.1 is an application programming model according to the present invention. In FIG. 1, a periodic thread (PT) is executed by a time triggered event, and a non-periodic thread (NPT) is a message triggered event. Is executed.

응용 프로그램은 태스크 단위로 하나 이상의 스레드로 구성된다. 스레드는 응용프로그램에서 필요한 단일 작업들의 명시이며, 주기적인 작업과 비주기적인 작업, 즉 이벤트에 의해 특정 조건이 만족되었을 때 수행될 수 있는 작업 중 하나로 등록된다.An application consists of one or more threads per task. A thread is a specification of a single task required by an application and is registered as one of periodic tasks and aperiodic tasks, that is, tasks that can be performed when certain conditions are met by an event.

도 1에서와 같이 어플리케이션의 각 스레드는 더 이상 나누어질 수 없는 단일한 작업들로 구현되고, Register_Periodic_Thread(Period, Thread's Pointer), Register_NonPeriodic_Thread(Event Type, Condition, Thread's Pointer)에 의해 운영체제에 등록되어 스케줄러에 의해 수행되는 기본적인 단위가 된다. 스레드의 작업내용은 리소스에 대한 접근 또는 운영체제가 제공하는 서비스를 이용한 데이터의 가공과 같은 작업이 될 수 있다. As shown in Figure 1, each thread of the application is implemented as a single task that can no longer be divided, registered in the operating system by Register_Periodic_Thread (Period, Thread's Pointer), Register_NonPeriodic_Thread (Event Type, Condition, Thread's Pointer) It is the basic unit performed by The work of a thread can be such as accessing resources or processing data using services provided by the operating system.

일례로는 10초마다 센서로부터 센싱 데이터를 가져오는 작업이 스레드로 구현되었을 경우 주기적인 작업에 해당될 수 있다. 네트워크로부터 데이터의 요청에 대한 응답으로 데이터를 전송해야 할 경우는 이벤트에 의한 작업에 해당된다.For example, if the task of getting sensing data from the sensor every 10 seconds is implemented as a thread, it may correspond to a periodic task. When data needs to be transmitted in response to a request for data from the network, this is an event driven task.

스레드는 C 언어로 작성되며 S-Engine을 위한 Static Library로 제공되는 시스템 콜과 자료구조들을 사용한다. 구현된 스레드는 로더(Loader)를 통해 운영체제 내에서 도 2의 스레드 콘텍스트의 형태로 등록되어 실행된다.Threads are written in C and use the system calls and data structures provided by the Static Library for the S-Engine. The implemented thread is registered and executed in the form of the thread context of FIG. 2 in the operating system through a loader.

스레드 콘텍스트는 운영체제의 내부적으로 스케줄링의 기본 단위가 되며, 각 스레드들의 수행을 통해 목적하는 응용프로그램(태스크)이 수행될 수 있다. 스레드 콘텍스트는 시스템 전체적인 동작에 맞추어 주기적, 비주기적의 두 종류로 구분된다.The thread context becomes a basic unit of scheduling internally of the operating system, and a target application (task) can be executed through execution of each thread. Thread contexts are divided into two types, periodic and aperiodic, to match the overall system operation.

주기적인 스레드 콘텍스트는 스레드를 구분하는 ID와 우선순위, 그리고 타이머 이벤트에 의해 주기적인 작업을 수행하도록 주기값이 시간의 단위로 포함되며, 관리를 위한 카운터가 있다. 또한 타이머에 의해 스케줄링되었을 때 수행할 코드영역의 주소를 포함한다. 비주기적인 스레드 콘텍스트 스레드 ID, 우선순위, 수행할 코드영역의 주소를 가지고 있고, 이벤트의 타입과 조건에 대한 명시로 구성된다.The periodic thread context includes IDs and priorities for identifying threads and periodic values in units of time to perform periodic tasks by timer events, and there is a counter for management. It also contains the address of the code region to be executed when scheduled by the timer. Aperiodic Thread Context Contains the thread ID, priority, and address of the code area to execute, and consists of the type and condition of the event.

스레드로 구성된 태스크의 관리를 위해 태스크 콘텍스트는 다음 도 3과 같다. 상기 태스크 콘텍스트는 태스크 단위의 스레드들의 관리를 위해 구현되며, 태스크 단위의 스케줄링은 이루어지지 않는다.The task context is shown in FIG. 3 for managing a threaded task. The task context is implemented for management of threads in a task unit, and no task unit scheduling is performed.

도 4는 본 발명에 의한 OSFOS를 나타내는 구조도이다. 먼저, 도 4에 도시된 바와 같이, 하위에 시스템 하드웨어 리소스들이 위치하고, 우측에 센서 네트워크를 위한 네트워크 인터페이스 부분이 위치하게 된다.4 is a structural diagram showing an OSFOS according to the present invention. First, as shown in FIG. 4, system hardware resources are located below, and a network interface part for a sensor network is located on the right side.

메모리 조직 모듈(100)은 메모리의 추상화 역할을 담당한다. 플래시와 램으로 구성된 메모리 하드웨어 구조를 관리를 위한 작은 조각단위로 선형 주소체계로 만들어주는 맵(MAP) 역할을 담당한다. S-Engine의 마이크로 콘트롤러(Micro-controller)인 8051-core에 근거한 메모리의 구조는 도 5와 같다.The memory organization module 100 serves as an abstraction of memory. It acts as a map (MAP) that converts a memory hardware structure consisting of flash and RAM into a linear addressing system in small pieces for management. The memory structure based on the 8051-core, which is a micro-controller of S-Engine, is shown in FIG.

8051 마이크로 콘트롤러에는 128Kbytes의 내부 레지스터들이 있으며, 8KBytes의 램이 실장되어 있다. 그리고 128K의 플래시 메모리를 가지고 있어, 운영체제의 코드들이 적재될 수 있다. 마찬가지로 작성된 태스크들도 정해진 섹터와 사이즈를 가지고 위치하게 되며 OS내부 데이터들과 태스크의 각 스레드에서 사용되는 데이터들은 램 영역에 매핑된다. 그리고 태스크와 OS간의 메시지 서비스는 공유 풀(Shared Pool)을 통해 스택(Stack) 또는 FIFO(First In First Out) 형태로 구현되며, 스레드의 동작과 스케줄링을 위한 데이터 역시 램 영역에 위치한다.The 8051 microcontroller has 128Kbytes of internal registers and 8KBytes of RAM. And with 128K of flash memory, operating system code can be loaded. Similarly, the created tasks are located with a given sector and size, and the data inside the OS and the data used by each thread of the task are mapped to the RAM area. The message service between the task and the OS is implemented in the form of a stack or a first in first out (FIFO) through a shared pool, and data for thread operation and scheduling is also located in the RAM area.

레지스터 추상화(Register Abstraction) 모듈(110)은 프로그래밍 레벨에서 마이크로 콘트롤러의 레지스터들의 접근을 위하여 매크로(Macro) 레벨에서 레지스터들을 추상화한다. 각각의 레지스터들은 메모리 조직 모듈(100)과 연동되어 하나의 주소를 가지고 접근이 가능하다. 프로그래밍 레벨에서 레지스터의 접근은 시스템의 디버깅 용도와 시스템의 전원 상태(Power State) 전환과 같은 서비스의 구현을 위해 필요하다.The register abstraction module 110 abstracts the registers at the macro level for access of the registers of the microcontroller at the programming level. Each register may be accessed with one address in association with the memory organization module 100. At the programming level, access of registers is necessary for debugging purposes of the system and for implementing services such as switching the system's power state.

레지스터 액세스 메소드(Register Access Method)(120)는 상위로 마이크로 콘트롤러의 레지스터들을 접근할 수 있는 인터페이스를 제공한다. 메소드로 구현되며 읽기(read)와 쓰기(write)로 구현한다. 레지스터의 접근은 주로 S-Engine의 특별 함수 레지스터로 한정되며 주로 전원관리(Power Management) 모듈(130)과 I/O 인터페이스를 위해 사용될 수 있다. The register access method 120 provides an interface for accessing the registers of the microcontroller. Implemented as a method, implemented as a read and a write. The access of the register is mainly limited to special function registers of the S-Engine and can be mainly used for the power management module 130 and the I / O interface.

메모리 관리 모듈(140)은 메모리 조직 모듈(100)에서 추상화한 메모리를 할당하고 할당해제를 한다. 이때 고려되어야 할 사항은 플래시 타입에서 제공하는 섹터 사이즈와 같은 특성에 맞게 관리 정책을 결정해야 한다. 태스크가 메모리에 로딩될 때 해당 태스크의 코드는 플래시 영역으로 할당하여 덤프하고 데이터 영역은 램 영역에 할당하여 덤프해 준다. 상기 동작은 컴파일 타임에 결정된 코드와 데이터 영역의 구분을 통해 수행되며 태스크 로더(Task Loader)(150)의 시스템 콜을 통해 수행된다.The memory management module 140 allocates and releases the memory abstracted by the memory organization module 100. Consideration should be given to the management policy based on characteristics such as sector size provided by flash type. When a task is loaded into memory, the task's code is allocated to the flash area and dumped, and the data area is allocated to the RAM area and dumped. The operation is performed through the division of the code and the data area determined at compile time and is performed through the system call of the task loader 150.

전원관리 모듈(130)은 기본적으로 마이크로 콘트롤러에서 제공하는 전원 레벨에 맞도록 시스템의 전원 상태를 관리할 수 있는 시스템 인터페이스를 제공한다. 전원관리 모듈은 시스템 스레드로서 태스크 로더(150)에 의해 태스크가 로드될 때 PTQ(Periodic Thread Queue)(160)에 삽입될 수 있다. 전원관리 스레드는 PT들의 주기를 판단함으로써 실행되는 주기를 결정하여 주기적으로 전원관리를 위한 시스템 인터페이스를 통해 전원을 제어하는데, 그 동작은 도 6과 같다.The power management module 130 basically provides a system interface for managing the power state of the system to match the power level provided by the microcontroller. The power management module may be inserted into the Periodic Thread Queue (PTQ) 160 when a task is loaded by the task loader 150 as a system thread. The power management thread determines the cycle to be executed by determining the cycle of the PTs and periodically controls the power through the system interface for power management, the operation of which is illustrated in FIG. 6.

도 6은 본 발명에 의한 전원 관리 시스템 스레드(Power Management System Thread : PM-ST)를 나타내는 도면으로 굵은 선으로 표시된 부분은 주기적인 작업의 구현인 스레드 1, 2, 3이 주기적으로 CPU를 받아서 실행되는 구간이다. 이때, 스레드 1, 2, 3의 실행에 따라서 주기적으로 반복되는 전원관리의 사이클(Cycle)은 High Power -> IDLE -> Low Power -> IDLE -> High Power와 같이 반복된다. 이런 반복되는 전원 레벨에 따라 PM-ST는 주기적으로 깨어나 시스템의 전반적인 전원관리를 수행한다. 시스템이 슬립 모드(Sleep mode)에서 깨어나기 위한 시스템 스레드는 이벤트 트리거 작업 큐(Event Tiriggered Job Queue)에 상주하여, 정해진 이벤트 발생시 깨어나 시스템을 리스토어 시켜줄 수 있다.FIG. 6 is a diagram illustrating a Power Management System Thread (PM-ST) according to the present invention, in which portions indicated by bold lines are periodically executed by threads 1, 2, and 3, which are implementations of periodic tasks. It is a section. At this time, a cycle of power management that is periodically repeated according to execution of threads 1, 2, and 3 is repeated as High Power-> IDLE-> Low Power-> IDLE-> High Power. Following this repetitive power level, the PM-ST wakes up periodically to perform overall power management of the system. The system thread for the system to wake up from sleep mode may reside in the event triggered job queue to wake up and restore the system when a predetermined event occurs.

로우 레벨 I/O 주변장치 드라이버(Low Level I/O Peripheral Driver)(170)는 S-Engine의 하드웨어가 고려하는 I/O 인터페이스로 크게 세 가지 부분으로 나뉠 수 있다. 호스트 인터페이스를 위해 JTAG, UART가 있으며, 센서 혹은 실행자와는 GPIO, ADC, I2C의 인터페이스에 연결될 수 있다. 그리고 CPU와 네트워크를 위한 타이머, RTC와 같은 장치들이 연결된다. 상기 로우 레벨 I/O 주변장치 드라이버(170)는 이들과의 I/O를 위해 기본적인 메소드들을 제공한다.The low level I / O peripheral driver 170 is an I / O interface considered by the hardware of the S-Engine. The low level I / O peripheral driver 170 may be divided into three parts. There are JTAG and UARTs for the host interface, and the sensor or implementer can be connected to the GPIO, ADC, or I2C interface. Devices such as timers and RTCs for the CPU and the network are connected. The low level I / O peripheral driver 170 provides basic methods for I / O with them.

시스템 유틸 액세스 메소드(System Util Access Method)(180)는 로우 레벨 I/O 주변장치 드라이버(170)에서 제공하는 메소드를 통해 RTC와 와치-독 타이머(Watch-dog Timer)들에 접근하는 시스템 인터페이스를 제공한다. 시스템 타이머 인터럽트는 이벤트 핸들러(Event Handler)(220)를 통해 시스템을 동작시키는 중요한 역할을 담당한다.The System Util Access Method 180 provides a system interface for accessing the RTC and Watch-dog Timers through methods provided by the low level I / O peripheral driver 170. to provide. The system timer interrupt plays an important role in operating the system through the event handler 220.

센서 디바이스 드라이버(Sensor Device Driver)(190)는 로우 레벨 I/O 주변장치 드라이버(170)에서 제공하는 메소드를 통해 장착된 센서로부터 데이터를 읽어오거나 실행자를 제어하는 기본적인 인터페이스를 제공한다. 각 장치들은 해당된 인터페이스를 통해 인터럽트 혹은 정해진 프로토콜을 통해 해당 데이터를 가져올 수 있으며 이벤트 핸들러에 의해 활성화되면 해당 데이터를 처리한다.The sensor device driver 190 provides a basic interface for reading data from a mounted sensor or controlling an executor through a method provided by the low level I / O peripheral driver 170. Each device can retrieve the data through interrupt or protocol through the corresponding interface and process the data when activated by the event handler.

호스트 인터페이스(Host Interface)(200)는 시스템 개발에서 디버깅 용도와 OS 및 응용프로그램의 다운로드를 위해 사용된다. 호스트와 연결되는 S-Engine의 경우 해당 인터페이스를 통해 호스트와 직접 통신하고 제어될 수 있다.The host interface 200 is used for debugging purposes and for downloading OS and application programs in system development. In the case of the S-Engine connected to the host, it can directly communicate with and control the host through the interface.

하드웨어 추출화 인터페이스(Hardware Abstraction Interface)(210)는 여러 장치들과 인터페이스들의 일관된 시스템 인터페이스를 제공하고, 하드웨어의 변경 시 운영체제의 호환성을 얻을 수 있다.The hardware abstraction interface 210 provides a consistent system interface of various devices and interfaces, and obtains compatibility of an operating system when hardware is changed.

이벤트 핸들러(220)는 이벤트 구동 방식으로 시스템이 동작한다. 따라서, 상기 이벤트 핸들러(220)는 시스템의 모든 동작의 트리거로서 네트워크, 센서, 타이머 등으로부터의 인터럽트를 처리하여 해당 스레드의 상태를 갱신시켜준다. 이벤트 핸들러(220)는 기존의 인터럽트 핸들러의 기본적인 기능을 수행한다. 즉, 인터럽트 발생시 기존 레지스터 값을 스텍 영역에 저장하고 인터럽트를 처리한 후, 스택의 레지스터들을 리스토어하여 해당 프로그램 카운터(Program Counter)에서부터 수행중이던 작업을 수행하도록 작성한다.The event handler 220 operates the system in an event driven manner. Accordingly, the event handler 220 updates the state of the corresponding thread by processing interrupts from a network, a sensor, a timer, and the like as triggers of all operations of the system. The event handler 220 performs the basic function of the existing interrupt handler. That is, when an interrupt occurs, the existing register value is stored in the stack area, the interrupt is processed, and the registers of the stack are restored to perform the work that was being performed from the corresponding program counter.

태스크 로더(150)는 운영체제과 응용 프로그램간의 통로 역할로서 기본적인 기능은 메모리로부터 태스크 영역의 코드들을 스케줄링을 통해 실행 가능한 스레드 콘텍스트를 스케줄링 큐에 넣는다. 이때 해당 콘텍스트가 주기적인 작업인가, 비주기적인 작업인가를 판단하여 해당되는 큐에 넣게 된다. 태스크 로더(150)는 컴파일 시간(Compile time)에서 OS와 응용 프로그램의 단단하게 커플(Coupled)된 빌드(Build)를 분리시킬 수 있다. 즉, OS의 빌드와 응용 프로그램의 빌드를 별도로 가져갈 수 있으며, 이를 통해 네트워크로부터 스레드 단위의 응용프로그램을 메모리로 다운로드하여 실행할 수 있다. 따라서, S-Engine의 관리적인 측면의 효율성과 이후 분산적인 데이터의 수집과 가공의 측면에서 큰 잇점을 가질 수 있다.The task loader 150 serves as a path between an operating system and an application program, and a basic function is to put a thread context that can be executed by scheduling codes of a task area from a memory into a scheduling queue. At this time, it is determined whether the context is a periodic task or an aperiodic task and put it in the corresponding queue. The task loader 150 may separate the tightly coupled build of the OS and the application from the compile time. That is, the build of the OS and the build of the application can be taken separately, and through this, the application of the unit of thread can be downloaded to the memory and executed from the network. Therefore, it can have a great advantage in terms of the efficiency of management of the S-Engine and in terms of collecting and processing the distributed data.

스케줄러(Scheduler)(230)는 비선점(Non Preemption)으로 동작하고, 입출력은 블록킹(Blocking) I/O로서 시간 트리거의 PT(Periodic Thread) 큐와 이벤트 트리거의 NPT(Non-Periodic Thread)(240) 두개의 큐를 가진 형태로 구성된다. 스케줄러(230)의 동작 자체는 이벤트 핸들러(220)에 의해 트리거되어 수행된다. 동작의 개요는 각 스레드 큐를 라운드-로빈(Round-Robin)하여 해당 이벤트에 대한 스레드를 선택하여 수행한다. 이벤트가 타이머에 의한 이벤트라면 PTQ(160)에서 해당 스레드를 수행한다. 이벤트가 타이머에 의한 이벤트가 아니라면 NPTQ(240)에서 해당 스레드를 수행한다. 스케줄러의 동작에 대한 C 스타일의 Pseudo code는 다음 표 1과 같다.The scheduler 230 operates as a non-preemption, and the input / output is a blocking I / O. The PT (Periodic Thread) queue of the time trigger and the Non-Periodic Thread (NPT) of the event trigger (240) ) Consists of two queues. The operation itself of the scheduler 230 is triggered and performed by the event handler 220. An overview of the operation is performed by round-robining each thread queue to select a thread for that event. If the event is an event caused by a timer, the PTQ 160 executes the corresponding thread. If the event is not an event by a timer, the NPTQ 240 executes the corresponding thread. C-style pseudo code for scheduler operation is shown in Table 1 below.

도 7은 OSFOS의 동작에 대한 개념도이다. 스케줄러(230)를 중심으로 PTQ(160)와 NPTQ(240)가 있다. 처음 태스크 로더(150)는 네트워크 혹은 시스템 리셋 이벤트에 의해 동작한다. 태스크 1(250)은 태스크 로더(150)에 의해 플래시 메모리(260)로부터 정의된 타입에 근거하여 PTQ(160), NPTQ(240)에 각 스레드들이 위치하게 된다. 이때, 태스크 로더(150)는 PTQ(160)의 주기를 추정하여 PM-ST(270)를 PTQ(160)에 삽입하여 상기 PM-ST(270)는 주기적으로 깨어나 시스템의 전원을 관리하게 된다.7 is a conceptual diagram for the operation of the OSFOS. There is a PTQ 160 and an NPTQ 240 around the scheduler 230. Initially, task loader 150 is operated by a network or system reset event. Task 1 250 is a thread that is located in the PTQ 160, NPTQ 240 based on the type defined by the flash loader 260 by the task loader 150. At this time, the task loader 150 estimates the period of the PTQ 160 and inserts the PM-ST 270 into the PTQ 160 so that the PM-ST 270 periodically wakes up to manage power of the system.

스케줄러(230)는 이벤트 핸들러(220)에 의해 동작하게 되는데 주로 타이머 이벤트와 네트워크 이벤트가 주요 이벤트이다. 네트워크 이벤트의 경우, 이벤트 핸들러(220)는 네트워크 인터페이스에서 발생하는 인터럽트에 대한 응답으로 이벤트를 발생시켜 스케줄러(230)를 동작시킨다. 스케줄러(230)는 이벤트를 받게 되면 네트워크 프로토콜의 구현인 Net-ST(Network 프로토콜 System Thread)(280) 또는 네트워크 이벤트를 기다리는 태스크의 스레드를 수행시킨다.The scheduler 230 is operated by the event handler 220, mainly a timer event and a network event. In the case of a network event, the event handler 220 generates an event in response to an interrupt occurring at the network interface to operate the scheduler 230. When receiving the event, the scheduler 230 executes a thread of a task waiting for a network event or a network protocol system thread (Net-ST) 280, which is an implementation of a network protocol.

본 발명은 이상에서 살펴본 바와 같이 바람직한 실시예를 들어 도시하고 설명하였으나, 상기한 실시예에 한정되지 아니하며 본 발명의 정신을 벗어나지 않는 범위 내에서 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변경과 수정이 가능할 것이다.Although the present invention has been shown and described with reference to the preferred embodiments as described above, it is not limited to the above embodiments and those skilled in the art without departing from the spirit of the present invention. Various changes and modifications will be possible.

따라서, 본 발명의 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 및 방법은 운영체제상에서 수행되는 모든 작업들을 주기적인 작업과 비주기적인 작업으로 분류함으로써 센서노드를 최적의 전원관리가 되도록 하였으며 센서용 응용프로그램을 위한 단순한 프로그래밍 구조, 효율적인 작업의 수행, 센서 네트워크에 적합한 컴퓨팅 환경을 제공하는 효과가 있다.Accordingly, the operating system and method for the low power sensor module in the sensor network of the present invention classify all the tasks performed on the operating system into periodic tasks and non-periodic tasks so that the sensor node is optimized for power management and the sensor application program. This has the effect of providing a simple programming structure, efficient operation, and a computing environment suitable for sensor networks.

도 1은 본 발명에 의한 어플리케이션 프로그래밍 모델이다.1 is an application programming model according to the present invention.

도 2는 본 발명에 의한 스레드 콘텍스트이다.2 is a thread context in accordance with the present invention.

도 3은 본 발명에 의한 태스크 콘텍스트이다.3 is a task context in accordance with the present invention.

도 4는 본 발명에 의한 OSFOS를 나타내는 구조도이다.4 is a structural diagram showing an OSFOS according to the present invention.

도 5는 본 발명에 의한 OSFOS 메모리 추출화를 나타낸 블럭도이다.5 is a block diagram illustrating OSFOS memory extraction according to the present invention.

도 6은 본 발명에 의한 전원 관리 시스템 스레드를 나타내는 도면이다.6 is a diagram illustrating a power management system thread according to the present invention.

도 7은 본 발명에 의한 OSFOS 동작을 나타내는 흐름도이다.7 is a flowchart illustrating the OSFOS operation according to the present invention.

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

100 : 메모리 조직 모듈 130 : 전원 관리 모듈100: memory organization module 130: power management module

140 : 메모리 관리 모듈 150 : 태스트 로더140: memory management module 150: task loader

160 : PTQ 170 : 로우 레벨 I/O 주변장치 드라이버160: PTQ 170: Low Level I / O Peripheral Driver

230 : 스케줄러 240 : NPTQ230: scheduler 240: NPTQ

Claims (12)

플래시와 램으로 구성되며 메모리의 추상화 역할을 하는 메모리 조직 모듈; A memory organization module composed of flash and RAM and serving as an abstraction of memory; 상기 메모리 조직 모듈과 연동되어 하나의 주소를 가지고 접근하여 레지스터를 추상화하는 레지스터 추상화 모듈; A register abstraction module interworking with the memory organization module to abstract a register by accessing with a single address; 상기 레지스터에 접근하는 인터페이스를 제공하는 레지스터 액세스 메소드; A register access method providing an interface to access the register; 상기 메모리 조직 모듈에서 추상화한 메모리를 할당하고 할당을 해제하는 메모리 관리 모듈; A memory management module for allocating and deallocating memory abstracted by the memory organization module; 주변장치와의 입출력을 통해 메소드를 제공하는 로우 레벨 I/O 주변장치 드라이버; Low-level I / O peripheral drivers that provide methods through inputs and outputs to and from peripherals; 시스템의 전원상태를 관리하는 전원 관리 모듈;A power management module for managing a power state of the system; 동작의 트리거로 인터럽트를 처리하여 스레드의 상태를 갱신하는 이벤트 핸들러; An event handler which updates the state of a thread by handling an interrupt as a trigger of an operation; 운영체제와 응용 프로그램의 통로로 메모리로부터 태스크 영역의 코드들을 스케줄링을 통해 실행 가능한 스레드 콘텍스트를 스케줄링 큐에 넣는 태스크 로더; 및 A task loader that puts a thread context into a scheduling queue that executes code of a task area from a memory through a path of an operating system and an application program; And 상기 이벤트 핸들러에 의해 트리거되어 태스크의 스레드를 수행하는 스케줄러 A scheduler triggered by the event handler to execute a thread of a task 를 포함하여 구성됨을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.Operating system for a low power sensor module in the sensor network, characterized in that configured to include. 제 1항에 있어서, The method of claim 1, 상기 로우 레벨 I/O 주변장치 드라이버에서 제공하는 메소드를 통해 RTC, 타이머 및 와치-독 타이머에 접근하는 시스템 인터페이스를 제공하는 시스템 유틸 액세스 메소드를 더 포함하여 구성됨을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.Low power sensor in the sensor network further comprises a system utility access method for providing a system interface for accessing the RTC, timer and watch-dog timer through the methods provided by the low-level I / O peripheral driver Operating system for the module. 제 1항에 있어서, The method of claim 1, 상기 로우 레벨 I/O 주변장치 드라이버에서 제공하는 메소드를 통해 장착된 센서로부터 데이터를 읽어오거나 실행자를 제어하는 인터페이스를 제공하는 센서 장치 드라이버를 더 포함하여 구성됨을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.Low power sensor module in the sensor network, characterized in that further comprises a sensor device driver for providing an interface for reading data from the mounted sensor or control the runner through a method provided by the low-level I / O peripheral driver OS for. 제 1항에 있어서, The method of claim 1, 호스트와의 직접 통신 및 제어가 가능한 호스트 인터페이스를 더 포함하여 구성됨을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.Operating system for a low power sensor module in the sensor network, characterized in that further comprises a host interface capable of direct communication and control with the host. 제 1항에 있어서, The method of claim 1, 하드웨어 변경시 운영체제의 호환성이 가능한 하드웨어 추상화 인터페이스를 더 포함하여 구성됨을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.An operating system for a low power sensor module in a sensor network, characterized in that it further comprises a hardware abstraction interface compatible with the operating system when changing hardware. 제 1항에 있어서, The method of claim 1, 상기 스케줄러는 이벤트 구동 방식에 의해 동작하는 타이머 이벤트와 네트워크 이벤트로 분리되어 처리하는 것을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.The scheduler is an operating system for a low power sensor module in the sensor network, characterized in that for processing separated into a timer event and a network event operating by the event drive method. 제 1항에 있어서, The method of claim 1, 상기 전원 관리 모듈은 주기적 스레드들에 대하여 처리 주기를 추정하여 생성한 일정 사이클 단위로 시스템의 전원 레벨을 관리하는 것을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.The power management module is an operating system for a low power sensor module in the sensor network, characterized in that for managing the power level of the system in a predetermined cycle unit generated by estimating the processing cycle for the periodic threads. 제 1항에 있어서, The method of claim 1, 상기 스케줄러는 센서 노드 상에서의 모든 처리단위인 스레드를 주기적, 비주기적으로 나뉘어 처리하는 것을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제.The scheduler is an operating system for a low-power sensor module in the sensor network, characterized in that for processing all of the processing unit on the sensor node is divided periodically and aperiodic. (a) 스케줄러를 중심으로 주기적 스레드 큐와 비주기적 스레드 큐로 스레드를 분리하는 단계; (a) separating a thread into a periodic thread queue and an aperiodic thread queue around a scheduler; (b) 태스크 로더가 네트워크 또는 시스템 리셋 이벤트에 의해 동작하는 단계; (b) the task loader operating by a network or system reset event; (c) 상기 태스크 로더에 의해 플래시 메모리로부터 정의된 타입에 근거하여 주기적 스레드 큐와 비주기적 스레드 큐에 각 스레드들이 위치하는 단계; (c) placing each thread in a periodic thread queue and an aperiodic thread queue based on a type defined from flash memory by the task loader; (d) 상기 태스크 로더가 주기적 스레드 큐의 주기를 추정하는 단계; 및 (d) the task loader estimating a period of a periodic thread queue; And (e) 전원관리 시스템 스레드를 상기 주기적 스레드 큐에 삽입하여 주기적으로 시스템의 전원을 관리하는 단계 (e) inserting a power management system thread into the periodic thread queue to periodically manage power of the system 를 포함하여 이루어짐을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 방법.Operating system method for a low power sensor module in the sensor network, characterized in that comprises a. 제 9항에 있어서, The method of claim 9, 상기 (a) 단계는 스케줄러가 이벤트 핸들러에 의해 동작하고 이벤트를 발생하는 것을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 방법.The step (a) is characterized in that the scheduler operates by the event handler and generates an event. 제 10항에 있어서, The method of claim 10, 상기 이벤트는 타이머 이벤트 또는 네트워크 이벤트인 것을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 방법.And wherein the event is a timer event or a network event. 제 11항에 있어서, The method of claim 11, 상기 네트워크 이벤트는 이벤트 핸들러가 네트워크 인터페이스에서 발생하는 인터럽트에 대한 응답으로 이벤트를 발생시켜 스케줄러를 동작시키는 것을 특징으로 하는 센서 네트워크에서의 저전력 센서 모듈을 위한 운영체제 방법.The network event is an operating system method for a low power sensor module in the sensor network, characterized in that the event handler generates an event in response to the interrupt occurring in the network interface to operate the scheduler.
KR1020040017351A 2004-03-15 2004-03-15 Operating system for low power sensor module in sensor network and method thereof KR100644799B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040017351A KR100644799B1 (en) 2004-03-15 2004-03-15 Operating system for low power sensor module in sensor network and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040017351A KR100644799B1 (en) 2004-03-15 2004-03-15 Operating system for low power sensor module in sensor network and method thereof

Publications (2)

Publication Number Publication Date
KR20050092231A true KR20050092231A (en) 2005-09-21
KR100644799B1 KR100644799B1 (en) 2006-11-13

Family

ID=37273630

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040017351A KR100644799B1 (en) 2004-03-15 2004-03-15 Operating system for low power sensor module in sensor network and method thereof

Country Status (1)

Country Link
KR (1) KR100644799B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100866224B1 (en) * 2005-10-28 2008-10-30 삼성전자주식회사 Power-Saving Method for Wireless Sensor Network
KR100950679B1 (en) * 2007-12-26 2010-03-31 전자부품연구원 Adaptive Power Management System And Method According To Duty Cycle
US8813073B2 (en) 2010-12-17 2014-08-19 Samsung Electronics Co., Ltd. Compiling apparatus and method of a multicore device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200064620A (en) 2018-11-29 2020-06-08 (주)위니텍 Low power sensor network based on Wireless Smart Utility Network and providing method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR960043639A (en) * 1995-05-26 1996-12-23 조진영 Powered Multipoint Digital Networks and Methods
US7483403B2 (en) 2002-01-10 2009-01-27 Robert Bosch Gmbh Protocol for reliable, self-organizing, low-power wireless network for security and building automation systems
US7564810B2 (en) 2002-05-08 2009-07-21 Microsoft Corporation Method and system for managing power consumption of a network interface module in a wireless computing device
KR100431209B1 (en) * 2002-07-04 2004-05-12 한국전자통신연구원 Network Management Method using Managing Sensors
US7356561B2 (en) 2003-05-01 2008-04-08 Lucent Technologies Inc. Adaptive sleeping and awakening protocol for an energy-efficient adhoc network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100866224B1 (en) * 2005-10-28 2008-10-30 삼성전자주식회사 Power-Saving Method for Wireless Sensor Network
KR100950679B1 (en) * 2007-12-26 2010-03-31 전자부품연구원 Adaptive Power Management System And Method According To Duty Cycle
US8813073B2 (en) 2010-12-17 2014-08-19 Samsung Electronics Co., Ltd. Compiling apparatus and method of a multicore device

Also Published As

Publication number Publication date
KR100644799B1 (en) 2006-11-13

Similar Documents

Publication Publication Date Title
EP1839146B1 (en) Mechanism to schedule threads on os-sequestered without operating system intervention
US8887174B2 (en) Mechanism for monitoring instruction set based thread execution on a plurality of instruction sequencers
CN100570565C (en) Operating system service method and system based on strategy are provided in supervisory routine
Dong et al. SenSpire OS: A predictable, flexible, and efficient operating system for wireless sensor networks
WO2005048010A2 (en) Method and system for minimizing thread switching overheads and memory usage in multithreaded processing using floating threads
Sun et al. Atalanta: A new multiprocessor RTOS kernel for system-on-a-chip applications
US20070198997A1 (en) Customer framework for embedded applications
US8533712B2 (en) Virtual machine stage detection
Bi et al. Research of key technologies for embedded Linux based on ARM
KR100644799B1 (en) Operating system for low power sensor module in sensor network and method thereof
Nitta et al. Y-threads: Supporting concurrency in wireless sensor networks
US7516311B2 (en) Deterministic microcontroller context arrangement
des Places et al. Linux on the OSF Mach3 microkernel
US20060168427A1 (en) Deterministic microcontroller with context manager
Zhou et al. SDREAM: A Super‐Small Distributed REAL‐Time Microkernel Dedicated to Wireless Sensors
Han et al. CoMOS: An operating system for heterogeneous multi-processor sensor devices
Yao et al. System architecture and operating systems
NL2021174B1 (en) Power interrupt immune software execution
Dudak et al. Utilization of RTOS solutions in IoT modules based on RISC microcontrollers
Walls Embedded RTOS Design: Insights and Implementation
Singh Design and Evaluation of an Embedded Real-time Micro-kernel
Juhász et al. A method for designing and implementing a real-time operating system for industrial devices
Papadimitriou et al. Mac OS versus FreeBSD: A comparative evaluation
WO2006081094A2 (en) Deterministic microcontroller
Schäfers et al. Monitoring the T9000-The TRAPPER Approach

Legal Events

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

Payment date: 20100701

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee