• 沒有找到結果。

第四章 實驗結果與討論

4.2 網路卡驅動程式的效能測試與分析

4.2.2 已修改過的網路卡驅動程式效能表現

讓驅動程式中的Interrupt thread 的優先權大於 Main thread。結果顯示出使用者模式驅動 程式與核心模式驅動程式的傳送與接收的效能(throughput)並無太大的差異。

接著,我們要量測網路卡驅動程式的CPU 使用率,如上所提,驅動程式的 Tx ring buffer 的元素個數為 128 個,並且一個封包的大小最大是 1500bytes。結果如 Figure 15 所示,圖中分別顯示核心模式驅動程式與使用者模式驅動程式的網路傳送與接收時的

0

Network Send Network Receive

Throughput (Mbits/sec)

Kernel User Conventional User Real-Time

Figure 14:Network Throughput

0

Network Send Network Receive

C PU Ut ili zat io n ( % )

Kernel User Conventional User Real-Time

Figure 15:Network CPU Utilization

0

Number of For-loop Processes

Throughput (Mbits/sec)

Kernel User Conventional User Real-Time

Figure 16:CPU Resource Leak

4.3 RAMDISK 驅動程式的效能測試

此節我們以Postmark 及 Dbench 這兩個 Benchmarks,以及 tar 程式來評估 RAMDISK 驅動程式的效能。我們將RAMDISK 的大小設定為 128MBytes。對於 Postmark,我們設 定其一開始產生 750 個大小介於 500Bytes~100KBytes 的檔案,並執行 200000 個 transactions。對於 Dbench,我們設定同時執行 5 個程序,每個程序重複執行 samba 的存 取動作,執行時間為 120 秒。對於 tar,我們利用它解壓縮 MySQL 版本 5.0.19 的原始

Postmark Dbench Untar

Performance Normalization

Kernel User Conventional User Real-Time

Figure 17:RAMDISK Performance

4.4

多個驅動程式同時執行

1M 10M 20M 30M 40M 50M 60M 70M 80M 90M 100M

File Size

Normalization

Kernel User

Figure 18:Ftp Send Performance

0

1M 10M 20M 30M 40M 50M 60M 70M 80M 90M 100M

File Size

Normalization

Kernel User

Figure 19:Ftp Receive Performance

4.5

驅動程式容錯

此節我們主要在評估我們要讓使用者模式驅動程式達到容錯能力所需要的負擔。如 3.2.2 節所述,為了避免驅動程式出錯而污染到 Request Buffer,我們必須要做額外記憶 體複製因而會增加額外的CPU 使用率。我們的實驗環境為 Server 與 Client1 利用 Netperf 去測量其Server 個別傳送與接收所需要的 CPU 使用率。實驗結果如 Figure 20 所示,我 們發現支援容錯機制大概造成了0.3%~0.5% 的 CPU 使用率增加。

0 2 4 6 8 10 12 14 16

Network Send Network Receive

CPU Utilization (%)

No Fault-tolerant Fault-tolerant

Figure 20:Fault-Tolerant Overhead

接著,我們測量網路卡驅動程式回復所需時間。我們讓 Server 傳送資料到 Client1,

在傳送 75000Bytes 後就讓驅動程式發生 divide-by-zero 的錯誤以啟動驅動程式回復流 程。結果如 Figure 21 所示,橫軸表示相對時間,縱軸為 Client1 回覆給 Server 的 ack sequence number,圖中顯示一段時間為服務停機,結果顯示出服務的停機時間(downtime) 大概為9ms。

0 500000 1000000 1500000 2000000 2500000

0 0.05 0.1 0.15 0.2 0.25

Relative Time(second)

Relative ACK Sequence Number

No Fault Fault

Figure 21:Recovery Time

第五章 結論

