공간 제약하의 센서 운영체제를 위한 동적 쓰레드 스택관리 기법

Dynamic Threads Stack Management Scheme for Sensor Operating Systems under Space-Constrained

  • 발행 : 2007.12.15

초록

무선 센서 네트워크는 자연 환경의 정보를 수집하고, 수집한 정보를 가공하고, 가공된 정보를 무선 통신을 통하여 사용자에게 실시간으로 전달하는 기능을 가진 설비이다. 이러한 센서 네트워크는 다수의 무선 센서 노드들로 이루어지고, 이 센서 노드들은 비용 효율성의 이유로 매우 제한적인 하드웨어 칩들로 구성된다. 예를 들어, UC Berkeley에서 설계한 MICA센서 노드에는 8-bit CPU, 4KB RAM, 그리고, 128KB FLASH 등으로 구성된다. 따라서 이것들을 동작시키는 센서 운영체제는 이러한 하드웨어 제약성을 감내할 수 있어야 한다. 본 논문에서는 멀티 쓰레디드 센서 운영체제를 위한 공간 효율적인 쓰레드 스택 관리 기법을 제안한다. 제안한 기법은 컴파일 시점에 각 쓰레드 함수의 스택 사용량 정보를 측정한다. 측정된 결과를 바탕으로, 함수 호출 시와 같은 스택 영역의 요구가 발생할 경우에 스택의 할당 및 반환 작업을 수행하여 쓰레드 스택 영역을 동적으로 관리한다. 본 기법은 나노 Qplus 센서 운영체제에서 구현되었다. 본 논문의 성능 실험을 통하여, 제안한 기법을 사용하는 것이 기존의 정적인 스택 관리 방법을 사용하는 것 보다 스택 메모리 공간을 보다 효율적으로 관리할 수 있음을 확인한다.

Wireless sensor networks are sensing, computing and communication infrastructures that allow us to monitor, instrument, observe, and respond to phenomena in the harsh environment. Generally, the wireless sensor networks are composed of many deployed sensor nodes that were designed to be very cost-efficient in terms of production cost. For example, UC Berkeley's MICA motes have only 8-bit CPU, 4KB RAM, and 128KB FLASH memory space. Therefore, sensor operating systems that run on the sensor nodes should be able to operate efficiently in terms of the resource management. In this paper, we present a dynamic threads stack management scheme for space-constrained and multi-threaded sensor operating systems. In this scheme, the necessary stack space of each function is measured on compile-time. Then, the information is used to dynamically allocate and release each function's stack space on run-time. It was implemented in Nano-Qplus sensor operating system. Our experimental results show that the proposed scheme outperforms the existing fixed-size stack allocation mechanism.

키워드

참고문헌

  1. C.A.R.Hoare, Monitors: An operating system structuring concept, Communications of the ACM 17, pp. 549-557, 1977 https://doi.org/10.1145/355620.361161
  2. H.C. Lauer, R.M. Needham, On the duality of operating system structures, Second International Symposium on Operating Systems, IRIA, 19784
  3. J.K. Ousterhout, Why threads are a bad idea (for most purposes), Presentation given at the 1996 Usenix Annual Technical Conference, 1996
  4. A. Adya, J. Howell, M. Theimer, W.J. Bolosky, J.R. Douceur, Cooperative task management without manual stack management, Proceedings of the 2002 USENIX Annual Technical Conference, 2002
  5. R. von Behren, J. Condit, E. Brewer, Why events are a bad idea (for high concurrency servers), HotOS IX: The 9th Workshop on Hot Topic in Operating Systems, pp. 19-24, 2003
  6. A. Gustafsson, Threads without the pain, ACM Queue 3, pp. 34-41, 2005
  7. P.Levis, S.Madden, D. Gay, J. Polastre, R. Szewczyk, A. Woo, E. Brewer, D. Culler, The emergence of networking abstractions and techniques in TinyOS, First USENIX/ACM Symposium on Networked Systems Design and Implementation (NSDI), 2004
  8. C.C. Han, R. Kumar, R. Shea, E. Kohler, M.B. Srivastava, A dynamic operating system for sensor nodes, MobiSys, pp. 163-176, 2005
  9. J. Mulder, S. Dulman, L. van Hoesel, P. Havinga, Peeros - system software for wireless sensor networks, Preprint, 2003
  10. J. Yannakopoulos, A. Bilas, CORMOS: A communication- oriented runtime system for sensor networks, Proceedings of the 2nd IEEE European Workshop on Wireless Sensor Networks(EWSN), 2005
  11. Bhatti, S., Carlson, J., Dai, H., Deng, J., Rose, J., Sheth, A., Shucker, B., Gruenwald, C., Torgerson, A., Han, R.: MANTIS OS: An embedded multithreaded operating system for wireless micro sensor platforms, ACMKluwer Mobile Networks and Applications(MONET) Journal, Special Issue on Wireless Sensor Networks, 2005
  12. K. Lee, Y. Shin, H. Choi, S. Park, A design of sensor network system based on scalable and reconfigurable nano-os platform, IT-Soc International Conference, 2004
  13. H. Kim, H. Cha, Towards a resilient operating system for wireless sensor networks, The 2006 USENIX Annual Technical Conference, 2006
  14. A. Dunkels, B. Gronvall, T. Voigt, Contiki - a lightweight and flexible operating system for tiny networked sensors, First IEEE Workshop on Embedded Networked Sensors, 2004
  15. Crossbow, http://www.xbow.com/s/
  16. C. Tismer, Continuations and stackless python, Proceedings of the 8th International Python Conference, 2000
  17. P. Levis, D. Culler, Mate: a virtual machine for tiny networked sensors, International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 85-95, 2002
  18. A. Dunkels, O. Schmidt, T. Voigt, Using protothreads for sensor node programming, Proceedings of the REALWSN'05 Workshop on Real-World Wireless Sensor Networks, 2005
  19. A. Torgerson, Automatic thread stack management for resource-constrained sensor operating systems, BS-Thesis of University of Colorado, 2005
  20. AVR-GCC, http://www.avrfreaks.net/AVRGCC/
  21. Octacomm, http://www.octacomm.net/