ساده سازی برنامهنویسی در سیستم عامل TinyOS مورد استفاده در شبکه حسگر بیسیم
محورهای موضوعی : مهندسی برق و کامپیوترسیدمیثم خضری 1 , مهدی آقاصرام 2 , فضلاله اديبنيا 3
1 - دانشگاه یزد
2 - دانشگاه یزد
3 - دانشگاه یزد
کلید واژه:
چکیده مقاله :
سيستم عامل TinyOS بهعنوان پرکاربردترين سيستم عامل گره حسگر بيسيم، داراي مدل برنامهنويسي مبتني بر رويداد است. برنامهنویسی مبتنی بر رویداد مستلزم استفاده از ماشین حالات است که برنامهنویس را ملزم به مدیریت دستی پشته برنامه میکند. بههمین دلیل پيادهسازي پردازشهاي طولاني در سيستمهاي مبتني بر رويداد مانند TinyOS دشوار میباشد. در این مقاله سعی کردهایم با ايجاد تغييراتي در زمانبند TinyOS، انتزاع برنامهنویسی جدیدی برای این سیستم عامل ارائه کنیم که پيادهسازي پردازشهاي طولاني را در آن سادهتر ميکند و به توسعهدهنده برنامه کاربردی امکان کدنویسی رویهای و چندریسهای را میدهد. تغییرات در زمانبند TinyOS بهنحوی انجام شده که با برنامههای کاربردی قبلی نیز سازگاری داشته باشد. نتایج ارزیابی در یک کاربرد نمونه نشان میدهد که از نظر توان مصرفی مدل پیشنهادی تفاوت چندانی با مدل قبلی ندارد، هرچند سربار حافظه مصرفی و سربار پردازشی آن نسبت به مدل قبلی بیشتر است.
Sensor node operating system provides a limited number of common services for developers to construct applications for wireless sensor networks. The sensor network community selected TinyOS as the de facto standard with most existing applications, libraries and device drivers available for TinyOS. The programming model of TinyOS is event-based and is not easy to use. In this paper, we present a new task scheduler for TinyOS that includes a new computation concept, named Job. Jobs are a collaborative and non-preemptive way of multitasking. On the next step, we propose a programming model which combines the asynchronous basis of event-driven systems with a more classical programming interface for the developer. As a result, developer that uses such an interface in his application will be provided with the sequential view we wanted. This programming model is suitable for applications that have long running computations and there is a data flow dependency between different tasks.