在這篇論文我們提出一個使用者模式驅動程式架構,主要目的是要改善作業系 統中驅動程式的出錯,以改善其可信賴度。我們論文主要分為兩部份:第一部份是 我們希望能夠直接去重用原本的核心模式驅動程式,讓它能夠直接執行在使用者模 式,以減少開發驅動程式的成本。我們目前已完成三個驅動程式的搬移:一個Tulip Ethernet 網路卡驅動程式,一個 RAMDISK 區塊驅動程式,與一個 PS2 Mouse 字元 驅動程式;第二部份是我們希望當驅動程式出錯時,我們能夠掩飾驅動程式的錯誤,

去啟動另外一個驅動程式,讓核心與應用程式能夠繼續執行,而不影響其執行,以 達到作業系統可用度。由實驗結果顯示我們架構中的使用者模式驅動程式負擔並沒 有太大,並且在回復過程中具有可以接收的效能表現

參考文獻

[1] J. Appavoo, M. Auslander, D. DaSilva, D. Edelsohn, O. Krieger, M. Ostrowski, B.

Rosenburg, R. W. Wisniewski, and J. Xenidis, “Utilizing Linux Kernel Components in K42”, available at http://www.research.ibm.com/K42/, Aug. 2002.

[2] S. Arthur, ”Fault Resilient Drivers for Longhorn Server”, Technical Report WinHec 2004 Presentation DW04012, Microsoft Corporation, May 2004.

[3] T. C. Chiueh, G. Venkitachalam, and P. Pradhan, “Integrating Segmentation and Paging Protection for Safe, Efficient and Transparent Software Extensions”, Proceedings of the 17th ACM Symposium on Operating Systems Principles, pp. 140-153, Dec. 1999.

[4] A. Chou, J. Yang, B. Chelf, S. Hallem, and D. Engler, “An Empirical Study of Operating Systems Errors”, Proceedings of the 18th ACM Symposium on Operating Systems Principles, pp. 73-88, Oct. 2001.

[5] Coverity Inc, “Analysis of the Linux Kernel”, available at

http://linuxbugs.coverity.com/linuxbugs.htm, Jan. 2004.

[6] P. Chubb, “Get More Device Drivers out of the Kernel!”, Ottawa Linux Symposium, vol.1, pp. 149-161, Jul. 2004.

[7] C. L. Conway and S. A. Edwards, “NDL: A Domain-specific Language for Device Drivers”, Proceedings of the 2004 ACM SIGPLAN/SIGBED conference on Languages, Compilers, and Tools for Embedded Systems, pp. 30-36, Jun. 2004.

[8] T. Li, C. S. Ellis, A. R. Lebeck, and D. J. Sorin, “Pulse: A Dynamic Deadlock Detection Mechanism Using Speculative Execution”, Proceedings of the 2005 USENIX Annual Technical Conference, pp. 31-44, Apr. 2005.

[9] W. Feng, “Making a Case for Efficient Supercomputing”, ACM Queue, vol. 1, no. 7, pp.

54-64, Oct. 2003.

[10] B. Ford, G. Back, G. Benson, J. Lepreau, A. Lin, and O. Shivers, “The Flux OSKit: A Substrate for Kernel and Language Research”, Proceedings of the 16th ACM Symposium on Operating Systems Principles, pp. 38-51, Oct. 1997.

[11] A. Forin, D. Golub, and B. Bershad, “An I/O System for Mach 3.0”, Proceedings of the USENIX Mach Symposium, pp. 163-176, Apr. 1991.

[12] K. Fraser, S. Hand, R. Neugebauer, I. Pratt, A. Warfield, and M. Williamson, “Safe

Hardware Access with the Xen Virtual Machine Monitor”, Proceedings of the 1th Workshop on Operating System and Architectural Support for the On-Demand IT Infrastructure, Oct. 2004.

[13] S. Goel and D. Duchamp, “Linux Device Driver Emulation in Mach”, Proceedings of the 1996 USENIX Annual Technical Conference, pp. 65-73, Jan. 1996.

[14] J. Gray and D. P. Siewiorek, “High-availability Computer Systems”, Computer, vol. 24, Iss. 9, pp. 39-48, Sep. 1991.

