Sunteți pe pagina 1din 4

CALIFORNIA STATE UNIVERSITY LONG BEACH

Department Of Electrical Engineering

SPRING 2014

EE-546 Advanced Microprocessors and embedded controllers 2 Review 2- nesC

Supervised by: Mohmmad Mozumdar

Submitted by: Aniket Ratnakar (012533493)

REPORT- nesC
This paper describes the importance of a NesC programming language that is very useful in embedded systems. It has many benefits over other languages mainly because of its work of operation. It targets over dividing the whole system into small motes that are small components of the system. nesC has a holistic approach in which solution for whole system is proposed which reduces the code size and execution time. It mainly focuses on availability of resources, reusable system components and flexibility on hardware/software platform. nesC has various challenges such as Driven by interaction with environment, Limited resources, reliability and soft requirements. nesC has high concurrent behavior, this is due to error detection during the compile time. nesC is used for TinyOS which is a small OS used for driving networks. nesC has helped TinyOS in emphasizing variety of components such as : 1) Component Based architecture 2) Task and Event based concurrency 3) Split phase operation The component based architecture of nesC allows reusability of the unused components. This allows more compact and efficient structure of the OS. The task and events based concurrency is defined by the priority of both. Both of them continue till the end but events have high priority than tasks and they can replace them. Tasks do not preempt the operation of other task or event. The split phase operation is basically breaking down the operation into command and event (acknowledgement). The send and senddone command are example of how this operation works. 2) Surge A sensor network application

The surge has a typical hierarchy of operation. It has the nodes that collect the data and they are responsible for monitoring the data. These nodes are connected to the base station. The nodes choose their respective base station depending on the latency or depth from nearest base. Parent or base monitors the transmission quality depending on the acknowledgement that it gets from sent messages. When link quality falls below threshold the nodes are forced to choose a new parent. 3) nesC Design As an extension to C: On the top of easy hardware interfacing, nesC uses C as it is well known to many programmers. It use Whole program analysis and it doesnt use any dynamic memory. It extensively supports TinyOS concurrency model. Features: 1) Component Specification The behavior of the components is clearly specified, also their bidirectional nature is explained. 2) Component implementation Divided into modules and configurations, modules specify application code and its implementation while configurations specify how components are connected through the wires. 3) Concurrency and atomicity The execution of code is either asynchronous or synchronous. The asynchronous code is handled by one or more interrupt handler while the synchronous code is handled by scheduled task. The atomicity implies how the shared state between the tasks is updated. The atomic section runs every time automatically. The atomic section makes sure that the shared state is updated frequently and the system remains concurrent. Parameterized interfaces: The interfaces are parameterized and they are responsible for execution of specific event handler. They act like an active message of packets that specify which event handler is appropriate. 4) Evaluation After the design of the model its evaluation and testing is must. The sets of evaluation are given as: a) Component model The TinyOS is mainly divided into application code and coreOS code. The coreOS code consists of basic event handler, scheduler, timers, etc. coreOS codes are generally 120 lines in size which specifies its extensive power of nesC components. The concurrency is given by bidirectional interfaces. b) Concurrency

Lots of bug and execution time was reduced by implementing the atomic section into large lines of code. c) Optimization By optimizing the code the execution time is reduced to a large extent.

Future Scope
Concurrency support, language enhancements and application to other platforms. Concurrency support and atomicity allow fast execution of program by dividing it into small parts. Language enhancements include split phase operations and parameterized interfaces. Split phase operations suggest how bidirectional command and acknowledgement tasks are specified. The parameterized interface specify operation of the components. Not only just embedded nesC is applicable for other application platforms too. It can monitor compile time analyses for handling dynamic memory and component allocation. The nesC concurrency model is helpful in multiprocessors and blocking operations.

S-ar putea să vă placă și