簡易檢索 / 詳目顯示

研究生: 古以恩
Ian Ku
論文名稱: 時間片管理機制的效能評比
Performance Evaluation of Timeslice Management Mechanisms
指導教授: 張韻詩
Jane W.S. Liu
金仲達
Chung-Ta King
口試委員:
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Computer Science
論文出版年: 2006
畢業學年度: 94
語文別: 中文
論文頁數: 68
中文關鍵詞: Linux時間片管理動態時間片配給分時共享
外文關鍵詞: Linux, timeslice management, dynamic quantum allocation, time-sharing
相關次數: 點閱:2下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 在現代,大多數的作業系統為了分享有限的處理器時間給程序,會讓程序們輪流的執行。每一個程序會執行一段時間,停止,然後等待下一次的執行時間。當作業系統把執行時間細分然後分配給想要執行的程序時,讓程序們快速的輪流執行時,就可以給予一種所有的程序都在同時執行的感覺。至於程序在輪流執行時,每一次可以被允許執行多久的時間則是由作業系統裡面的排程器來決定。除了一些少數的例外,Windows的核心排程器會給予所有想要執行的程序相同的時間,而不去考慮程序的優先度以及狀態等等。相對來說,Linux 2.6.10的核心排程器就會根據程序的優先度,然後計算出每一個程序在每一次被允許執行的時間可以是多久。
    本篇論文是在評比Windows跟Linux這兩個作業系統管理這個執行時間長短的方法。這兩個作業系統的執行時間管理方法以及其他的排程計算方法都被模擬在一個模擬器上面,然後在不同的工作量以及系統的參數之下進行了許多的實驗。這些實驗所得到的效能資訊被紀錄下來然後整理重現。從這些效能的資訊可以顯示出這兩個作業系統所使用的不同的方法,在不同的工作量以及系統的參數之下,有些情況下使用比較複雜方法的Linux會比使用比較簡單方法的Windows有著較佳的效能。而再另外一些情況下,Windows的效能表現則跟Linux的效能表現一樣。


    Most modern operating systems allocate limited amounts of processor time to tasks and let them take turns to run. By dividing time on each processor to ready-to-run tasks, the operating system gives the impression that the tasks are running simultaneously. The amount of time each task is allowed to run each turn is assigned by the scheduler. With a few exceptions, Windows kernel scheduler gives all tasks the same amount regardless of their priorities. In contrast, Linux 2.6.10 kernel computes the amount for each task based on its priority.
    This thesis evaluates the methods used by Windows and Linux operating systems to allocate time to tasks under different workloads and system configurations by simulating the methods and scheduling algorithms used by the operating systems. The performance data presented here demonstrate that under certain workloads and system configurations, the more complicated Linux operating system has better performance than its simpler Windows counterpart. While in some other cases Windows performs just as well as Linux.

    CHAPTER 1. INTRODUCTION 1 1.1 MOTIVATION 1 1.2 CONTRIBUTION 2 1.3 ORGANIZATION 3 CHAPTER 2. RELATED WORK 4 CHAPTER 3. SCHEDULER 7 3.1 PROCESS, THREAD AND TASK 7 3.2 SCHEDULER STRUCTURES 9 3.2.1 Priority Scheduling 9 3.2.1.1 Priority Levels 10 3.2.1.2 Priority Arrays 12 3.2.2 Timeslice Management 14 3.2.2.1 Timeslice Calculation 15 3.2.2.2 Depleted Timeslice 16 3.2.3 Dynamic Priority Calculation 17 3.2.3.1 Dynamic Priority Calculation in Linux 17 3.2.3.2 Dynamic Priority Calculation in Windows 19 3.2.4 Preemption 21 3.2.5 Linux Parent Task and Child Task Relation 22 3.2.5.1 Task Creation 22 3.2.5.2 Task Termination 23 3.2.6 Real-time Tasks 24 3.2.7 Interactive Tasks 25 3.2.7.1 Criteria for Interactivity 25 3.2.7.2 Timeslice Granularity of Interactive Tasks 27 CHAPTER 4. SIMULATION MODEL 30 4.1 MODELING WITH OMNET++ 30 4.2 TASK AND TASK CONTEXT SWITCH MODELS 31 4.3 SCHEDULER MODEL 33 4.3.1 Modeling Priority and Timeslice Granularity 33 4.3.2 Modeling the Balance Set Manager 34 CHAPTER 5. SIMULATION 37 5.1 OVERVIEW 37 5.2 CONTEXT SWITCH TIME EXPERIMENT 39 5.2.1 Effect of Context Switch Time 39 5.2.2 Removing Timeslice Granularity from Linux 41 5.3 RELATIVE PERFORMANCE OF PRIORITY BOOSTING METHODS 43 5.3.1 Linux Priority Boost in the Linux Scheduler 44 5.3.2 Windows Priority Boost in the Linux Scheduler 45 5.3.3 Windows Scheduler 48 5.4 RELATIVE PERFORMANCE OF FORKING METHODS 52 5.5 CHANGING THE AVERAGE EXECUTION TIME 56 5.5.1 Linux Scheduler 56 5.5.2 Linux Scheduler without Re-inserting Interactive Task Back to Active Array 58 5.5.3 Windows Scheduler 60 5.5.4 Windows Scheduler with Constant Timeslice Boost 61 CHAPTER 6. CONCLUSION AND FUTURE WORK 64 REFERENCE 66 FIGURE 1. TASK LIFE CYCLE 8 FIGURE 2. LINUX PRIORITY LEVELS 11 FIGURE 3. WINDOWS PRIORITY LEVELS 12 FIGURE 4. WINDOWS PRIORITY ARRAY 13 FIGURE 5. LINUX PRIORITY ARRAY 14 FIGURE 6. LINUX TIMESLICE SCALING 15 FIGURE 7. LINUX DYNAMIC PRIORITY 18 FIGURE 8. WINDOWS PRIORITY BOOST AND DECAY 20 FIGURE 9. TASK PREEMPTION 22 FIGURE 10. TASK INTERACTIVITY 26 FIGURE 11. TIMESLICE GRANULARITY 28 FIGURE 12. SIMULATION MODEL 30 FIGURE 13. TASK MODEL 32 FIGURE 14. POSSIBLE PRIORITY ARRAY CHANGE BETWEEN 2 BALANCE SET MANAGER SCANS 35 FIGURE 15. STORING THE LAST PRIORITY LEVEL SCANNED BY THE BALANCE SET MANAGER 36 FIGURE 16. RESPONSE TIME 38 FIGURE 17. AVERAGE RESPONSE TIME RATIO VS CONTEXT SWITCH TIME 40 FIGURE 18. NUMBER OF HIGHER PRIORITY TASKS ARRIVING WHILE CONTEXT SWITCHING 41 FIGURE 19. AVERAGE RESPONSE TIME RATIO VS CONTEXT SWITCH TIME 42 FIGURE 20. NUMBER OF HIGHER PRIORITY TASK ARRIVING WHILE CONTEXT SWITCHING 43 FIGURE 21. RESULT OF LINUX SCHEDULER USING LINUX PRIORITY BOOST 44 FIGURE 22. DYNAMIC PRIORITY BONUS FREQUENCY COUNT USING LINUX SCHEDULER AND LINUX PRIORITY BOOST 45 FIGURE 23. RESULT OF LINUX SCHEDULER USING WINDOWS PRIORITY BOOST 46 FIGURE 24. DYNAMIC PRIORITY BONUS FREQUENCY COUNT USING LINUX SCHEDULER AND WINDOWS PRIORITY BOOST 46 FIGURE 25. RESULT OF WINDOWS SCHEDULER USING WINDOWS PRIORITY BOOST (20MS TIMESLICE) 48 FIGURE 26. DYNAMIC PRIORITY BONUS FREQUENCY COUNT USING WINDOWS SCHEDULER AND WINDOWS PRIORITY BOOST (20MS TIMESLICE) 49 FIGURE 27. RESULT OF WINDOWS SCHEDULER USING WINDOWS PRIORITY BOOST (800MS TIMESLICE) 50 FIGURE 28. DYNAMIC PRIORITY BONUS FREQUENCY COUNT USING WINDOWS SCHEDULER AND WINDOWS PRIORITY BOOST (800MS TIMESLICE) 50 FIGURE 29. RESULT OF WINDOWS SCHEDULER USING LINUX PRIORITY BOOST 51 FIGURE 30. DYNAMIC PRIORITY BONUS FREQUENCY COUNT USING WINDOWS SCHEDULER AND LINUX PRIORITY BOOST 52 FIGURE 31. AVERAGE RESPONSE TIME OF CHILD TASKS USING THE TWO FORK METHODS AND LINUX SCHEDULER 53 FIGURE 32. AVERAGE RESPONSE TIME OF CHILD TASKS USING THE TWO FORK METHODS AND WINDOWS SCHEDULER 54 FIGURE 33. AVERAGE RESPONSE TIME OF PARENT TASKS USING THE TWO FORK METHODS AND LINUX SCHEDULER 55 FIGURE 34. AVERAGE RESPONSE TIME OF PARENT TASKS USING THE TWO FORK METHODS AND WINDOWS SCHEDULER 55 FIGURE 35. AVERAGE RESPONSE TIME RATIO VS AVERAGE EXECUTION TIME USING THE LINUX SCHEDULER 57 FIGURE 36. AVERAGE RESPONSE TIME RATIO VS AVERAGE EXECUTION TIME USING THE LINUX SCHEDULER WITHOUT REINSERTING INTERACTIVE TASK BACK INTO ACTIVE ARRAY 59 FIGURE 37. AVERAGE RESPONSE TIME RATIO VS AVERAGE EXECUTION TIME USING THE WINDOWS SCHEDULER 60 FIGURE 38. AVERAGE RESPONSE TIME RATIO VS AVERAGE EXECUTION TIME USING THE WINDOWS SCHEDULER AND CONSTANT TIMESLICE BOOST FROM THE BALANCE SET MANAGER 62

    [1]. OMNeT++, “Discrete Event Simulation System”, http://www.omnetpp.org/
    [2]. Anoop Gupta, Andrew Tucker, and Shigeru Urushibara. The impact of operating system scheduling policies and synchronization methods on the performance of parallel applications. In SIGMETRICS Conf. Measurement and Modeling of Comput. Syst., pages 120--132, May 1991.
    [3].N. S. Arora, R. D. Blumofe, and C. G. Plaxton, Thread scheduling for multiprogrammed multiprocessors, in ACM Symposium on Parallel Algorithms and Architectures, 1998.
    [4].Mark Crovella, Prakash Das, Czarek Dubnicki, Thomas LeBlanc, and Evangelos Markatos. Multiprogramming on multiprocessors. In Proceedings of the Third IEEE Symposium on Parallel and Distributed Processing, pages 590--597, December 1991.
    [5].N. B. W. Lampson, A Scheduling Philosophy for Multi-Processing
    Systems, Comm. ACM, vol. 11, p. 347-360, May, 1968.
    [6].R.M. Needham and D.F. Hartley. Theory and practice in operating system design, in: Proc. 2nd ACM Symp. on operating system principles, Princeton Univ., Princeton, N.J. (Oct. 20-22 1969) 8-12
    [7]. R. Love. Linux kernel development. SAMS, Developer Library Series, 2003.
    [8]. D. A. Solomon, Inside Windows NT, second edition ISBN 1-57231-677-2
    [9]. The Linux Kernel Achieves, http://www.kernel.org/
    [10].Linux On-line, http://www.linux.org/
    [11].Understanding the Linux 2.6.8.1 CPU Scheduler. By Josh Aas. c 2005 Silicon Graphics, Inc. (SGI). 17th February 2005
    [12]. Edward G. Coffman, Jr. , Peter J. Denning, Operating Systems Theory, Prentice Hall Professional Technical Reference, 1973
    [13.] J. A. Michel , E. G. Coffman, Jr., Synthesis of a Feedback Queueing Discipline for Computer Operation, Journal of the ACM (JACM), v.21 n.2, p.329-339, April 1974
    [14]. Stephen Sherman , Forest Baskett, III , J. C. Browne, Trace-driven modeling and analysis of CPU scheduling in a multiprogramming system, Communications of the ACM, v.15 n.12, p.1063-1069, Dec. 1972
    [15]. David F. Stevens, Operating Systems: On overcoming high-priority paralysis in multiprogramming systems: a case history, Communications of the ACM, v.11 n.8, p.539-541, Aug. 1968
    [16]. RYDER, KD, A heuristic approach to task dispatching. IBM Syst. J. 9, 3 (1970), 189-198
    [17].Bhat, U. Narayan, An Evaluation of CPU Efficiency Under Dynamic Quantum Allocation, Journal of the ACM (JACM) Volume 26 , Issue 4 (October 1979) Pages: 761 - 778
    [18].E. G. Coffman, Jr., Analysis of Two Time-Sharing Algorithms Designed for Limited Swapping, Journal of the ACM (JACM), v.15 n.3, p.341-353, July 1968
    [19]. Leonard Kleinrock, Time-shared Systems: a theoretical treatment, Journal of the ACM (JACM), v.14 n.2, p.242-261, April 1967
    [20]. Don R. Rice, An analytical model for computer system performance evaluation, ACM SIGMETRICS Performance Evaluation Review, Volume 2 ,Issue 2 (June 1973)
    Pages: 14 - 30
    [21]. Lucas, Henry C., Performance Evaluation and Monitoring, ACM Computing Surveys, Vol. 3, No. 3, September 1971, pp. 79-91.
    [22]. Nielson, N.R. An Analysis of Some Time-Sharing Techniques, Communications of the Association for Computing Machinery, Vol. 14, 2 (February, 1971), 79-90.
    [23]. Buzen J.P. and Denning P.J., The Operational Analysis of Queuing Network Models, ACM Computing surveys, 10, 3, Sept. 1978, 225-261

    無法下載圖示 全文公開日期 本全文未授權公開 (校內網路)
    全文公開日期 本全文未授權公開 (校外網路)

    QR CODE