[15] G. C. Hunt, “Creating User-Mode Device Drivers with a Proxy”, Proceedings of the 1st USENIX Windows NT Workshop, pp. 55-59, Aug. 1997.

[16] J. Katcher, “Postmark: A New File System Benchmark,” Technical Report TR3022, Network Appliance Inc., Oct. 1997.

[17] B. Leslie, P. Chubb, N. Fitzroy-Dale, S. Gotz, C. Gray, L. Macpherson, D. Potts, Y. Shen, K. Elphinstone, and G. Heiser, “User-Level Device Drivers: Achieved Performance”, Journal of Computer Science and Technology, vol. 20, pp. 654-664, Sep. 2005.

[18] J. LeVasseur, V. Uhlig, J. Stoess, and S. Gotz, ”Unmodified Device Driver Reuse and Improved System Dependability via Virtual Machines”, Proceedings of the 6th Symposium on Operating Systems Design and Implementation, pp. 17-30, Dec. 2004.

[19] J. Liedtke, U. Bartling, U. Beyer, D. Heinrichs, R. Ruland, and G. Szalay, “Two Years of Experience with a μ-Kernel Based OS”, Operating Systems Review, vol. 25, no. 2, pp.

51–62, Apr. 1991.

[20] K. V. Maren, “The Fluke Device Driver Framework”, Master’s Thesis, University of Utah, available at http://www.cs.utah.edu/flux/papers/vanmaren-thesis-base.html, Dec.

1999.

[21] F. Merillon, L. Reveillere, C. Consel, R. Marlet, and G. Muller, “Devil: An IDL for Hardware Programming”, Proceedings of the 4th Symposium on Operating Systems Design and Implementation, pp. 17-30, Oct. 2000.

[22] Microsoft Corporation, “Introduction to the WDF User-Mode Driver Framework”, available at http://www.microsoft.com/whdc/driver/wdf/UMDF_Intro.mspx, Apr. 2005.

[23] R. Jones, “Netperf: A Network Performance Benchmark, Version 2.4”, available at

http://www.netperf.org, 2005.

[24] D. Oppenheimer, A. Ganapathi, and D. A. Patterson, “Why Do Internet Services Fail, and What Can be Done about It?”, Proceedings of the 4th USENIX Symposium on

Internet Technologies and Systems, Mar. 2003.

[25] D. S. Ritchie and G. W. Neufeld, “User Level IPC and Device Management in the Raven Kernel”, Proceedings of USENIX Association Symposium on Micro Kernels and Other Kernel Architectures, pp. 111-125, Sep. 1993.

[26] A. Rubini and J. Corbet, “Linux Device Drivers, 3rd Edition”, O’reilly, 2005.

[27] R. Short, “Vice President of Windows Core Technology”, Microsoft Corp. Private Communication, 2003.

[28] M. M. Swift, B. N. Bershad, and H. M. Levy, “Improving the Reliability of Commodity Operating Systems”, Proceedings of the 19th ACM Symposium on Operating Systems Principles, pp. 207-222, Oct. 2003.

[29] M. M. Swift, M. Annamalai, B. N. Bershad, and H. M. Levy, “Recovering Device Drivers”, Proceedings of the 6th ACM/USENIX Symposium on Operating Systems Design and Implementation, pp. 1-16, Dec. 2004.

[30] M. M. Swift, S. Martin, H. M. Leyand, and S.J. Eggers, “Nooks: An Architecture for Reliable Device Drivers”, Proceedings of the 10th ACM SIGOPS European Workshop, pp. 101-107, Sep. 2002.

[31] A. Tridgell, “Dbench – Filesystem Benchmark, Version 3”, available at

http://samba.org/ftp/tridge/dbench/, 2001.

[32] H. Vemuri., D. Gupta, and R. Moona, “Userdev: A Framework for User Level Device Drivers in Linux”, Proceedings of the 5th NordU/USENIX Conference, Feb. 2003.

相關文件