3211 usc pte587 20 state machine programming model

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rdless Phones Digital/Analog •  Single Channel –  Cellular Phones •  Mul; ­channel, Base sta;on controlled –  802.11 •  “wireless Ethernet” –  Bluetooth •  Emerging, low ­power frequency hopping 3/2/11 USC  ­ PTE587 17 What is in your cell phone? •  Texas Instrument’s TCS2500 Chipset 270.833 kbps ARM9, 120Mhz + DSP 3/2/11 USC  ­ PTE587 18 Third Decision: Sooware •  TinyOS: famous Berkeley SW –  OS/Run;me model designed to manage the high levels of concurrency required –  Gives up IP, sockets, threads –  Uses state ­machine based programming concepts to allow for fine grained concurrency –  Provides the primi;ve of low ­level message delivery and dispatching as building block for all distributed algorithms •  Many, many, many others 3/2/11 USC  ­ PTE587 19 Key Sooware Requirements •  •  •  •  •  Capable of fine grained concurrency Small physical size Efficient Resource U;liza;on Highly Modular Self Configuring 3/2/11 USC  ­ PTE587 20 State Machine Programming Model •  System composed of state machines •  Command and event handlers transi;on modules from one state to another –  Quick, low overhead, non ­blocking state transi;ons •  Many independent modules allowed to efficiently share a single execu;on context 3/2/11 USC  ­ PTE587 21 Tiny OS Concepts Scheduler + Graph of Components Constrained Storage Model –  Frame per component –  Shared stack –  No heap USC  ­ PTE587 TX_packet(buf) Power(mode) Lean Mul;threading 3/2/11 Internal State internal thread init •  msg_send_done) Messaging Component RX_packet_d one (buffer) •  Commands Event Handlers Frame (storage) Tasks (concurrency) Events TX_packet_do ne (success) –  –  –  –  send_msg (addr, type, data) Component: init •  Commands msg_rec(type, data) –  Constrained Two ­level Scheduling Model: –  Threads + Events power(mode) •  22 application Applica;on = Graph of Components Route map router sensor appln bit byte packet Active Messages Radio Packet Radio byte RFM 3/2/11 Serial Packet UART Temp photo SW HW ADC cloc...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online