版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、第二章 網(wǎng)絡(luò)體系架構(gòu),WSN節(jié)點概述和分類WSN節(jié)點結(jié)構(gòu)WSN節(jié)點體系結(jié)構(gòu)WSN網(wǎng)絡(luò)結(jié)構(gòu)無線傳感器網(wǎng)絡(luò)分類和特點WSN操作系統(tǒng),,傳感器概述:功用:一感二傳,即感受被測信息,并傳送出去。,傳感器定義我國國標(GB7665-2005)對傳感器的定義是:“能感受被測量并按照一定的規(guī)律轉(zhuǎn)換成可用輸出信號的器件或裝置”。 傳感器的作用主要是感受和響應規(guī)定的被測量,并按一定規(guī)律將其轉(zhuǎn)換成有用輸出,特別是完成非電量到電量的轉(zhuǎn)換。,
2、2/28,,,,,傳感器的組成,傳感器的組成,并無嚴格的規(guī)定。一般說來,可以把傳感器看作由敏感元件(有時又稱為預變換器)和變換元件(有時又稱為變換器)兩部分組成。,qzm_mail@nuaa.edu.cn,3/28,傳感器的分類,根據(jù)被測量與輸出電量的轉(zhuǎn)換原理分類能量轉(zhuǎn)換型、能量控制型根據(jù)傳感器感知的對象分類溫度傳感器、力傳感器、等根據(jù)輸出信號的性質(zhì)不同分類二值型、數(shù)字型、模擬型根據(jù)傳感器測量原理分類物理和化學….,4
3、,,常用物理傳感器 與化學傳感器,5,,分類-物理傳感器,1. 物理傳感器物理傳感器的原理是利用力、熱、聲、光、電、磁、射線等物理效應,將被測信號量的微小變化轉(zhuǎn)換成電信號物理傳感器可以進一步分為:力傳感器、熱傳感器、聲傳感器、光傳感器、電傳感器、磁傳感器與射線傳感器等7類,6,(1)力傳感器,力傳感器是能感受外力并將其轉(zhuǎn)換成可用輸出信號的傳感器。力傳感器的種類繁多,常用的力與壓力傳感器有電阻應變式、半導體應變式、壓阻式、電
4、感式、電容式、諧振式壓力傳感器,以及光纖壓力傳感器等用金屬應變絲作為敏感元件的壓力傳感器原理示意圖,7,,不同用途的 力傳感器,8,,(2)溫度傳感器(3)聲傳感器,9,,(4)光傳感器圖像傳感器光纖傳感器,10,,分布式光纖傳感系統(tǒng)分布式光纖傳感系統(tǒng)利用光纖作為傳感敏感元件和傳輸信號介質(zhì),探測出沿著光纖不同位置的溫度和應變的變化,實現(xiàn)分布、自動、實時、連續(xù)、精確的測量。分布式光纖傳感系統(tǒng)應用領(lǐng)
5、域包括: —智能電網(wǎng)的電力電纜表面溫度檢測、事故點定位 —發(fā)電廠和變電站的溫度監(jiān)測、故障點檢測和報警 —水庫大壩、河堤安全與滲漏監(jiān)測 —橋梁與高層建筑結(jié)構(gòu)安全性監(jiān)測 —公路、地鐵、隧道地質(zhì)狀況的監(jiān)測分布光纖溫度傳感系統(tǒng)可以在易燃、易爆的環(huán)境下同時測量上萬個點,可以對每個溫度測量點進行實時測量與定位,11,,(5)電傳感器電傳感器可以分為:電阻式、電容式、電感式傳感器電阻式傳感器利用
6、變阻器將非電量轉(zhuǎn)換成電阻信號的原理制成的。電阻式傳感器主要用于位移、壓力、應變、力矩、氣流流速、液面與液體流量等參數(shù)的測量電容式是利用改變電容器的幾何尺寸或介質(zhì)參數(shù),來使電容量變化的原理制成的。電容式傳感器主要用于壓力、位移、液面、厚度、水分含量等參數(shù)的測量電感式是利用改變電感磁路的幾何尺寸或磁體位置,來使電感或互感量變化的原理制成的,主要用于壓力、位移、力、振動、加速度等參數(shù)的測量。,12,(6)磁傳感器,磁傳感器是最古老的傳感器
7、,指南針是磁傳感器的最早的一種應用磁傳感器將磁信號轉(zhuǎn)化成為電信號輸出磁電式傳感器目前已經(jīng)被高性能磁敏感材料的新型磁傳感器所替代,13,(7)射線傳感器,射線傳感器是將射線強度轉(zhuǎn)換出可輸出的電信號的傳感器射線傳感器可以分為:X射線傳感器、γ射線傳感器、β射線傳感器、輻射劑量傳感器射線傳感器已經(jīng)在環(huán)境保護、醫(yī)療衛(wèi)生、科學研究與安全保護領(lǐng)域廣泛使用,14,分類-化學傳感器,化學傳感器可以將化學吸附、電化學反應過程中被測信號的微小變化轉(zhuǎn)
8、換成電信號的一類傳感器 按傳感方式的不同,可分為: —接觸式化學傳感器 —非接觸式化學傳感器按結(jié)構(gòu)形式的不同,可以分為: —分離型化學傳感器 —組裝一體化化學傳感器按檢測對象的不同,可以分為: —氣體傳感器 —離子傳感器 —濕度傳感器,15,分類-生物傳感器,生物傳感器是由生物敏感元件和信號傳導器組成生物敏感元件可以是生物體、組織、細胞、酶、核酸或有
9、機物分子不同的生物元件對于光強度、熱量、聲強度、壓力有不同的感應特性,16,生物傳感器的分類,,常用傳感器,qzm_mail@nuaa.edu.cn,17/28,,,,,智能傳感器,qzm_mail@nuaa.edu.cn,18/28,,,定義:傳統(tǒng)傳感器加上處理器具有智能功能的傳感器。所謂智能式傳感器,就是一種帶有微處理機的,兼有信息檢測、信號處理、信息記憶、邏輯分析與判斷功能的傳感器。 組成:傳感器+微處理器+信號處理電路。微處
10、理器為核心。,,智能傳感器的特點,具有自動調(diào)零和自動校準功能具有判斷和信息處理功能、對測量值進行修正和誤差補償實現(xiàn)多慘了綜合測量(復合感知能力)自動診斷故障靈活的通信能力智能傳感器的發(fā)展為傳感器技術(shù)的研究提出了很多富有挑戰(zhàn)性的課題,qzm_mail@nuaa.edu.cn,19/28,微機電系統(tǒng)對智能傳感器發(fā)展的影響,微機電系統(tǒng)(MEMS)是指集微型機構(gòu)、微型傳感器、微型執(zhí)行器以及信號處理和控制電路,直至接口、通信和電源等
11、于一體的微型器件或系統(tǒng),qzm_mail@nuaa.edu.cn,20/28,性能指標,靜態(tài)指標線性范圍:輸出量與輸入量呈線性關(guān)系的測量范圍線性度:傳感器實際輸入輸出量曲線與擬合曲線的重疊程度靈敏度:輸出變化量與輸入變化量的比值穩(wěn)定性:表示傳感器經(jīng)過長期使用后,輸出特性不發(fā)生變化的性能分辨率:能檢測到的被測量的最小變化量,21/28,(具體定義公式見教材),性能指標,遲滯:傳感器在輸入量從小到大正向變化與反向變化,其輸入輸出特
12、性曲線不重合的程度重復性:傳感器在輸入量按同一方向做全量程連續(xù)多次變化時所得特性曲線一致的程度漂移:輸入量不變的情況下,輸出量隨時間變化的現(xiàn)象測量范圍:最小/最大輸入量的范圍精度:測量結(jié)果的可靠程度,以給定的準確度來表示重復某個讀數(shù)的能力動態(tài)指標輸出信號對應隨時間變化的輸入量的響應特性,反映測量精度、重復性和可靠性,第二章 網(wǎng)絡(luò)體系架構(gòu),WSN節(jié)點概述和分類WSN節(jié)點結(jié)構(gòu)WSN節(jié)點體系結(jié)構(gòu)WSN網(wǎng)絡(luò)結(jié)構(gòu)無線傳感器網(wǎng)絡(luò)
13、分類和特點WSN操作系統(tǒng),,24,無線傳感器節(jié)點結(jié)構(gòu)(1),無線傳感器節(jié)點通常由4個功能模塊組成:感知模塊、處理模塊、通信模塊和電源模塊,,,25,無線傳感器節(jié)點結(jié)構(gòu)(2),感知模塊:由一個或多個傳感器以及模數(shù)轉(zhuǎn)換器組成。傳感器負責感知監(jiān)測目標的物理特征和現(xiàn)象,并產(chǎn)生相應的模擬信號。感知聲、光、電、震動、磁、氣體等信號模數(shù)轉(zhuǎn)換器負責將模擬信號轉(zhuǎn)換為數(shù)字信號,并將數(shù)字信號送往處理模塊進行處理。處理模塊:由一個微處理器及相應的內(nèi)存組
14、成,負責對數(shù)據(jù)進行處理、濾波、決策、執(zhí)行、資源分配等判斷,并對傳感器節(jié)點進行控制通信模塊:由數(shù)模轉(zhuǎn)換器和無線收發(fā)送器(Zigbee, WiFi, GPRS,短波等)組成,負責發(fā)送和接收數(shù)據(jù)和控制信息,,,26,無線傳感器節(jié)點結(jié)構(gòu)(3),電源模塊:負責節(jié)點的供電(電池供電或從自然界采集能量)其他模塊位置模塊:節(jié)點可以配置全球定位系統(tǒng)(Global Positioning System, GPS)或北斗定位系統(tǒng)接收器移動模塊:在某些
15、需要移動傳感器節(jié)點的應用中,可以配置馬達來驅(qū)動傳感器節(jié)點,,,https://en.wikipedia.org/wiki/List_of_wireless_sensor_nodes,一個簡單的應用開發(fā)需要:,,一個簡單的應用開發(fā)需要:,,Programming Board (MIB510),29,Mica 2 Motes,MICA 2 MOTE,https://www.eol.ucar.edu/isf/facilities/isa/in
16、ternal/CrossBow/DataSheets/mica2.pdf,30,,Sensor Board - MTS310,32,第二章 網(wǎng)絡(luò)體系架構(gòu),WSN節(jié)點概述和分類WSN節(jié)點結(jié)構(gòu)WSN節(jié)點體系結(jié)構(gòu)WSN網(wǎng)絡(luò)結(jié)構(gòu)無線傳感器網(wǎng)絡(luò)分類和特點WSN操作系統(tǒng),,,跨層設(shè)計 聯(lián)合優(yōu)化,無線傳感器網(wǎng)絡(luò)協(xié)議棧,WSN的體系架構(gòu),35,WSN的通信協(xié)議,物理層(主要是電磁波)負責頻率選擇、頻率產(chǎn)生、信號檢測、調(diào)制解調(diào)和數(shù)據(jù)加密,,
17、36,WSN的通信協(xié)議(續(xù)),,鏈路層負責介質(zhì)訪問和差錯控制確保通信中點-點 /點-多點的連接介質(zhì)訪問控制:創(chuàng)建網(wǎng)絡(luò)架構(gòu)在節(jié)點間公平有效的共享通信資源差錯控制前向糾錯FEC自動重發(fā)檢錯ARQ,,37,WSN的通信協(xié)議(續(xù),,網(wǎng)絡(luò)層(路由層)節(jié)能總是最重要的考慮傳感網(wǎng)絡(luò)多以數(shù)據(jù)為中心數(shù)據(jù)聚合不能影響傳感節(jié)點的協(xié)同理想的傳感器網(wǎng)絡(luò)基于屬性尋址并能感知位置,,38,WSN的通信協(xié)議(續(xù),,傳輸層負責數(shù)據(jù)流的傳輸控制
18、可靠性和擁塞控制當傳感系統(tǒng)需要被Internet或者其它外部網(wǎng)絡(luò)訪問時傳輸層設(shè)計與實現(xiàn)至關(guān)重要研究不成熟,,39,WSN的通信協(xié)議(續(xù)),,跨層設(shè)計 聯(lián)合優(yōu)化,應用層負責任務調(diào)度和數(shù)據(jù)分發(fā)等具體業(yè)務,使得底層硬件和軟件對傳感應用是透明的 Sensor management protocol (SMP) Task assignment and data advertisement protocol (TADAP) Sensor
19、 query and data dissemination protocol (SQDDP),,網(wǎng)絡(luò)管理平臺,主要是對傳感器節(jié)點自身的管理和用戶對wsn的管理,包括:拓撲控制服務質(zhì)量管理能力管理安全管理移動管理網(wǎng)絡(luò)管理,,應用支撐平臺,包括一系列基于監(jiān)測任務的應用層軟件,通過應用服務借口和網(wǎng)絡(luò)管理接口為用戶提供各種應用的支持。時間同步定位應用服務接口網(wǎng)絡(luò)管理接口,,第二章 網(wǎng)絡(luò)體系架構(gòu),WSN節(jié)點概述和分類WSN節(jié)
20、點結(jié)構(gòu)WSN節(jié)點體系結(jié)構(gòu)WSN網(wǎng)絡(luò)結(jié)構(gòu)無線傳感器網(wǎng)絡(luò)分類和特點WSN操作系統(tǒng),,43,無線傳感網(wǎng)的布設(shè)形式,隨機布設(shè)網(wǎng),戰(zhàn)場:炮射、空投應急:火災、毒氣,固定布設(shè)網(wǎng),工控:自動控制監(jiān)測:遠程監(jiān)測,44,無線傳感器網(wǎng)絡(luò)的網(wǎng)絡(luò)結(jié)構(gòu)(1),傳感器網(wǎng)絡(luò)基本組成:傳感器節(jié)點(sensor node) 匯聚節(jié)點(sink) 管理節(jié)點(Management node)匯聚節(jié)點→傳感器節(jié)點: 查詢消息或指令匯聚節(jié)點還作為連接外部傳輸網(wǎng)絡(luò)
21、(如互聯(lián)網(wǎng)、衛(wèi)星網(wǎng)等)的網(wǎng)關(guān),對收集到的數(shù)據(jù)進行簡單的處理,然后將數(shù)據(jù)通過互聯(lián)網(wǎng)或其它傳輸網(wǎng)絡(luò),傳送給監(jiān)控中心和需要使用這些數(shù)據(jù)的終端用戶傳感器節(jié)點→匯聚節(jié)點: 監(jiān)測數(shù)據(jù),,,sink,Internet/Satellite,,,,Sensor node,45,無線傳感器網(wǎng)絡(luò)的網(wǎng)絡(luò)結(jié)構(gòu)(2),單跳結(jié)構(gòu)各傳感器節(jié)點可以采用單跳的方式將各自的數(shù)據(jù)直接發(fā)送給匯聚節(jié)點基于蜂窩的窄帶物聯(lián)網(wǎng)(Narrow Band Internet of T
22、hings, NB-IoT),,,,Sensor node,,Ref: NB-IoT: A sustainable technology for connecting billons of devices Ericssion Technology Review April 22, 2016,,NB-IoT的應用,無線傳感器網(wǎng)絡(luò)的網(wǎng)絡(luò)結(jié)構(gòu)(3),多跳結(jié)構(gòu)傳感器節(jié)點通過一個或多個網(wǎng)絡(luò)中間節(jié)點將所采集到的數(shù)據(jù)傳送給匯聚節(jié)點,從而有效地降低
23、通信所需的能耗,,,,,,,平面結(jié)構(gòu),多跳分簇結(jié)構(gòu),,多層分簇結(jié)構(gòu),第二章 網(wǎng)絡(luò)體系架構(gòu),WSN節(jié)點概述和分類WSN節(jié)點結(jié)構(gòu)WSN節(jié)點體系結(jié)構(gòu)WSN網(wǎng)絡(luò)結(jié)構(gòu)無線傳感器網(wǎng)絡(luò)分類和特點WSN操作系統(tǒng),,50,無線傳感器網(wǎng)絡(luò)的分類(1),單跳網(wǎng)絡(luò)與多跳網(wǎng)絡(luò) single-hop/multi-hop靜止網(wǎng)絡(luò)與移動網(wǎng)絡(luò) static/mobile靜止傳感網(wǎng)中,所有傳感器節(jié)點都是靜止不動的。靜止傳感網(wǎng)實現(xiàn)簡單,但靜止WSN存在瓶頸;
24、移動傳感網(wǎng)中,某些節(jié)點可以移動。移動可以平衡網(wǎng)絡(luò)流量和能耗分布,但動態(tài)性使得協(xié)議實現(xiàn)復雜。靜止匯聚節(jié)點網(wǎng)絡(luò)與移動匯聚節(jié)點網(wǎng)絡(luò) 靜止匯聚節(jié)點網(wǎng)絡(luò)中,匯聚節(jié)點的位置靜止固定在監(jiān)測區(qū)域附近或內(nèi)部;移動匯聚節(jié)點網(wǎng)絡(luò)中,匯聚節(jié)點在監(jiān)測區(qū)域移動,收集傳感器節(jié)點的監(jiān)測數(shù)據(jù),可以平衡各網(wǎng)絡(luò)負載,減小熱點效應。,,,,51,無線傳感器網(wǎng)絡(luò)的分類(2),確定性網(wǎng)絡(luò)與非確定性網(wǎng)絡(luò)根據(jù)傳感器節(jié)點部署的情況不同確定性傳感器網(wǎng)絡(luò)中,傳感器節(jié)點的位置是預先
25、規(guī)劃的,且一旦部署不再變化;非確定性傳感器網(wǎng)絡(luò)中,節(jié)點隨機布設(shè),甚至可以移動,適合自然條件惡劣或敵對的應用場合,難以預先規(guī)劃。單匯聚節(jié)點網(wǎng)絡(luò)與多匯聚節(jié)點網(wǎng)絡(luò)根據(jù)匯聚節(jié)點的數(shù)量單匯聚節(jié)點網(wǎng)絡(luò)中,只有一個匯聚節(jié)點位于監(jiān)測區(qū)域的附近或內(nèi)部;多匯聚節(jié)點網(wǎng)絡(luò)中,多個匯聚節(jié)點布設(shè)于不同位置,各傳感器節(jié)點可以將其監(jiān)測數(shù)據(jù)發(fā)送給離自己最近的匯聚節(jié)點。,,,,52,無線傳感器網(wǎng)絡(luò)的分類(3),同構(gòu)網(wǎng)絡(luò)與異構(gòu)網(wǎng)絡(luò)根據(jù)傳感器節(jié)點是否具有相同的能力
26、(通信能力、感知能力、計算能力等的不同)同構(gòu)傳感器網(wǎng)絡(luò)中,所有傳感器節(jié)點能力完全相同;異構(gòu)傳感器網(wǎng)絡(luò)中,傳感器節(jié)點(或部分)能力不同,可以配備較強的通信、處理模塊或傳感器。先應式網(wǎng)絡(luò)和反應式網(wǎng)絡(luò)先應式網(wǎng)絡(luò)采用連續(xù)操作模式,節(jié)點定期打開傳感器和發(fā)送器、感知環(huán)境并進行數(shù)據(jù)匯包 適用于定期監(jiān)控的應用反應式網(wǎng)絡(luò)采用查詢-響應的操作模式,節(jié)點按需的進行感知和數(shù)據(jù)匯報,,,,WSN的特征,四大受限:能量受限 通信能力受限計算能力受限
27、存儲能力受限組網(wǎng)特征:自組織性以數(shù)據(jù)為中心應用相關(guān)性事件驅(qū)動拓撲動態(tài)性大規(guī)模需要考慮可靠性和魯棒性,54,無線傳感器網(wǎng)絡(luò)的設(shè)計目標,節(jié)點體積小型化節(jié)點成本低廉節(jié)點功耗超低節(jié)點可自組成網(wǎng)可擴展性強自適應性強可靠性高滿足一定的安全性和服務質(zhì)量要求,55,傳感網(wǎng)絡(luò)面臨的問題和挑戰(zhàn),,56,影響傳感器網(wǎng)絡(luò)的因素(1),57,影響傳感器網(wǎng)絡(luò)的因素(2),,58,影響傳感器網(wǎng)絡(luò)的因素(3),制造成本單個節(jié)點的成本是
28、衡量整個網(wǎng)絡(luò)成本的關(guān)鍵如何以低于一美元的成本制造一定功能的傳感節(jié)點是很大的挑戰(zhàn)傳輸介質(zhì)(選擇的傳輸介質(zhì)必須是全球可用的)無線電紅外其他光波,59,影響傳感器網(wǎng)絡(luò)的因素(4),傳感器的環(huán)境敵方戰(zhàn)場居家/大型建筑物大型倉庫動物身上快速移動的車輛有水流動的排水管/河流,第二章 網(wǎng)絡(luò)體系架構(gòu),WSN節(jié)點概述和分類WSN節(jié)點結(jié)構(gòu)WSN節(jié)點體系結(jié)構(gòu)WSN網(wǎng)絡(luò)結(jié)構(gòu)WSN分類WSN操作系統(tǒng),,Major Concern
29、s in WSN OS Design,能在有限的資源上運行:WSN節(jié)點資源非常有限(通信帶寬資源/能量資源 /計算資源),操作系統(tǒng)必須能夠高效地使用各種資源; 允許高度的并發(fā)性:要求執(zhí)行模式能對事件作出快速的直接響應; 適應硬件升級 支持一系列平臺:要求組件和執(zhí)行模式能夠應對硬件/ 軟件的替換,具有可移植性; 支持多樣化的應用程序:良好的模塊化設(shè)計,使應用/協(xié)議/服務與硬件資源之間可以隨意搭配,要求能夠根據(jù)實際需要, 裁減操作系統(tǒng)
30、的服務; 魯棒性強:要求通過組件間有限的交互渠道,就能應對各種復雜情況; 提供高效的組網(wǎng)機制:WSN是一個網(wǎng)絡(luò)系統(tǒng),其操作系統(tǒng)也必然是面向 網(wǎng)絡(luò)化開發(fā)的。網(wǎng)絡(luò)化系統(tǒng)要求操作系統(tǒng)必須為 應用提供高效的組網(wǎng)和通信機制,WSNOS Outline,Functional AspectsData TypesSchedulingStacksSystem CallsHandling InterruptsMultithreadingT
31、hread-based vs. Event-based ProgrammingMemory AllocationNon-Functional AspectsSeparation of ConcernSystem OverheadPortabilityDynamic ReprogrammingPrototypesTinyOSContikiEvaluation,Operating Systems,An operatin
32、g System isa thin software layerresides between the hardware and the application layerprovides basic programming abstractions to application developersIts main task is to enable applications to interact with hardware
33、 resources,Operating Systems,Operating systems are classified as: single-task/multitasking and single-user/multiuser operating systemsmulti-tasking OS - the overhead of concurrent processing because of the limited resou
34、rcessingle task OS - tasks should have a short durationThe choice of a particular OS depends on several factors; typically functional and non-functional aspects,Outline,Functional AspectsData TypesSchedulingStacksS
35、ystem CallsHandling InterruptsMultithreadingThread-based vs. Event-based ProgrammingMemory AllocationNon-Functional AspectsSeparation of ConcernSystem OverheadPortabilityDynamic ReprogrammingPrototypesTinyOSC
36、ontikiEvaluation,Data Types,Interactions between the different subsystems take place through:well-formulated protocolsdata typesComplex data types have strong expression power but consume resources - struct and enum
37、Simple data types are resource efficient but have limited expression capability - C programming language,Scheduling,Two scheduling mechanisms: queuing-based scheduling FIFO - the simplest and has minimum system overhea
38、d, but treats tasks unfairlysorted queue - e.g., shortest job first (SJF) - incurs system overhead (to estimate execution duration)round-robin schedulinga time sharing scheduling techniqueseveral tasks can be process
39、ed concurrently,Scheduling,Regardless of how tasks are executed, a scheduler can be eithera non-preemptive scheduler - a task is executed to the end, may not be interrupted by another taskor preemptive scheduler - a t
40、ask of higher priority may interrupt a task of low priority,Stacks & System Calls,Stacksa data structure that temporarily stores data objects in memory by piling one upon anotherobjects are accessed using last-in-f
41、irst-out (LIFO)System Calls:is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed ondecouple the concern of accessing hardware resources from imp
42、lementation detailswhenever users wish to access a hardware resource, they invoke these operations without the need to concern themselves how the hardware is accessed,Handling Interrupts,An interrupt is an asynchronous
43、signal generated by a hardware deviceseveral system eventsOS itselfAn interrupt causes:the processor to interrupt executing the present instructionto call for an appropriate interrupt handlerInterrupt signals can
44、have different priority levels, a high priority interrupt can interrupt a low level interruptInterrupt mask: let programs choose whether or not they wish to be interrupted,Multi-threading,A thread is the path taken by a
45、 processor or a program during its executionMulti-threading - a task is divided into several logical piecesscheduled independent from each otherexecuted concurrentlyTwo advantages of a multi-threaded OS:tasks do not
46、 block other tasksshort-duration tasks can be executed along with long-duration tasks,Multi-threading,Threads cannot be created endlessly the creation of threads slows down the processorno sufficient resources to divi
47、deThe OS can keep the number of threads to a manageable size using a thread pool,Thread-based vs. Event-based Programming,Decision whether to use threads or events programming:need for separate stacksneed to estimate
48、maximum size for saving context informationThread-based programs use multiple threads of control within:a single program a single address space,Thread-based vs. Event-based Programming,Advantage:a thread blocked can
49、be suspended while other tasks are executed in different threadsDisadvantages:must carefully protect shared data structures with locksuse condition variables to coordinate the execution of threads,Thread-based vs. Eve
50、nt-based Programming,In event-based programming: use events and event handlersevent-handlers register with the OS scheduler to be notified when a named event occursa loop function: polls for eventscalls the appropri
51、ate event-handlers when events occurAn event is processed to completionunless its handler reaches at a blocking operation (callback and returns control to the scheduler),Memory Allocation,The memory unit is a precious
52、 resourceReading and writing to memory is costly How and for how long a memory is allocated for a piece of program determines the speed of task execution,Memory Allocation,Memory can be allocated to a program:statical
53、ly - a frugal approach, but the requirement of memory must be known in advancememory is used efficientlyruntime adaptation is not alloweddynamically - the requirement of memory is not known in advance (on a transient
54、basis)enables flexibility in programmingbut produces a considerable management overhead,Outline,Functional AspectsData TypesSchedulingStacksSystem CallsHandling InterruptsMultithreadingThread-based vs. Event-bas
55、ed ProgrammingMemory AllocationNon-Functional AspectsSeparation of ConcernSystem OverheadPortabilityDynamic ReprogrammingPrototypesTinyOSContikiEvaluation,Separation of Concern,SoC is a design principle for se
56、parating a computer program into distinct sections, such that each section addresses a separate concernIn general, separation between the operating system and the applications layerThe operation systems can provide:a
57、number of lightweight modules - “wired” together, oran indivisible system kernel + a set of library components for building an application, ora kernel + a set of reconfigurable low-level servicesSeparation of concern
58、enables:flexible and efficient reprogramming and reconfiguration,Portability,Ideally, operating systems should be able to co-exist and collaborate with each otherHowever, existing operating systems do not provide this
59、type of supportIn order to accommodate unforeseen requirements, operating systems should be portable and extensible,System Overhead,An operating system executes program code - requires its own share of resourcesThe res
60、ources consumed by the OS are the system’s overhead, it depends onthe size of the operating system the type of services that the OS provides to the higher-level services and applications,System Overhead,The resources o
61、f wireless sensor nodes have to be shared by programs that carry out:sensingdata aggregationself-organizationnetwork managementnetwork communication,Dynamic Reprogramming,Once a wireless sensor network is deployed,
62、 it may be necessary to reprogram some part of the application or the operating system for the following reasons:the network may not perform optimallyboth the application requirements and the network’s operating enviro
63、nment can change over timemay be necessary to detect and fix bugs,Dynamic Reprogramming,Manual replacement may not be feasible - develop an operating system to provide dynamic reprogramming support, which depends oncle
64、ar separation between the application and the OSthe OS can receive software updates and assemble and store it in memoryOS should make sure that this is indeed an updated versionOS can remove the piece of software that
65、 should be updated and install and configure the new versionall these consume resources and may cause their own bugs,Dynamic Reprogramming,Software reprogramming (update) requires robust code dissemination protocols:sp
66、litting and compressing the codeensuring code consistency and version controllingproviding a robust dissemination strategy to deliver the code over a wireless link,Outline,Functional AspectsData TypesSchedulingStack
67、sSystem CallsHandling InterruptsMultithreadingThread-based vs. Event-based ProgrammingMemory AllocationNon-Functional AspectsSeparation of ConcernSystem OverheadPortabilityDynamic ReprogrammingPrototypesTinyO
68、SContikiEvaluation,TinyOS (Gay et al. 2007),TinyOS is the most widely used, richly documented, and tool-assisted runtime environment in WSN http://www.tinyos.netstatic memory allocation event-based systemTinyO
69、S’s architecture consists ofa scheduler a set of components, which are classified intoconfiguration components - "wiring" (how models are connected with each other) modules - the basic building blocks of a
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 高性能傳感器網(wǎng)絡(luò)體系結(jié)構(gòu)及可用帶寬估計研究.pdf
- 層次網(wǎng)絡(luò)體系結(jié)構(gòu)-短接技術(shù)
- 無線傳感器網(wǎng)絡(luò)的網(wǎng)絡(luò)管理體系結(jié)構(gòu)及相關(guān)技術(shù)的研究.pdf
- OBS網(wǎng)絡(luò)體系結(jié)構(gòu).pdf
- 網(wǎng)絡(luò)體系結(jié)構(gòu)分層研究
- 《網(wǎng)絡(luò)體系結(jié)構(gòu)與網(wǎng)絡(luò)協(xié)議》說課稿
- 無線傳感器網(wǎng)絡(luò)技術(shù)及其研究進展
- 基于ZigBee的無線傳感網(wǎng)絡(luò)體系結(jié)構(gòu)與分群算法的研究.pdf
- 無線傳感器-執(zhí)行器網(wǎng)絡(luò)的體系結(jié)構(gòu)與算法研究.pdf
- 基于數(shù)據(jù)融合結(jié)構(gòu)的無線傳感器網(wǎng)絡(luò)技術(shù)研究.pdf
- 無線傳感器網(wǎng)絡(luò)技術(shù)與應用現(xiàn)狀的研究
- 事件驅(qū)動型無線傳感器網(wǎng)絡(luò)技術(shù)研究.pdf
- 無線傳感器網(wǎng)絡(luò)拓撲控制和體系結(jié)構(gòu)的研究與設(shè)計.pdf
- 基于ZigBee的無線傳感器網(wǎng)絡(luò)技術(shù)研究.pdf
- 對無線傳感器網(wǎng)絡(luò)技術(shù)安全性的淺析
- 支持語音傳輸?shù)臒o線傳感器網(wǎng)絡(luò)技術(shù)研究.pdf
- 計算機網(wǎng)絡(luò)體系結(jié)構(gòu)
- 僵尸網(wǎng)絡(luò)體系結(jié)構(gòu)研究與實現(xiàn).pdf
- 一種基于無線傳感器網(wǎng)絡(luò)技術(shù)的無線監(jiān)控裝置.pdf
- 無線傳感器網(wǎng)絡(luò)QoS體系研究.pdf
評論
0/150
提交評論