Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Computer System Scheduling
WHAT IS SCHEDULING?????
Scheduling is a set of
policies and
mechanisms to control
the order of work to be
performed by the
system.
SCHEDULER AND DISPATCHER
SCHEDULER:                        DISPATCHER:
The part of an operating system   The operating system component
which assigns resources to        which moves one task at a time
processes, or tasks.              from a ready queue to the run state.
                                  The dispatcher is also referred to as
                                  the short term scheduler.
Computer System Scheduling
Fairness: A scheduler makes sure that each process gets
its fair share of the CPU and no process can suffer
indefinite postponement.

Response time: The length of time it takes to react to
a given stimulus or event.

Efficiency:    A level of performance that describes a
process that uses the lowest amount of inputs to create
the greatest amount of outputs.
Turnaround: The process of completing or the time
needed to complete a task, esp. one involving receiving
something, processing it, and sending it.


Throughput: The amount of material or items
passing through a system or process.

Policy Enforcement: The scheduler has to make
sure that system's policy is enforced. For example, if
the local policy is safety then the safety control
processes must be able to run whenever they want to.
Process States
   New                                 Terminated




          Ready              Running




                  Waiting




                  Swapping
Continued….
 New: A file is loaded from storage to memory.
 Ready: Process has been loaded into main
  memory and is awaiting execution on a CPU.
 Running: A process moves into the running
  state when it is chosen for execution.
 Swapping: Moving the process from main
  memory to virtual memory.
 Terminated: Either from the "running" state
  by completing its execution or by explicitly being
  killed.
SCHEDULING LEVELS
LONG TERM SCHEDULER:
The part of an operating system which
places new tasks into the ready state.


SHORT TERM SCHEDULER:
The short-term scheduler, decides which of
the ready in-memory processes are to be
executed next.
It makes decisions more frequently than
long term scheduler
PREEMPTIVE & NONPREEMPTIVE SCHEDULING
PREEMPTIVE SCHEDULING:
Operating system act of interrupting a
running task, removing it from the run
state, and placing it in the ready state.
Modern operating systems are typically
preemptive. In this type of scheduling the
priority of a process is gradually reduced
while it is running.

NON PREEMPTIVE SCHEDULING:
When process gets into CPU, it keeps it until
it goes into Wait or terminates. It allows a
task to remain in the run state until it
voluntarily blocks or completes.
Priority


   Shortest                              Priority
  Remaining                               Aging
    Time




                    Scheduling
                    Algorithms
 Fair
                                               FIFO
Share




                                 Round
              SJF                Robin
Priority……

 Processes scheduling in which
  the scheduler selects tasks to run based on
  their priority.
 A danger of priority scheduling is starvation,
  in which processes with lower priorities are
  not given the opportunity to run.
Types of Priorities
A priority which is not
automatically adjusted by the
system. It can be changed by a
User or Super user.


A priority which is adjusted
automatically by the system
according to task behavior and
system loading. It improves
response time and eliminate
indefinite postponent.
Shortest Remaining Time: A scheduling policy which
  schedules tasks in ascending order of estimated
  remaining processing time.

FIFO (First In First Out): A scheduling policy which
  schedules tasks in the same order in which they enter
  the ready state.

Round Robin: A scheduling policy which scheduleses
  tasks in a fixed circular order. It is used for time
  sharing users.
Priority Aging: A process which dynamically raises the
  priority of a task according to the time it has been
  waiting in the ready queue.

SJF (Shortest Job First): A scheduling policy which
  schedules tasks in ascending order of estimated
  processing time.

Fair Share: A scheduling policy which assigns tasks to
  groups, and allocates a percentage of CPU time to
  each group.
Real Time Scheduling
A system which must respond in real
time to changing conditions. Real
time systems are used for
controlling industrial processes, cars,
robots, and other time critical
applications. They have fixed sets of
tasks. Reliability is also an important
goal for real time systems.
Presentation by: Mubeen Furqan Ahmed

More Related Content

Computer System Scheduling

  • 2. WHAT IS SCHEDULING????? Scheduling is a set of policies and mechanisms to control the order of work to be performed by the system.
  • 3. SCHEDULER AND DISPATCHER SCHEDULER: DISPATCHER: The part of an operating system The operating system component which assigns resources to which moves one task at a time processes, or tasks. from a ready queue to the run state. The dispatcher is also referred to as the short term scheduler.
  • 5. Fairness: A scheduler makes sure that each process gets its fair share of the CPU and no process can suffer indefinite postponement. Response time: The length of time it takes to react to a given stimulus or event. Efficiency: A level of performance that describes a process that uses the lowest amount of inputs to create the greatest amount of outputs.
  • 6. Turnaround: The process of completing or the time needed to complete a task, esp. one involving receiving something, processing it, and sending it. Throughput: The amount of material or items passing through a system or process. Policy Enforcement: The scheduler has to make sure that system's policy is enforced. For example, if the local policy is safety then the safety control processes must be able to run whenever they want to.
  • 7. Process States New Terminated Ready Running Waiting Swapping
  • 8. Continued….  New: A file is loaded from storage to memory.  Ready: Process has been loaded into main memory and is awaiting execution on a CPU.  Running: A process moves into the running state when it is chosen for execution.  Swapping: Moving the process from main memory to virtual memory.  Terminated: Either from the "running" state by completing its execution or by explicitly being killed.
  • 9. SCHEDULING LEVELS LONG TERM SCHEDULER: The part of an operating system which places new tasks into the ready state. SHORT TERM SCHEDULER: The short-term scheduler, decides which of the ready in-memory processes are to be executed next. It makes decisions more frequently than long term scheduler
  • 10. PREEMPTIVE & NONPREEMPTIVE SCHEDULING PREEMPTIVE SCHEDULING: Operating system act of interrupting a running task, removing it from the run state, and placing it in the ready state. Modern operating systems are typically preemptive. In this type of scheduling the priority of a process is gradually reduced while it is running. NON PREEMPTIVE SCHEDULING: When process gets into CPU, it keeps it until it goes into Wait or terminates. It allows a task to remain in the run state until it voluntarily blocks or completes.
  • 11. Priority Shortest Priority Remaining Aging Time Scheduling Algorithms Fair FIFO Share Round SJF Robin
  • 12. Priority……  Processes scheduling in which the scheduler selects tasks to run based on their priority.  A danger of priority scheduling is starvation, in which processes with lower priorities are not given the opportunity to run.
  • 13. Types of Priorities A priority which is not automatically adjusted by the system. It can be changed by a User or Super user. A priority which is adjusted automatically by the system according to task behavior and system loading. It improves response time and eliminate indefinite postponent.
  • 14. Shortest Remaining Time: A scheduling policy which schedules tasks in ascending order of estimated remaining processing time. FIFO (First In First Out): A scheduling policy which schedules tasks in the same order in which they enter the ready state. Round Robin: A scheduling policy which scheduleses tasks in a fixed circular order. It is used for time sharing users.
  • 15. Priority Aging: A process which dynamically raises the priority of a task according to the time it has been waiting in the ready queue. SJF (Shortest Job First): A scheduling policy which schedules tasks in ascending order of estimated processing time. Fair Share: A scheduling policy which assigns tasks to groups, and allocates a percentage of CPU time to each group.
  • 16. Real Time Scheduling A system which must respond in real time to changing conditions. Real time systems are used for controlling industrial processes, cars, robots, and other time critical applications. They have fixed sets of tasks. Reliability is also an important goal for real time systems.
  • 17. Presentation by: Mubeen Furqan Ahmed