DOI QR코드

DOI QR Code

Design and Implementation of a Temporary Priority Swapping Protocol for Solving Priority Inversion Problems in MicroC/OS-II Real-time Operating System

MicroC/OS-II 실시간 운영체제에서의 우선순위 역전현상 해결을 위한 일시적 우선순위 교환 프로토콜 설계 및 구현

  • 전영식 (한양대학교 컴퓨터공학과) ;
  • 김병곤 (한국건설기술연구원 건설정보연구실) ;
  • 허신 (한양대학교 컴퓨터공학과)
  • Published : 2009.12.31

Abstract

Real-time operating systems must have satisfying various conditions such as effective scheduling policies, minimized interrupt delay, resolved priority inversion problems, and its applications to be completed within desired deadline. The real-time operating systems, therefore, should be designed and developed to be optimal for these requirements. MicroC/OS-II, a kind of Real-time operating systems, uses the basic priority inheritance with a mutex to solve priority inversion problems. For the implementation of mutex, the kernel in an operating system should provide supports for numerous tasks with same priority. However, MicroC/OS-II does not provide this support for the numerous tasks of same priority. To solve this problem, MicroC/OS-II cannot but using priority reservation, which leads to the waste of unnecessary resources. In this study, we have dealt with new design a protocol, so called TPSP(Temporary Priority Swap Protocol), by an effective solution for above-mentioned problem, eventually enabling embedded systems with constrained resources environments to run applications.

실시간 운영체제는 효율적인 스케줄링, 최소화된 인터럽트 지연, 우선순위 역전현상 해결 등의 다양한 조건을 만족시킴과 동시에, 응용프로 그램이 정해진 기한 내에 수행되는 것을 보장하여야 한다. 따라서 실시간 운영체제는 상기 조건을 만족시킬 수 있도록 설계/개발되어야 한다. 대중적인 실시간 커널의 한 종류인 MicroC/OS-II에서는 우선순위 역전 현상에 대한 해결 기법으로 뮤텍스(Mutex)를 사용한 기본적인 우선순 위 상속(Basic Priority Inheritance) 프로토콜을 사용한다. 뮤텍스를 구현하려면 우선순위가 같은 여러 태스크를 사용할 수 있도록 커널이 지원 해야 하나 MicroC/OS-II 운영체제는 우선순위가 같은 여러 태스크의 동시 사용을 지원하지 않는다. 이를 해결하기 위해 추가적인 우선순위 예 약을 사용할 수밖에 없게 되고, 결과적으로 제한된 우선순위 자원을 낭비하게 된다. 본 논문에서는 MicroC/OS-II의 불필요한 우선순위 자원을 낭비하는 문제점을 해결할 수 있는 일시적 우선순위 교환 프로토콜(Temporary Priority Swapping Protocol; TPSP)을 설계 및 구현하여, 한정 된 자원 환경을 가진 임베디드 장비에 효율적으로 운용되도록 하는데 목적을 둔다.

Keywords

References

  1. J. Stankovic, “Real-Time Computing”, BYTE, invited paper, pp.155-160, August, 1992
  2. L. Sha, R. Rajkumar, and J. P. Lehoczky, “Priority Inheritance Protocols: An Approach to Real-Time Synchronization”, IEEE Transactions on Computers Vol.39, No.9, pp.1175-1185, Sep., 1990 https://doi.org/10.1109/12.57058
  3. 도유환, 박명진, 오삼권, “실시간 커널 uC/OS의 최대 허용 태스크 개수의 확장”, 한국정보과학회 추계 학술대회, pp.152-154, 1999
  4. Jean J. Labrosse, “MicroC/OS-II 실시간 커널 2판”, 에이콘, 2007, ISBN 89-89975-60-3
  5. J. B. Goodenough and L. Sha, “The Priority Ceiling Protocol”, Special Report CMU/SEI-88-SR-4, Mar. 1998
  6. Qing Li, “RTOS를 이용한 실시간 임베디드 시스템 디자인”, 에이콘, 2005, ISBN 89-89975-42-5
  7. 김주용, 고건, “개선된 우선순위 상한 프로토콜의 구현”, 한국정보과학회 가을 학술발표논문집 제 20권 제2호 pp.565- 568, 1993
  8. Min-Ih Chen, and Kwei-Jay Lin, “Dynamic Priority Ceilings: A concurrency Control Protocol for Real-Time Systems”, The Journal of Real-Time Systems, 2, 1990, pp.325-346 https://doi.org/10.1007/BF01995676
  9. 강성구, 경계현, 고광선, 엄영익. “실시간 운영체제의 우선순위역전현상 해결을 위한 프로토콜 설계 및 구현”. 한국정보처리학회, v.13A, No.5, pp.405-412, 2006
  10. Jae-Ho Lee, Heung-Nam Kim, “Implementing priority inheritance semaphore on uC/OS real-time kernel,” wstfes, pp.83, IEEE Workshop on Software Technologies for Future Embedded Systems, 2003
  11. 김태호, 김창수, “우선순위 기반의 uC/OS-II 커널에서 확장된 R/R 스케줄링 연구”, 한국멀티미디어학회, 2002