Operating Systems PowerPoint PPT Presentation

presentation player overlay
1 / 13
About This Presentation
Transcript and Presenter's Notes

Title: Operating Systems


1
Operating Systems
  • Scheduling (part 1)
  • Lecture 8

2
Why Multiprogramming
  • OS is a process and must share the CPU with
    application processes
  • Processes need to perform I/O

3
Scheduler Organization
  • Scheduling policy -- when is it time to remove a
    process from the CPU and which process should be
    next allocated
  • Scheduling mechanism -- how the process manager
    knows when to switch running processes and how to
    allocate/deallocate a process from the CPU

4
Scheduling Mechanism
  • Enqueuer
  • Dispatcher
  • Context Switcher

5
(No Transcript)
6
Scheduler Mechanism, cont.
  • Saving Process Contexts
  • Voluntary vs. involuntary sharing
  • Performance issues

7
Scheduling Policy
  • External Priorities
  • Maximum equitability
  • favor short/long running processes
  • resource utilization
  • maximized throughput
  • average/maximum turnaround times
  • maximized system availability

8
Scheduling Policy, cont.
  • Deadlines
  • Response time
  • Fairness
  • Optimal scheduling

9
Notation
  • P Pi 0 lt i lt n -- processes
  • t(Pi) -- how much time a process requires
  • W(Pi) -- how long a process needs to spend before
    its first transition to running
  • S(Pi) running, blocked, ready -- states
  • Ttrnd(Pi) -- turnaround time. Time from when
    process becomes ready until its done

10
Strategy background
  • Throughput rate -- jobs/unit time
  • Response time
  • Batch systems vs. time sharing systems
  • Resources -- involvement of I/O
  • t(pi) t1 d1 t2 d2 tk dk tk1

11
Scheduling Strategies
  • 2 types
  • Non-preemptive -- once a process starts, it isnt
    removed until it finishes or yields the processor
  • preemptive
  • Analysing effectiveness through examining system
    load
  • hypothetical load
  • real load

12
System Load
  • l - mean arrival rate of new processes to the
    ready queue
  • 1/l - mean time between arrivals
  • m - mean service rate
  • 1/m - mean service time of a process
  • Load (fraction of time the CPU is busy
  • R l 1/m l/m
  • If larger than 1, we have a problem

13
Non-preemptive strategies
  • First Come First Served
  • Shortest Job Next
  • Priority Scheduling
Write a Comment
User Comments (0)
About PowerShow.com