What Is Media Access Control? Media Access Control (MAC) determines who gets access to the shared medium, and when Media Access Control In wired settings, usually just tries to avoid Greg Hackmann contention In wireless settings, can also significantly reduce CSE467S Spring 2009 energy consumption 2 Carrier Sense Multiple Access, Collision Avoidance (CSMA/CA) Hidden Terminal Problem CS CS 3 4 Virtual Carrier Sense: RTS/CTS Power-Saving MAC Many applications’ expected lifetime: months or years RTS Payload Actual lifetime: AA batteries: 2000 mAh (if you’re lucky) CC2420 radio: 19.7 mA when idle but awake (RX mode) 2000 mAh / 19.7 mA = 101.5 h ≈ 6 days CTS This is a problem! Solution: keep the radio asleep most of the time NAV Duty cycles on the order of 0.1% – 1% 5 6 1
Types of Power-Saving MACs Types of Power-Saving MACs (cont.) Scheduled contention: nodes periodically wake up in Different trade-offs for latency, power consumption, unison, contend for access to channel, then go back runtime overhead, etc. to sleep Motivation for hybrid protocols: SCP [Ye 2006], Z- MAC [Rhee 2005], Funneling MAC [Ahn 2006] S-MAC [Ye 2002], T-MAC [van Dam 2003] Channel polling: nodes independently wake up to sample radio channel B-MAC [Polastre 2004], X-MAC [Buettner 2006] Time division multiple access (TDMA): nodes maintain schedule of when to wake and when they’re allowed to transmit 802.15.4 [IEEE 2003], DRAND [Rhee 2006] 7 8 The Sensor MAC (S-MAC) S-MAC: Boot Phase Nodes stay asleep most of the time Waking up in 3 s Waking up Periodically wake for short in 5 s intervals (0.5 s) to see if Waking up anyone’s sending in 4.5 s 3 s Very low energy consumption when traffic is low 4.5 s 5 s 3 s 4.5 s 5 s 9 10 S-MAC: Sending a Packet S-MAC: Sending a Packet Time awake divided RTS section used for SYNC RTS SYNC RTS into two parts: SYNC transmitting data and RTS CSMA/CA again, followed by RTS/CTS Receiver Receiver Node periodically CS CS send SYNC packet to Wants to SYNC Wants to SYNC keep clocks in sync CS CSMA/CA used to contend for access Wants to send data Wants to send data to wireless channel CS CS CS Wants to SYNC & send data Wants to SYNC & send data 11 12 2
S-MAC: Sending a Packet S-MAC: Evaluation CTS for someone else RTS -> go to sleep CTS ACK ACK Overhearing avoidance Receiver Sender does one RTS/ CTS then sends data Sleep for rest of frame All data packets are RTS DATA DATA ACKed RTS Winner Packet fragmentation = Sleep higher reliability 13 14 S-MAC in Summary Berkeley MAC (B-MAC) Power savings over standard 802.11 MAC Long listening period is expensive Everyone stays awake unless somebody transmits Time synchronization overhead even when t ≥ t network is idle RTS/CTS and ACK overhead when sending data Complex to implement 15 16 B-MAC: Throughput B-MAC: Power Consumption 17 18 3
B-MAC in Summary X-MAC: Room for Improvement Low overhead when network is idle Header Simple to implement Payload Better power savings, latency, and throughput than S-MAC Sender Lower duty cycle -> longer preambles: Higher average latency Higher cost to send Recipient Higher cost to overhear More contention Neighbor 19 20 X-MAC: Overhearing Avoidance X-MAC: Preamble ACKing Destination Header Destination Header Payload Payload Sender Sender ACK Recipient Recipient Neighbor Neighbor 21 22 X-MAC: Current Draw X-MAC: Latency 23 24 4
X-MAC in Summary TDMA Better latency, throughput, and power consumption than Frame B-MAC for unicast traffic Little energy consumed by overhearing Still simple to implement No improvements over B-MAC for broadcast traffic On average, cuts preamble by half -> sending packets is still expensive Time A B C Sleep Sleep Sync Transmits Transmits Transmits Slot 25 26 SCP: Scheduled Contention + Channel TDMA in Summary Polling Predictable latency, throughput, and duty cycle Low packet loss due to contention Schedules must be recreated when nodes leave/ enter neighborhood t t Time synchronization overhead Slots wasted when scheduled node has nothing to send Often complex to implement 27 28 SCP: Adaptive Channel Polling SCP: Multi-Hop Pipelining Receiver Hop 2 Sender Hop 1 Add N sub-intervals whenever packet received Reduces latency of bursty data Sender Continue adding sub-intervals as long as they’re needed, and as long as there’s room Sender “gives up” first regular check after sending multi- hop traffic Whole network quickly moves into adaptive polling mode 29 30 5
SCP: Energy Consumption SCP: Multi-Hop Latency 31 32 Zebra MAC (Z-MAC): TDMA + SCP in Summary Channel Polling Channel polling: low overhead when idle Time A B C Sleep Sleep Sync Transmits Transmits Transmits Scheduled contention: low cost to send Low latency for multi-hop traffic A Complex to implement Experimental radio data required Overhead due to time synchronization B Reduced by piggybacking on data packets C 33 34 Z-MAC in Summary So Why Are They Rarely Used? Reduces waste from unused slots MAC protocols have additional radio-dependent requirements beyond normal application code Higher throughput and lower latency Throughput, latency, and duty cycle no worse Turn radio on and off, low latency I/O, carrier sense, etc. than pure TDMA Typically implemented by forking radio stacks Hard to implement Nodes still stay awake if no one transmits Must be maintained as original radio stack changes Still overhead from time sync Complex to implement MAC layers supported by TinyOS today: CC1000: “experimental” B-MAC CC2420: BoX-MAC (X-MAC-like + pieces of B-MAC) 35 36 6
A Better Approach: MLA References MAC Layer Architecture (MLA) [Klues 07] W. Ye, J. Heidemann and D. Estrin, Medium Access Control with Coordinated, Adaptive Sleeping for Wireless Sensor Networks, IEEE/ACM Low-level abstractions of radio functionality Transactions on Networking, June 2004. High-level implementations of common MAC logic J. Polastre, J. Hill, and D. Culler, Versatile Low Power Media Access for Wireless Sensor Networks, SenSys, 2004. I. Rhee, A. Warrier, M. Aia, and J. Min, Z-MAC: a Hybrid MAC for Wireless Implemented on TinyOS 2.0.2 Sensor Networks, SenSys, 2005. Used to create 5 platform-independent MAC M. Buettner, G. Yee, E. Anderson, R. Han, X-MAC: A Short Preamble MAC Protocol for Duty-Cycled Wireless Sensor Networks, SenSys, 2006. layers W. Ye, F. Silva, and J. Heidemann, Ultra-Low Duty Cycle MAC with B-MAC, X-MAC, SCP, TDMA, variant of Z-MAC Scheduled Channel Polling, SenSys, 2006. K. Klues, G. Hackmann, O. Chipara and C. Lu, A Component-Based Architecture for Power-Efficient Media Access Control in Wireless Sensor Networks, SenSys 2007. 37 38 7
Recommend
More recommend