薛智文臺灣大學:資訊工程學研究所廖偉翔Liao, Wei-XiangWei-XiangLiao2010-05-182018-07-052010-05-182018-07-052008U0001-2608200816165800http://ntur.lib.ntu.edu.tw//handle/246246/183672很多研究開發人員致力於在各種作業系統上實行即時服務,如即時排程、許可控制、延遲抖動控制。大多數即時服務實作沒有良好且能跨各種作業系統的可移植性。因此,在這篇論文中,一個可移植的即時架構被提出來舒緩即時服務的發展。基於這個即時架構,我們針對即時作業系統提出一個共通的應用程式介面設計。我們在Linux 2.4.18 和 2.6.18 實行我們的應用程式介面設計並且評估其效能。實驗結果顯示我們的實作改善了 Linux 2.4.18 和 2.6.18 的即時性效能。我們的應用程式介面設計也能被實行在各種作業系統上並能幫助程式開發人員節省花在即時服務實作的時間和精力。Many researchers have been devoted on implementing real-time services such as real-time scheduling, admission control and jitter control on various operating systems. Most real-time service implementations do not have satisfactory portability across diversified operating systems. Therefore, a portable real-time framework is proposed in this thesis to ease the development of real-time service. Based on the real-time framework, we present a common API for real-time operating systems. We implemented our API on Linux 2.4.18 and 2.6.18 and conducted a performance evaluation. The experimental results show that our implementations improve real-time performances of Linux 2.4.18 and 2.6.18. Our API can be implemented on various operating systems as well and help programmers to save time and effort on real-time service implementations.1 Introduction 1 Related Work 4 API Design 6.1 Real-Time Scheduling Interface 9.2 Real-Time Task Interface 14.3 Time Interface 18 Implementation 20.1 Implement Real-Time API on Linux 2.4 23.2 Implement Real-Time API on Linux 2.6 26 Performance Evaluation 31.1 Definitions and Measurement Approaches 31.2 Results and Discussion 33.2.1 Experiment on Linux 2.4 33.2.2 Experiment on Linux 2.6 43.2.3 Improvement 53 Conclusion and Future Work 56ibliography 57 錄.1 The Common Real-Time Framework 7.2 The Requirements of the Real-Time Scheduling 9.3 The Framework of the Task Management in General Purpose OS 14.1 The Framework of Implementing our Real-Time API on Linux 21.2 The Implementation Method of our Real-Time Service Implementation 21.3 The Data Structure Defined in Linux Kernel 22.4 The Flowchart of Real-Time Scheduling on Linux 2.4 24.5 Modified Kernel Functions in Linux 2.4 25.6 The Flowchart of Real-Time Scheduling on Linux 2.6 26.7 Modified Kernel Functions in Linux 2.6 28.8 Reset the Next Running Task in Linux 2.6 29.1 Linux Kernel Latency 32.2 Kernel Latency Distribution without Load (Linux 2.4), 99% Samples 36.3 Kernel Latency Distribution without Load (CARTOS on Linux 2.4), 99% Samples 36.4 Kernel Latency without Load, Linux 2.4 vs CARTOS (1000 sets, total 100000 samples) 37.5 Kernel Latency Distribution with Load (Linux 2.4), 97% Samples 40.6 Kernel Latency Distribution with Load (CARTOS on Linux 2.4), 97% Samples 40.7 Kernel Latency with Load, Linux 2.4 vs CARTOS (1000 sets, total 100000 samples) 41.8 Kernel Latency Distribution without Load (Linux 2.6), 99% Samples 46.9 Kernel Latency Distribution without Load (CARTOS on Linux 2.6), 99% Samples 46.10 Kernel Latency without Load, Linux 2.6 vs CARTOS (1000 sets, total 100000 samples) 47.11 Kernel Latency Distribution with Load (Linux 2.6), 98% Samples 50.12 Kernel Latency Distribution with Load (CARTOS on Linux 2.6), 99% Samples 50.13 Kernel Latency with Load, Linux 2.6 vs CARTOS (1000 sets, total 100000 samples) 51.14 Worse Kernel Latency with Load (Linux 2.4), 100000 Samples 54.15 Worse Kernel Latency with Load (CARTOS on Linux 2.4), 100000 Samples 54.16 Worse Kernel Latency with Load (Linux 2.6), 100000 Samples 55.17 Worse Kernel Latency with Load (CARTOS on Linux 2.6), 100000 Samples 55application/pdf823218 bytesapplication/pdfen-US即時應用程式介面設計排程中斷潛伏期real-timeAPIschedulinginterruptlatencyCARTOS: 針對即時作業系統的共通應用程式介面設計CARTOS: A Common API for Real-Time Operating Systemsthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/183672/1/ntu-97-R95922147-1.pdf