Abstract
RTOS in the embedded system is a powerful tool for the design of multi-tasking. However, previous RTOS has large proportion in the MCU with limited memory. So it is difficult to apply RTOS. In this paper, I removed less frequently used features from the traditional RTOS, and designed lightweight RTOS that schedules and manages the resources with minimal code. I used techniques to obtain user memory using sharing stack, and to reduce the overhead at context. Considering ratio of kernel and applications, the RTOS designed in this paper is available on the MCU with more than 4KB of program memory.
RTOS는 임베디드 시스템 환경에서 멀티태스킹 동작을 설계하는데 강력한 도구이다. 그러나 협소한 메모리를 가진 MCU에서는 응용프로그램에 비해 기존의 RTOS가 차지하는 비율이 크기 때문에 적용하기 어려웠다. 본 논문에서는 기존의 RTOS에서 사용빈도가 적은 기능을 제거하고, 스케줄링과 자원 관리의 기능만 가지고 최소한의 코드로 동작하는 경량화된 RTOS를 설계하였다. 공유 스택을 사용하여 사용자 메모리를 확보하며, 태스크의 문맥 전환시에 발생하는 오버헤드를 감소시키고, TCB등의 사이즈를 축소하는 기법을 사용하였다. 설계 및 검증 결과, 커널의 사이즈를 1KB이하로 축소할 수 있었고, 커널과 응용 프로그램의 비율을 고려해 볼 때, 본 논문에서 설계한 RTOS는 4KB이상의 프로그램 메모리를 가진 MCU에서 사용할 수 있다.