Unformatted text preview:

Presentation on Tiny Presentation on Tiny OSOSPresented by : Srilekha ChittiPresented by : Srilekha Chitti2020ththMarch 2006March 2006About Tiny OSAbout Tiny OSnnAuthored by 3 studentsAuthored by 3 students**of UC of UC Berkeley. Berkeley. nnSpecifically designed for real time Specifically designed for real time embedded sensors. embedded sensors. nnIt is an OS for wireless network It is an OS for wireless network embedded systems .embedded systems .nnIt is a very small Operating system.It is a very small Operating system.nnFocuses on saving power.Focuses on saving power.nnThe Tiny OS software is The Tiny OS software is implemented on NesC platform implemented on NesC platform which has a syntax like C.which has a syntax like C.nTinyOS is an event-driven operating system useful for behavioral applications.nThe basic aim is to design a s/w that will abstract power management, networking and sensor measurements from the core application development.nMaintain flexibility by keeping component-based design.nTinyOS provides an open-source software platform which promotes abstraction, code re-use, and flexibility.DATA MEMORY MODELDATA MEMORY MODELnnThe stack size is 4KB.The stack size is 4KB.nnIt has a static memory It has a static memory allocation.Noallocation.Noheap ,no function pointers.heap ,no function pointers.nnGlobal variables are available on Global variables are available on per frame basis.per frame basis.nnLocal variables are saved on the Local variables are saved on the stack and declared within methods .stack and declared within methods .Structure Of Tiny OSStructure Of Tiny OSnnThis OS consists of a tiny This OS consists of a tiny scheduler and a graph of scheduler and a graph of components.components.nnThere are 2 threads of application There are 2 threads of application tasks and hardware event tasks and hardware event handlers. handlers. nnSchedulerScheduler1.1.The task scheduler is a simple The task scheduler is a simple FIFO queue.FIFO queue.1.1.The scheduler uses a bounded The scheduler uses a bounded size scheduled data structure. Tiny size scheduled data structure. Tiny Os 1.1 supports up to 7 pending Os 1.1 supports up to 7 pending tasks.i.etasks.i.eQueue size=8.Queue size=8.2.2.Puts the processor to sleep when Puts the processor to sleep when the tasks are complete, due to the tasks are complete, due to severe power constraints.severe power constraints.Tasks And Hardware Event Tasks And Hardware Event Handlers Handlers nnTasks. Tasks. nnNon preemptive FIFO. Non preemptive FIFO. 1.1.Atomic with respect to other tasks Atomic with respect to other tasks (No multithreading).(No multithreading).2.2.Run in background while events Run in background while events are being processed.are being processed.3.3.Can be preempted by events. Can be preempted by events. 4.4.Perform computationally intensive Perform computationally intensive work.work.Events Events nnEvent handlers deal with the Event handlers deal with the hardware events.hardware events.nnThey are time critical and are of They are time critical and are of shorter duration as compared to shorter duration as compared to tasks. tasks. nnThey interrupt tasks.They interrupt tasks.nnPriority doesn't exist among events. Priority doesn't exist among events. (LIFO)(LIFO)nnnesC applications are built out of nesC applications are built out of componentscomponentswith wellwith well--defined, defined, bidirectional bidirectional interfacesinterfaces. Second, . Second, nesC defines a concurrency model, nesC defines a concurrency model, based on based on taskstasksand and hardware hardware event handlersevent handlers, and detects , and detects data data racesracesat compile time. at compile time. nnModules provide application code, Modules provide application code, implementing one or more interface. implementing one or more interface.Contd..Contd..nnConfigurations are used to assemble Configurations are used to assemble other components together, other components together, connecting interfaces used by connecting interfaces used by components to interfaces provided components to interfaces provided by others. This is called by others. This is called wiringwiring..nnEvery nesC application is described Every nesC application is described by a by a toptop--level configurationlevel configurationthat that wires together the components wires together the components inside. inside.Naming Conventions In Tiny Naming Conventions In Tiny OSOSnnThe naming conventions in Tiny The naming conventions in Tiny OS are strongly influenced by Java OS are strongly influenced by Java coding.coding.nnInterfacesInterfaces1.1.Modules and components are Modules and components are connected using interfaces.connected using interfaces.2.2.Interfaces should be verbs or Interfaces should be verbs or nouns in mixed case with first letter nouns in mixed case with first letter of each word capitalized. E.g. of each word capitalized. E.g. SendMsg.SendMsg.nnComponents Components 1.1.These are the set of command and These are the set of command and event handlers. event handlers. 2.2.Each component declares the Each component declares the commands and events it uses. commands and events it uses. 3.3.The event handlers are invoked to The event handlers are invoked to deal with hardware events.deal with hardware events.4.4.To name a Component : To name a Component :nnThere are 2 cases ,those terminating There are 2 cases ,those terminating with an M and those with a C. with an M and those with a C. nnThe upper case C stands for The upper case C stands for Component ,used in order to Component ,used in order to distinguish between interface and a distinguish between interface and a component providing the interface. component providing the interface. E.g. E.g. TimerCTimerCnnThe upper case M stands for The upper case M stands for Module. This is used when a single Module. This is used when a single component has both a configuration component has both a configuration as well as a module. E.g. as well as a module. E.g. TimerMTimerMnnApplications should be name of the Applications should be name of the top level component with the trailing top level component with the trailing C removed.C removed.nnIf an application tests TINYOS If an application tests TINYOS hardware then the first word should hardware then the first word should be be ““TestTest””. .Naming Conventions In Tiny Naming Conventions In Tiny OS Contd.. OS Contd.. nnCommands events and


View Full Document

UNCC ECGR 6185 - Presentation on Tiny OS

Documents in this Course
Zigbee

Zigbee

33 pages

Load more
Download Presentation on Tiny OS
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Presentation on Tiny OS and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Presentation on Tiny OS 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?