Title: Realtime message scheduling in wireless sensor networks
1Real-time message scheduling in wireless sensor
networks
Kavitha Balasubramanian Teaching Assistant, CprE
458/558 Dept. of Electrical and Computer
Engineering Iowa State University, Ames, IA 50011
2Agenda
- Introduction
- Wireless Sensor Networks
- Scheduling Algorithms in Wireless Sensor Networks
- Implementation
- Conclusion
3Agenda
- Introduction
- Wireless Sensor Networks
- Scheduling Algorithms in Wireless Sensor Networks
- Implementation
- Conclusion
4Agenda
- Introduction
- Wireless Sensor Networks
- Scheduling Algorithms in Wireless Sensor Networks
- Implementation
- Conclusion
5Agenda
- Introduction
- Wireless Sensor Networks
- Scheduling Algorithms in Wireless Sensor Networks
- Implementation
- Conclusion
6Agenda
- Introduction
- Wireless Sensor Networks
- Scheduling Algorithms in Wireless Sensor Networks
- Implementation
- Conclusion
7Introduction
- Real-time systems
- Hard real-time
- Guarantee deadlines
- Soft real-time
- Improve hit ratio
- Wireless sensor network applications require
real-time support - Surveillance and tracking
- Border patrol
- Fire fighting.
8Wireless Sensor Networks
- Operate in Adhoc networks
- Communication patterns
- Local coordination
- Sensors coordinate with one another in order to
aggregate data - Sensor-base communication
- Sends data from the local group to the base
station - Real time sensor applications need timeliness
guarantees - Schedule messages based on deadlines
- Exploit spatial reuse of wireless channel
- Simultaneous transmissions
- Explicitly avoid collisions
- Prevent false blocking
9Scheduling Algorithms in Wireless Sensor Networks
- RAP A Real-Time Communication Architecture for
Large-Scale Wireless Sensor Networks - Chenyang Lu Brian M. Blum Tarek F. Abdelzaher
John A. Stankovic Tian He - Scheduling messages with deadline in real time
multi-hop wireless sensor networks - Huan Li, Prashant Shenoy, Krithi Ramamritham
10RAP(A Real-Time Communication Architecture for
Large-Scale Wireless Sensor Networks)
- Velocity monotonic scheduling
- Deadline and Distance aware
- Static monotonic velocity (SMV)
- Dynamic monotonic velocity (DMV)
- Higher velocity denotes higher priority
11RAP(A Real-Time Communication Architecture for
Large-Scale Wireless Sensor Networks)
- Static monotonic velocity
- Dynamic monotonic velocity (DMV)
12Scheduling messages with deadline in real time
multi-hop wireless sensor networks
- Application Background
- Definitions
- False Blocking
- Algorithm details
- Conclusions
13Application Background
- Examples
- Searching for trapped people in a building on
fire, Building map of an unknown environment - Each robot carries sub-set of sensors and has
wireless connectivity - Communication over an adhoc network
14Assumptions
- Global topology information available
- Messages to be transmitted available
- Routing information available
15Definitions
- Arrival Time (AT)
- Time at which message arrives at a node
- Transmission Duration
- Difference between instants when first bit is
sent out and last bit is received by receiver - Data Validity
- Time interval for which data value produced by
sensor is valid - Also determined by start time of consuming task
- Effective Deadline (ed)
- Minimum of data validity deadline and start time
of consuming task - Latest Start time
- latest time by which a hop must start
transmitting for it to reach its destination by
effective deadline
16Definitions
- Message needs to travel h hops from source to
destination - mi denotes transmission of message at the ith
hop - Pd(mi) transmission time incurred on remaining
hops to destination. - LST(mi) ed(m) pd(mi)
17False Blocking
- One hop transmission
- 1 -gt 0 RTS
- 0 -gt 1 CTS
- 2 Receives RTS of 1 and is blocked during the
transmission of m1 - 3 -gt 2 RTS
- 2 Blocked and does not respond
- 4 Receives RTS sent by 3 and is blocked
- 5 -gt 4 RTS
- 4 Blocked and does not respond
- Even though m1 and m3 can be transmitted
simultaneously and do not interfere
18False Blocking
- Deadline miss
- m1 0 to 2
- m2 2 to 7
- m3 7 to 9 (misses deadline)
- Parallel transmissions can reduce deadline misses
19False Blocking
- Deadlock
- False blocking propagates
- Propagation is along circular
- path
- In cycle A,B,C,D,E,F,A
- every second node A,C,E is sending RTS to the
next node B,D,F that is already blocked and
because of this RTS, the previous node gets
blocked
20Goal
- Avoid collisions
- False blocking needs to be eliminated for meeting
deadlines - Do parallel transmissions (carefully) to meet
deadline constraints - Consider potential impact of scheduling messages
on future message transmissions
21Algorithm
- Channel reuse based on smallest LST first
- Partition message transmissions into disjoint
sets - Messages in one set can be transmitted together
- Transmission in one set should complete before
next one begins - Once message is scheduled at hop i, it is
considered for scheduling at hop i1
22Initial state
23Divide into sets
m1
m3
m2
m4
Set1
Set2
Set3
24Transmit Messages
m1
m3
m2
m4
Set1
Set2
Set3
m5
m6
25Transmit Messages
m1
m3
m2
m4
Set1
Set2
Set3
m5
m6
m7
26Transmit Messages
m1
m3
m2
m4
Set1
Set2
Set3
27Calculate LST
m1
m3
m2
m4
Set1
Set2
Set3
28Sort the Message queue
m1
m3
m2
m4
Set1
Set2
Set3
m7
m6
m5
m8
29Repeat the process
m1
m3
m2
m4
Set1
Set2
Set3
m7
m6
m5
m8
30Set Construction
- Condition to join a set
- Exploit parallelism
- Arrival time of the message lt Finish time
- Schedule within deadline
- Finish time of message is no greater than the
effective deadline. - No interference
- Current message transmission does not interfere
with existing message transmissions in the set - Does not violate scheduled transmissions
- Inserting transmission into the set does not
cause deadline violations for already scheduled
transmissions in other sets
31Example
32Example
- Message m1
- m1 selected first since it has smallest LST _at_time
0 - S1 T(m1)
- s(S1) AT 0
- f(S1) 2 lt 6
33Example
- Message m2
- m1 and m2 interfere.
- m2 cannot be added to S1.
- Create new set S2 T(m2)
- s(S2) f(S1) 2
- f(S2) s(S2) 5 2 5 7 lt 8
- S1 T(m1), S2 T(m2)
34Example
- Message m3
- Condition 1 Exploit parallelism
- f(S1) 2 gt a(m3)
- Condition 2 Schedule within deadline
- f(m3) max(s(S1),a(m3)) tt(m3) 1 2 3 lt
d(m3) 8 - Condition 3 No interference
- m3 and m1 do not interfere
- Condition 4 Does not violate scheduled
transmissions - Since f(m3) 3 gt f(S1) fnew(S1) f(m3) 3
snew(S2) fnew(S1) 3 fnew(m2) 3 5 8 -
35Example
- Therefore S1 is feasible for T(m3)
- Final schedule
- S1 T(m1),T(m3)
- S2 T(m2)
- m1 and m3 are transmitted in parallel followed by
m2
36Example
- Therefore S1 is feasible for T(m3)
- Final schedule
- S1 T(m1),T(m3)
- S2 T(m2)
- m1 and m3 are transmitted in parallel followed by
m2
37Conclusion
- Advantages
- Explicitly avoids collisions
- Doesnt inject infeasible packets into the system
- Exploits spatial channel reuse
38Implementation
- Implemented in C
- Input
- Network topology
- Collision Matrix
- Distance Matrix
- Routing table
- Message Size
- Events
39Implementation
- Results
- Comparison of performance of the RAP and the
CR-SLF - Deadline miss
- Impact of parameter settings
- Message size
- Network topology
- Distance
- Number of events
40Summary
- RAP Distributed
- CR-SLF Centralized
- SLF without channel reuse is same as Dynamic
Velocity Monotonic Scheduler - CR-SLF performs better because of channel reuse
and collision avoidance
41Questions
42References
- Scheduling Messages with Deadlines in Multi-hop
Real-time Sensor Networks - 11th IEEE Real-Time and Embedded Technology and
Applications Symposium, San Francisco,
California, March 2005. - RAP A Real Time Communication Architecture for
Large Scale Wireless Sensor Networks - IEEE Real-Time Technology and Applications
Symposium, San Jose, California, September 2002.