Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

  • Upload
    shibly

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    1/22

    Simulation-based comparison of scheduling

    techniques in multiprogramming operating

    systems on single and multi-core processors"

    Researchers :- Hala ElAarag, David Bauschlicher, and Steven Bauschilicher

    Presenters:-

    Name Reg.No

    FHA. Shibly MS 13 9047 60

    S.Sajiharan MS 13 9030 84

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    2/22

    In this presentation..

    Introduction

    CPU scheduling Techniques

    Objective

    Methodology

    Metrics & Simulations

    Results

    Conclusion

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    3/22

    Introduction

    CPU Scheduling is an essential component ofmulti-tasked operating systems

    The objective is always to maximize CPU

    utilization and hence increase computerproductivity.

    This paper present three CPU scheduling

    techniques Multilevel Feedback Queue (MLFQ)

    Lottery Scheduling

    Fair Share Scheduling

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    4/22

    Multilevel Feedback Queue (MLFQ)

    MLFQ utilizes multiple queues and allows

    processes to move between queues

    dynamically.

    In this approach, processes "find their own

    level"

    Based on their CPU burst Processes that have

    a larger CPU burst moves to a lower-priority

    queue.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    5/22

    Lottery Scheduling

    In Lottery Scheduling , each process is given somelottery tickets.

    A lottery is held at regular intervals and the winner isdetermined by selecting a ticket at random.

    The winning process gets A process will have a chanceof winning proportionate to the number of tickets ithas.

    To increase the chances of winning, higher priority

    processes can get more tickets. Lottery Scheduling guarantees a non-zero probability

    for any process to get executed and hence solves thestarvation problem to be executed next.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    6/22

    Fair Share Scheduling

    Fair-share scheduling is a scheduling strategy

    for computer operating systems in which

    the CPU usage is equally distributed among

    system users or groups, as opposed to equal

    distribution among processes.

    That mean basic idea of fair share scheduling

    is to divide CPU time evenly among users and

    then among processes.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    7/22

    Objectives

    To find and compare the performance of Fair

    Share Scheduling, Lottery Scheduling and

    Priority Scheduling on single and multi-core

    processors

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    8/22

    Methodology

    Simulation Model

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    9/22

    Performance Metrics and

    Simulation Techniques Waiting time as performance metric.

    The scheduling techniques under investigation were implemented in Javaand run under its virtual machine.

    A process object was created and used for all scheduling techniques.

    Each process object contained the total amount of time a process wouldtake to complete and the amount of CPU time it needed during everyexecution.

    If a process's CPU execution time is low, it is considered an I/O boundprocess because it will quickly be swapped in and out of the CPU. On theother hand, if it is high, it is a CPU bound process and will probably bepreempted before it finishes.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    10/22

    METRICS AND SIMULATION

    There are multiple performance metrics that

    could be used for comparing different

    scheduling algorithms. They include

    Minimize waiting time

    Minimize turnaround time

    Minimize response time

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    11/22

    ResultsEach technique was tested with three different ratios of CPU-boundto IO-bound processes:

    a 25-75 ratio a 50-50 ratio

    a 75-25 ratio

    The specific CPU execution times are chosen at random but on

    average will be around 350 time units for CPU bound processes and50 for I/O-bound processes.

    The specific total time to execute each process is a random numberbetween 1000 and 2000. Processes are all created initially in orderto simulate a relatively standard load that can be comparedbetween all the techniques.

    The average waiting time, which is the amount of time a processspends in the ready queue, for the Lottery, Fair Share and MLFQscheduling techniques.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    12/22

    As shown in the figures, Fair Share Schedulingperformed noticeably better than LotteryScheduling and Priority Scheduling under the

    different loads. Both Lottery and Priority Scheduling processes

    have similar waiting times no matter what theratio of CPU-I/O bound processes is However,

    Priority Scheduling has less waiting time thanLottery Scheduling if there are many more I/Obound processes than CPU bound processes.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    13/22

    RESULTS OF SINGLE CORE

    SIMULATIONS

    Figure 1: Waiting time with process mix 75% I/O bound and 25%CPU bound

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    14/22

    Figure 2: Waiting time with process mix 50% I/O bound and 50% CPU bound

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    15/22

    Figure 3: Waiting time with process mix 25% I/O bound and 75% CPU bound

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    16/22

    RESULTS OF MULTI-CORE

    SIMULATIONSEach scheduling technique was simulated to run 100 processesmultiple times over a different number of processors.

    From Figures 4-6, one can notice that overall, Lottery Schedulingand Priority Scheduling performed better than Fair Share

    Scheduling in all cases, especially when the number of processorsincreased.

    As shown in Figures 4-6, the amount of time saved by using moreprocessors seemed to increase almost linearly for each of the

    scheduling technique, although the MLFQ gained the greatestadvantage by adding more processors.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    17/22

    Figure 4: Waiting time vs. number of cores with process mix 75% I/O bound and 25%

    CPU bound

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    18/22

    Figure 5: Waiting time vs. number of cores with process mix 50% I/O bound and 50% CPUbound

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    19/22

    Figure 6: Waiting time vs. number of cores with process mix 25% I/O bound and 75% CPUbound

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    20/22

    CONCLUSION

    CPU scheduling is the basis of multi-

    programmed operating systems. Multi-core

    processors are becoming standard. In this

    paper, Researchers presented a project thatwas proven to be beneficial for operating

    systems students to not only understand CPU

    scheduling but also study the effect of multi-core processors on different CPU scheduling

    techniques.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    21/22

    Conclusion..

    In single core simulations, Fair Share

    Scheduling performed noticeably better than

    Lottery Scheduling and Priority Scheduling

    under the different loads.

    In multi core simulations, Lottery Scheduling

    and Priority Scheduling performed better than

    Fair Share Scheduling in all cases, especiallywhen the number of processors increased.

  • 7/27/2019 Simulation-Based Comparison of Scheduling Techniques in Multiprogramming

    22/22

    Thanks