標題: Linux網路通訊協定堆疊之高效率動態的指令嵌入平台之設計與實作
Design and Implementation of an Efficient and Configurable Instrument Platform for Linux Network Protocol Stack
作者: 曹敏峰
Min-Feng Tsao
曾建超
Chien-Chao Tseng
資訊科學與工程研究所
關鍵字: 嵌入式系統;可攜裝置;網路通訊;Linux;網路通訊協定堆疊;開放原始碼;embedded system;portable device;networking and communication;Linux;network protocol stack;open source
公開日期: 2007
摘要:   本論文之目的是在Linux作業系統的網路通訊協定堆疊上,設計與實作一套高效率動態之指令嵌入平台,讓使用者發展嵌入式網路通訊裝置之網路核心系統與通訊協定行為的整合測試、分析工具。   近年來,由於各式應用的嵌入式網路通訊裝置需求不斷增加,驅使業界及學術界皆投入大量研發人力參與新產品的開發。就嵌入式網路通訊裝置的網路行為而言,除了基本的網路存取(access)能力外,經常關心的會是傳輸的延遲(delay)、反應時間(response time)以及封包遺漏(packet loss)等相關研究議題,因此如何量測各類的延遲、反應時間以及封包遺漏是許多研發人員必須面對的問題。   然而在目前,只有類似network sniffer的通訊封包(packet)擷取工具,能夠協助分析網路通訊系統□外顯的(external)□網路延遲、反應時間與封包遺漏;對於網路通訊裝置系統內部的核心(kernel)協定處理程序(processes)的延遲以及所造成的封包遺漏,現在卻無任何工具能協助研發人員界定其發生的原因。因此,本論文之研究目的即是針對嵌入式之網路通訊裝置,發展一套「可動態嵌入核心函式擷取指令」的平台,以擷取、紀錄與追蹤網路核心函式,利用此平台可進一步結合通訊封包擷取(packet sniffer)工具,發展嵌入式網路通訊裝置之網路核心系統與通訊協定行為的測量、分析與評量系統。藉由此系統,研發人員可輕易分析Linux核心網路系統的行為,對網路通訊協定堆疊的每一個重要且具關鍵性之函式做剖析研究並記錄相關訊息,之後再針對所記錄的相關訊息做額外的分析結果報告,藉此找出封包在傳送及接收時所發生的延遲瓶頸以及對整體的網路通訊堆疊做效能分析。   本論文首先提出一個最基本、最直覺的設計概念(Naive Approach),以了解擷取核心函式的概念、方法以及基本考量,接著再提出本論文所使用的方法來改善Naive Approach的缺失。本論文所提出的平台架構,主要分做四大模組: (1) Linux Kernel Patching (2) Instrument Modules (3) Instrument Configuration Interface (4) Log File Generator and Analyzer。利用這四大模組,本平台可動態嵌入擷取指令,提升整體效能,避免Naive approach所會遇到的種種問題。   最後,我們使用實際的通訊程式來測量Patch之後的Linux Kernel的效能,以及本論文所提出的方法與Naive approach對於處理核心網路堆疊速度的比較。實驗結果顯示,本論文所提出的架構確實能夠改善Naive approach所遇到的問題,在使用Linux Kernel Patching之後對於原始核心的影響非常小。
Due to the continuously increasing demands for various applications of embedded networking and communication devices, the industry and academic both have spent a great amount of research efforts on developing new and better embedded products. In order to develop a high efficient communication system for embedded networking and communication devices, we need to consider not only the basic network accessibility but also the critical performance metrics, such as transmission delays, response times, and packet losses, of embedded devices. Therefore, how to measure various delays, response times and packet losses becomes the major research issue in embedded networking systems. Many network sniffer tools exist for researchers to intercept and analyze network packets. However, the current network sniffer tools can capture only the “external” networking behaviors of communication protocols but not the effects of network kernel subsystems on communications. In other words, they merely intercept network packets for analysis but do not provide any vehicles for the analysis of kernel effects on communications. Therefore, this thesis plans to design and develop a platform that can help researchers to investigate the integrated effects of both the internal behavior of a kernel subsystem and the external behavior of the protocol packet exchanges. This thesis focuses on analyzing the behavior of network communication in Linux kernel at first. Then we develop a platform that can record related information about the important or key functions in Linux network protocol stack. With the recorded information, we can analyze to the networking capabilities and identify the bottlenecks of embedded networking and communication devices. Consequently we can try to reduce the packet transmitting/receiving delays and improve the overall performance of the network protocol stack. The goal of this thesis aims to develop an efficient and configurable instrument platform for Linux network protocol stack. We first present a naive approach that adopts the basic and intuitional methods in the design of this platform. By presenting the naive approach, we can introduce the concepts, implementation methods and design considerations of kernel patching. We then describe the concepts and design of our configurable instrument platform. The architecture of the platform consists of four basic components: (1) Linux Kernel Patching, (2) Instrument Modules, (3) Instrument Configuration Interface, and (4) Log File Generator and Analyzer. With these four modules, a user can configure instrument profile dynamically, that is at runtime and without recompilation, to trace the kernel behaviors the user is interested at. Furthermore, with the ingenious design of the Instrument Module, our platform can trace kernel functions and record kernel events with just a slightly overhead. Finally, we use real network protocols in measuring the performance of Linux Kernel Patching mechanisms and compare the effectiveness of our approach with the naive approach. The results show that our configurable instrument platform introduces only negligible overhead, and is much superior to the naive approach.
URI: http://140.113.39.130/cdrfb3/record/nctu/#GT009555601
http://hdl.handle.net/11536/39553
顯示於類別:畢業論文


文件中的檔案:

  1. 560101.pdf

若為 zip 檔案,請下載檔案解壓縮後,用瀏覽器開啟資料夾中的 index.html 瀏覽全文。