CSE 237aCSE 237a
Tajana Simunic Rosing
Winter 2008
Tajana Simunic
Topic researchTopic researchAverage presentation score 8.9 with deviation 0.7
Obtained as an average between student’s and prof’s scores
What can we learn about 5min presentations?Think about how to apply this experience to your final project presentation & demo
Tajana Simunic
Final ProjectFinal Project
Presentations & DemosDue by email 8pm March 12th in ppt format20min for presentation & demo, 5min Q/AAll presentations and demos on March 13th in ES Lab, CSE Building
Report due March 13th at 3:30pm: 4-5pgs single spaced, 11pt font minDiscuss what you implemented, how you did it, what were some of the challenges you faced along the way, the results you have and why this is a great project for graduate level embedded systems classEmail pdf of the report
Tajana Simunic
Internships and ProjectsInternships and Projects
Industry internships:
Intel – power management for multicore SoCs
Qualcomm – sensor networks, zigbeeCisco – thermal management, virtualization
HP – power management, virtualization
Sun Microsystems – multicore SoCs power and thermal management
Projects at UCSD:
Sensor networks
DNA detection in a very low power sensor node, routing and scheduling for energy efficiency
Multicore SoC power and thermal management
Tajana Šimunić Rosing
UCSD
Resource Management ofHeterogeneous Wireless Systems
Resource Management ofHeterogeneous Wireless Systems
Tajana Simunic
Embedded System TrendsEmbedded System Trends
Increasingly complex systemsMixed hard & soft real-time requirementsCoordination of subsystem & multi-system control
Demand for dynamic & adaptive responseOperation in unpredictably changing contextsVariable performance demandsManagement of resources (power, performance, availability, accessibility, throughput, security etc.)
Faster hardwareFast processors and networksIntegrated processing, common platformsFPGAs vs ASICs, DSPs; SoCs
Complex software development process
Source : NSF EU-US Workshop ‘01
Tajana Simunic
OverviewOverviewOverviewMobile communication
Wireless networking with broad coverage but varying connection qualityHeterogeneous networks provide cost effective context based servicesSensor networks
Challenges for the mobile devicesFinite battery capacity:• Perform heavy computation
(e.g video encoding/decoding)• High communication costQoSSecurity
PAN
WAN
WLAN
Tajana Simunic
HPWREN connected topology agenda
http://hpwren.ucsd.eduSeptember 2005
UCSD
toSCI
SDSU
PL
MLO
MPO
SMER
CE
KSW
BVDALVA2
FRD
BZNSNDCRY
RDM WMC PFOBDC
SantaRosa
DHL
to CI andPEMEX
CWC
PSAP
WIDCKYVW
COTDKNW
GVDA
45Mbps FDX 11GHz FCC licensed45Mbps FDX 6GHz FCC licensed45Mbps FDX 5.8GHz license-exempt45Mbps-class, HDX, license-exempt~8Mbps HDX 2.4GHz license-exempt~3Mbps HDX 2.4GHz license-exempt115kbps HDX 900MHz license-exempt
WLA
Backbone/relay nodeAstronomy science siteBiology science siteEarth science siteUniversity siteResearcher locationNative American siteIncident management site
GLRS
SLMS
USGC
CRRS
p480
AZRY
SO
HPWREN
Tajana Simunic
Earthquake sensors in the desert – 10kbpsEarthquake sensors in the desert – 10kbps
Tajana Simunic
Palomar Observatory – 150 MbpsPalomar Observatory – 150 Mbps
http://www.astro.caltech.edu/palomarpublic/http://snfactory.lbl.gov/http://neat.jpl.nasa.gov/
Tajana Simunic
Gillespie Helitack Base connection – monitoring firesGillespie Helitack Base connection – monitoring fires
Tajana Simunic
Eagle Fire HPWREN connection, May 2004Eagle Fire HPWREN connection, May 2004HPWRENaccess at
SDSU/SMER
relay
Incident Command Post
Local SAM connection at the ICP
Preparation for relay batterytransport at the ICP site
Eagle Fire as seen from HWY79 on May 3rd, 2004
Tajana Simunic
Volcan Fire, September 2005Volcan Fire, September 2005Incident Command Postsite
Volcan relay site
Tajana Simunic
Mountain fire video cameraMountain fire video camera
Tajana Simunic
High resolution still camera at SMERHigh resolution still camera at SMER
Tajana Simunic
Motion detect cameraMotion detect camera
Tajana Simunic
Acoustic sensors - Wolf howls at the California Wolf CenterAcoustic sensors - Wolf howls at the California Wolf Center
Tajana Simunic
Mount Laguna sensor instrumentationMount Laguna sensor instrumentation
temperature
relative humidity
fuel moisture fuel temperature
data logger
barometric pressure
Pan-tilt-zoom camera
support
equipment
3D ultrasonic
anemometer solar
radiation
tipping
rainbucket
anemometer
Tajana Simunic
Wind gusts on Mt. LagunaWind gusts on Mt. Laguna
Tajana Simunic
Trigger email/pager/….if:
condition A + condition B +condition C
occurs
several San Diego fire officers are currently being paged during alarm conditions, based on HPWREN data parameterization by a CDF Division Chief
Trigger email/pager/….if:
condition A + condition B +condition C
occurs
several San Diego fire officers are currently being paged during alarm conditions, based on HPWREN data parameterization by a CDF Division Chief
Real-time data based alerts
Tajana Simunic
PDA
3d ultrasonic anemometer
Temperature, humidity
HPWREN
Animal Monitoring
Notebook Cellular Phone PC
Ship Monitoring
Wireless Sensor Network
Data Distribution
Network
Precipitation
Solar radiation
In-flight camera
Weather station
Mobile and Stationary Operations
Stationary camera
Seismic
Storage
Data Acquisition
Network
Tajana Simunic
HPWREN - three tier networkHPWREN - three tier networkWireless MESH
QoS scheduling and routingFast wireless connectivity
Sensor Cluster HeadsKey issue:
• Delivering good QoS • With long battery lifetime
Use faster radio to support QoS requirements
Sensor NetworkQoS
• not considered in traditional sensor net research
Battery lifetime
Tajana Simunic
• Objective:• Design an adaptive, distributed and low power QoS
scheduling methodology
• Main Challenges:• Understand and characterize the incoming traffic• Devise a good scheduling model:
• improve delay and throughput • reduce the power consumption
• Implement and simulate on NS2 simulator• Test and measure on XScale DVK with WLAN• Deploy in SMER and within HPWREN
Research Topic: QoS SchedulingResearch Topic: QoS Scheduling
Tajana Simunic
• Objective:• Design an adaptive, low power QoS routing algorithm
• Main Challenges:• Characterization of the routes in a hierarchical wireless
network• Devising a good routing model:
• improve delay and throughput • reduce the power consumption• Use simple but accurate metrics to evaluate routes• Low power -> route changes occur frequently -> fast
adaptation is a must • Implement and simulate on NS2 simulator• Test and measure on XScale DVK with WLAN• Deploy in SMER and within HPWREN
Research Topic: QoS RoutingResearch Topic: QoS Routing
Tajana Simunic
Project Testbed: Santa Margarita Ecological ReserveProject Testbed: Santa Margarita Ecological Reserve
80 Cluster heads connected via WLAN80 Cluster heads connected via WLAN
Tajana Simunic
Sensor Node and Cluster Head Power Consumption
Sensor Node and Cluster Head Power Consumption
TransmitReceive
Encode Decode Transmit
Receive
EncodeDecode
Energy breakdown for voice Energy breakdown for MPEG video
Lucent WLAN & SA-1100 CPU at 150 MPISSource : Mobicom’01 SensorsTutorial
Power consumption of sensor node subsystems
0
5
10
15
20Po
wer
(mW
)
SENSORS CPU TX RX IDLE SLEEP
RADIO
Tajana Simunic
802.11b PM - Doze Mode802.11b PM - Doze Mode
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1 59 117
175
233
291
349
407
465
523
581
639
697
755
813
871
929
987
time (10-4 sec)
Power
(W)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1 60 119
178
237
296
355
414
473
532
591
650
709
768
827
886
945
time (10-4 sec)
Pow
er (W
)
Heavy traffic conditions:the card is awake most of the time
Medium traffic conditions: the card is awake half of the time
doze state
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1 55 109
163
217
271
325
379
433
487
541
595
649
703
757
811
865
919
973
time (10-4 sec)
Power (W
)
Light traffic conditions:the card is sleeping most of the time
awake state
network polling
- MAC layer PM is not sufficient due to continual network polling for data, increased RTT and broadcast traffic issues
- Network layer management has no knowledge of application characteristics or of behavior of other clients in the environment
Tajana Simunic
QoS issue: 802.11 contentionQoS issue: 802.11 contention
t
busy
station1
station2
station3
station4
station5
packet arrival at MAC
DIFS
busy
elapsed backoff time
residual backoff timebusy medium busy
DIFSDIFS
busy
busy
DIFSbusy
collision
shortest backoff time
exponentialbackoff
Tajana Simunic
WLAN Bandwidth vs. Contention WLAN Bandwidth vs. Contention
3
3.5
4
4.5
5
5.5
0 5 10 15 20 25 30
Number of nodes
Thro
ughp
ut (M
bps)
k=3
This suggests that in finite traffic:Throughput improvements are possible with bursts of packetsScheduling k clients at a time can be beneficial
Tajana Simunic
TDMA with CBR on WLANTDMA with CBR on WLAN
Proposed TDM fixes contenders at 2-4 Lower contention means higher throughputAnother benefit is more sleep
3.0
3.5
4.0
4.5
5.0
5.5
0 5 10 15 20 25 30Number of nodes
Thro
ughp
ut (M
bps)
No schedulingScheduling
0%
2%
4%
6%
8%
10%
12%
14%
0 5 10 15 20 25 30Number of nodes
Col
lisio
n ra
te
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
0 5 10 15 20 25 30Number of nodes
Pow
er c
onsu
mpt
ion
(W)
...
)(1 nTa
)(2 nTa
)(nTaN
Transportation/Network layer
scheduler
scheduler
scheduler
......
Application Layer Proxy Layer
IEE
E 802.11b M
AC
Station 1
Station 2
Station 2
)(1 nTλ
)(2 nTλ
)(nTNλ
WAKE-UP DELAY
PREMPTEDLOW-POWER MODE
WAKE-UP
BROADCAST
BROADCAST
WAKE-UP
CH 1 CH 2
DELAY
BURST BURSTBURST
LOW-POWER MODE
Tajana Simunic
Large interference between nodes in different cells→ Naive multi-cell scheduling leads to
performance degradation!
Distributed schedulingDistributed scheduling
HPWRENCH
CH
SN SN
SN
SN
SN SN
SN
SN
SN SN
SN
SN
SN SN
SN
SN
SN SN
SN
SN
SN SNSN
SN
CH
CH
CH CH
CH
CH CH
CH CH
CH
HPWRENCH HPWREN
CH
CellCell
Tajana Simunic
Hybrid distributed schedulingHybrid distributed scheduling
Combines cell and node level scheduling
Multi-cell wireless network
Cell-level scheduling
Node scheduling in a cell
Tajana Simunic
Distributed node schedulingDistributed node scheduling
Distributed scheduling with minimal overheadLess vulnerable to a node failureFlexible to the change of network topologyRequires two-hop connectivity information
107 13
19 22
5 16 8
122426
17
11
3 2
23
15
42021
18
1
14
625
10
7 13
19 22
5 16 8
122426
17
11
3
Tajana Simunic
Distributed cell schedulingDistributed cell scheduling
Activate cells that will not interfere with each other → Improve the overall throughput
Unscheduled cells
Scheduled cells
Tajana Simunic
Measurements & SimulationsMeasurements & Simulations
XScale PXA27x DVK representing sensor node cluster heads (CH)NS2 simulator for multiple nodesThe applications used are
Various sensor traffic from SMER/HPWRENMPEG4 videoMP3 audioEmail, Telnet, WWW
Data consumption rate of applications kbps
WLAN
BT
Tajana Simunic
Node schedulingNode scheduling
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
0.0 1.0 2.0 3.0 4.0 5.0 6.0Traffic from nodes (Mbps)
Thro
ughp
ut (M
bps)
No scheduling (real)Scheduling (real)No scheduling (2-param exp)Scheduling (2-param exp)No scheduling (Pareto)Scheduling (Pareto)
0.0
0.2
0.4
0.6
0.8
1.0
1.2
0.0 2.0 4.0 6.0 8.0Traffic from nodes (Mbps)
Pow
er c
onsu
mpt
ion
(W)
No scheduling (real)Scheduling (real)No scheduling (2-param exp)Scheduling (2-param exp)No scheduling (Pareto)Scheduling (Pareto)
0.00
0.01
0.02
0.03
0.0 2.0 4.0 6.0 8.0Traffic from nodes (Mbps)
Del
ay (s
ec)
0.00
2.00
4.00
6.00
8.00
10.00
0.0 2.0 4.0 6.0 8.0Traffic from nodes (Mbps)
Del
ay (s
ec)
Significant improvements in throughput, MAC delay and power consumption regardless of the traffic model used
Tajana Simunic
Distributed cell and node schedulingDistributed cell and node schedulingNodes scheduled with a distributed algorithmSimulation results show large power savings with throughput improvement
Average throughput
1.0
1.2
1.4
1.6
1.8
2.0
5 10 15 20 25 30Node density
Thro
ughp
ut p
er c
ell
No schedulingScheduling: 0.3 sec
Power per node
0.0
0.2
0.4
0.6
0.8
1.0
1.2
5 10 15 20 25 30Node density
Pow
er (W
)
No schedulingScheduling: 0.3 sec
Tajana Simunic
Handling changing workloads:Machine Learning for DPM
Handling changing workloads:Machine Learning for DPM
DPM/DVS Experts (Working Set)
Selects the best performingexpert for managing power
Selected expert manages power
for the idle period
Evaluates performance of allexperts for that idle period
………..DPM 1
DPM Controller
Device
DPM 2 DPM 3 DPM n
Tajana Simunic
Controller Algorithm for DVSController Algorithm for DVS
Parameters: [ ]1,0∈β
Initial weight vector for experts [ ]Nw 1,01 ∈
such that 11
1 =∑ =
N
i iw
∑ =
= N
iti
t
w
t
1
wr
Scheduler tick occurs
Do for t = 1,2,3…..1. Calculate µ = CPIbase / CPIavg
2. Update weight vector of task:wi
t+1 = wit . [1-(1-ß). lossi
t (µ)]3. Choose expert with highest probability
factor in rt :
4. Apply the v-f/DPM settings.5. Reset and restart the Perf. Monitoring Unit
CPIavg=CPIbase+CPIcache+CPItlb+CPIbranch+CPIstall
Tajana Simunic
Workload Characterization & V/f SelectionWorkload Characterization & V/f Selection
0.8
1.3
1.8
200 300 400 500
Frequency (M Hz)
Nor
mal
ized
Ene
rgy
Con
sum
ptio
nburn_loop
m em
com bo
0.8
1.3
1.8
2.3
200 300 400 500
Frequency (MHz)
Perf
orm
ance
Impr
ovem
ent
Three tasks burn_loop (CPU-intensive), mem (memory intensive) and combo (mix) run with static scaling.
burn_loop has nearly constant energy consumptionmem energy efficient at lowest v-f setting
Key observation:CPU-intensive tasks don’t benefit from scalingMemory intensive tasks energy efficient at low v-f settings
Tajana Simunic
Evaluation of experts (loss calculation)Evaluation of experts (loss calculation)
0.1 0.3 0.5 0.7 0.9
0 0.2 0.6 0.80.4
Expert1 µmean
µ
Expert3 µmean
Expert4 µmean
Expert5 µmean
Expert2 µmean
1.0
Intuition: Best suited frequency scales linearly with µ.
Map task characteristics to the best suited frequency using µ-mapper.
e.g: Experts 1 to 5 = {100,200,300,400,500} MHz
Evaluate experts against the best suited frequency.
wit+1 = wi
t . (1-(1-ß). lossit (µ)
Tajana Simunic
What about Multi-tasking systems?What about Multi-tasking systems?
Tasks with different characteristics can execute together.
Weight vector (wt) characterizes an executing task.
Need to personalize weight vector at the task level for accurate characterization.
Solution: store weight vector as a task level structure
wt1 wt2 wt3 . . . wtn
Tajana Simunic
Policies used in experimentsPolicies used in experimentsHard disk drive
traces collected during normal operation of HDD
Expert Characteristics
Fixed Timeout Timeout = 7*Tbe
Adaptive Timeout Initial timeout = 7*Tbe;Adjustment = +0.1Tbe/-0.1Tbe
Exponential Predictive In+l = a in + (1 – a).In,with a = 0.5
TISMDP Optimized for delay constraint of 3.4% on HP-1 trace
Expert Characteristics
Fixed Timeout Timeout = Tbe
Adaptive Timeout Initial timeout = Tbe;Adjustment = +0.1Tbe/-0.2Tbe
Exponential Predictive In+l = a in + (1 – a).In,with a = 0.5
TISMDP Optimized for delay constraint of 8.5% on www trace
WLANwww and telnet traces collected with tcpdump on PXA27x
Device Trace Name
Duration(in sec)
HDD HP-1Trace 32311 20.5 29
HP-2 Trace 35375 5.9 8.4
HP-3 Trace 29994 17.2 2
WLAN Web Surfing 4720 0.16 0.65
Telnet 2767 0.16 0.49
: Average Request Inter-arrival Time (in sec)
RIt RItσ
RIt
Tajana Simunic
HDD results: Perf Delay/Energy SavingHDD results: Perf Delay/Energy Saving
Policy HP1 Trace HP2 Trace HP3 Trace
%delay %energy %delay %energy %delay %energy
Oracle 0 68.17 0 65.9 0 71.2
Timeout 4.2 49.9 4.4 46.9 3.3 55
Ad Timeout 7.7 66.3 8.7 64.7 6 67.7
TISMDP 3.4 44.8 2.26 36.7 1.8 42.3
Predictive 8 66.6 9.2 65.2 6.5 68
Preference HP-1 Trace HP-2 Trace HP-3 Trace
%delay %energy %delay %energy %delay %energyLow delay
IVHigh energy
savings
3.5 45 2.61 37.41 2.55 49.5
6.13 60.64 5.86 54.2 4.36 61.02
7.68 65.5 8.59 64.1 5.69 66.28
With Individual Experts
With ControllerLeast DelayMaximum Energy SavingsConverges to TISMDPConverges to Predictive
Tajana Simunic
HDD results: Frequency of SelectionHDD results: Frequency of Selection
For HP-3 Trace
0.00%
10.00%
20.00%
30.00%
40.00%
50.00%
60.00%
70.00%
80.00%
Fixed Timeout Predictive TISMDP Ad Timeout
Freq
uenc
y of
sel
ectio
n
Higher energy savings
Lower Perf Delay
Tajana Simunic
WLAN results: Perf Delay/Energy SavingWLAN results: Perf Delay/Energy Saving
With Individual Experts
With Controller
Least DelayMaximum Energy Savings
Converges to TISMDPConverges to Timeout
Policy www Trace Telnet Trace Combined
%delay %energy %delay %energy %delay %energy
Oracle 0 41.64 0 20.44 0 29.82
Timeout 10.13 23.47 9.69 4.82 9.98 14.64
Ad Timeout 11.63 28.72 10.73 4.74 11.46 17.56
TISMDP 8.5 19.04 7.41 3.37 7.6 10.02
Predictive 13.6 28.65 7.95 -9.24 11.51 12.9
Preference www Trace Telnet Trace Combined
%delay %energy %delay %energy %delay %energy
Low delayIV
High energysavings
6.48 15.77 4.77 1.57 6.17 9.23
6.78 16.38 5.35 2.69 6.28 10
10.38 26.58 5.67 3.33 8.9 16.1
Tajana Simunic
WLAN results: Frequency of SelectionWLAN results: Frequency of Selection
For a Combined Trace
Higher energy savings
Lower Perf Delay
0.00%
10.00%
20.00%
30.00%
40.00%
50.00%
60.00%
70.00%
Fixed Timeout Predictive TISMDP Ad Timeout
Freq
uenc
y of
Sel
ectio
n
Higher energy savings
Lower Perf Delay
Tajana Simunic
DVFS ExperimentsDVFS Experiments
Setup1.25 samples/sec DAQEnergy savings calculated using actual current measurements
Working set: 4 v-f setting experts
Workloads:qsortdjpegblowfishdgzip
Freq(MHz)
Voltage (V)
208 1.2
312 1.3
416 1.4
520 1.5
Tajana Simunic
Results: Single Task EnvironmentResults: Single Task Environment
Bench. Low perf delay -------> Higher energy savings
%delay %energy %delay %energy %delay %energy
qsort 6 17 16 32 25 41
djpeg 7 21 15 37 26 45
dgzip 15 30 21 42 27 49
bf 6 11 16 27 25 40
Bench. 208MHz/1.2V
%delay %energy
qsort 56 48
djpeg 34 54
dgzip 33 54
bf 40 51
Tajana Simunic
Result: Frequency of SelectionResult: Frequency of Selection
For qsort
0
10
20
30
40
50
60
70
80
208MHz 312MHz 416MHz 520MHz
Freq
uenc
y of
Sel
ectio
n
low αmedium αhigh α
Higher energy savings
Lower Perf Delay
Tajana Simunic
Results: Multi Task EnvironmentResults: Multi Task Environment
Bench. Low perf delay -------> Higher energy savings
%delay %energy %delay %energy %delay %energy
qsort+djpeg 6 17 15 33 25 41
djpeg+dgzip 13 24 19 39 27 48
qsort+djpeg 7 20 18 35 26 42
dgzip+bf 13 18 22 32 27 44
Extremely lightweight implementation.Context Switch: used lat_ctx from lmbench
• 3% overhead with 20 processes (max supported by lat_ctx)• [choi05] cause 100% overhead in context switch times
Tajana Simunic
SummarySummary
Wireless systems often have tight energy and QoS constraints
Scheduling communication has significant benefitsLower energy consumptionBetter bandwidth utilization - QoSEasy of seamless switching between WNICs
DPM and DVS are great methodologies for power reductionDPM transitions components into sleep states
• Timeout is implemented in most systems today
DVS changes freq/voltage of operation in the active state• Coarse-grained DVS implemented in today’s systems
Integrated solution:
Machine learning to optimally select among individual DPM/DVS policies