## 3 QoS Aware MAC Protocols for WMSNs
### N. [PERSON] et al. and Diff-Mac  
[PERSON] et al. [40] and Diff-MAC [41] are two similar CSMA/CA based QoS aware MAC protocols with adaptive contention window (CW) and dynamic duty cycling. In order to give real-time traffic precedence for channel access, both protocols set the CWmin and CWmax of real-time traffic to be smaller than lower priority traffics. In the meantime, in times of collision CW of real-time traffic increases slower as compared to other traffic types and decreases faster when network condition recovers. The differences are that [PERSON] et al. [40] uses the \"stop-for-a-round\" method for CW adaptation in pursuance of fairness among sensors. To be precise, a sensor will seize to adjust its CW size and wait for neighboring sensors to adjust their CWs, if it sees the collision probability not changing as expected after it has last adjusted its CW size. On the other hand, Diff-MAC allows sensors to continuously adjust their CWs for fast convergence to the target CW size.  
Besides CW adaptation, Diff-MAC implements a hybrid weighted fair queuing (WFQ) method to further reduce channel access delay for real-time traffic. Unlike the FIFO scheduler used by [PERSON] et al. [40], WFQ method applies different weights on separate queues with the queue for real-time traffic taking the bigger share of total weight. The scheduler then chooses the packet to be served next in virtue of weights on the queues. Moreover, other than prioritization among different traffic types, Diff-MAC also prioritizes packets within the same queue by sorting them based on their traversed hop counts so that packets which the network has invested more resource in will get served first since dropping such packets will yield greater waste. Diff-MAC also adopts the message passing technique to fragment video frames into smaller packets and send them in a burst in order to reduce retransmission cost.  
Another technique the two protocols have in common is the dynamic duty cycling mechanism. By monitoring the statistics of processed packets (both sent and received) a sensor determines the dominant type of traffic and accordingly configures its active period. When real-time traffic is dominant, active period is extended to ensure minimum idle waiting time at the expense of higher energy usage. Whereas if non real-time traffic or best effort traffic is dominant, active period is reduced to avoid idle listening and save energy. This allows the network to balance delay and energy consumption while at the same time to adapt to the dynamic traffic patterns of WMSNs. Although the lack of synchronization can lead to suffering of early sleeping problem.  
Pros and Cons. In terms of QoS provision, energy efficiency and fairness, both [PERSON] et al. [40] and Diff-MAC [41] are good candidates. However, it is quite costly since the two MAC protocols require sensors to constantly monitor many network states. The lack of sleep-listen synchronization leaves the network prone to idle listing and early sleeping problem considering the dynamic and bursty traffic in WMSNs. As for Diff-MAC, the continuous intra-queue sorting also becomes infeasible when the traffic load is high.