NON PRE-EMPTIVE SCHEDULING
ALGORITHM
SUBJECT : OPERATING SYSTEM(SEMINAR) GROUP MEMBERS
CLASS : 4IT1 KETAN CHUNARA(53)
KEVAL PARMAR(54)
KHUSHAL PRAJAPATI(55)
OUTLINES
1. SCHEDULING
2. NON PRE EMPTIVE SCHEDULING
3. ADVANTAGES & DISADVANTAGES
4. FIRST COME FIRST SERVE
5. SHORTEST JOB FIRST
6. NON PRE EMPTIVE PRIORITY
7. PREEMPTIVE VS NON PREEMPTIVE
8. CONCLUSION
3
SCHEDULING
 Scheduling is the process of selecting a process from a ready queue. And
allotting cpu to this process for execution.
 Scheduler is a part of operating system that allots computer resources to
the processes.
 Scheduler uses scheduling algorithms to decide which processes it must
allot to the cpu.
4
CONT...
 Scheduling provides
1) better efficiency
2) reduce any kind of delay
3) even waiting time
5
NON PRE EMPTIVE
SCHEDULING
6
NON PRE-EMPTIVE SCHEDULING
 In non pre-emptive scheduling, once a process is selected, it runs to
completion until is blocked for an i/o devices or other events.
 This scheduling does not interrupt a process running CPU in the middle
of the execution.
 It wait till the process completes its CPU burst time, and it can allocate
the CPU to another process.
7
ADVANTAGES OF NON PRE-EMPTIVE SCHEDULING
 It has a minimal scheduling burden.
 It is a very easy procedure.
 Less computational resources are used.
 It has a high throughput rate.
 It is a very simple method.
8
DISADVANTAGES OF NON PRE-EMPTIVE SCHEDULING
 It has poor response time for process.
 A machine can freeze up due to bugs.
 Waiting time is high.
9
TYPES OF NON PRE-
EMPTIVE SCHEDULING
10
FIRST COME FIRST SERVE
1) selection area
 As the name suggests, the FCFS assign the CPU to the process that
arrive first in the ready queue.
 This means that the process that requests the CPU for its execution first
will get the CPU allocated first.
2) decision mode
 Once a process is selected, it run until either it is blocked for an io or
some event or it is terminated
11
CONT...
3) implementation
 This method can be easily implemented by fifo.
 When CPU becomes free, a process from the first position in a queue is
selected to run.
12
EXAMPLE OF FCFS
13
CONT..
 Advantages of FCFS
1) it is a simplest form of scheduling algorithm.
2) its implementations is easy
 Disadvantages of FCFS
1) not efficient because average waiting time is high.
14
SHORTEST JOB FIRST
1) selection area
• The process, that requires shortest time to complete execution, is
served first.
2) decision mode
• Once a process is selected, it run until either it is blocked for io
some other event or it is terminated.
15
3) implementation
 This method can be easily implemented by FIFO.
 All processes in queue are sorted in ascending order based on their required
CPU bursts.
 When CPU becomes free, a process from the first position in a queue is
selected to run.
CONT...
16
EXAMPLE OF SJF
17
CONT..
 Advantages
1) less waiting time.
2) good response for short process.
 Disadvantages
1) it is difficult to estimate time required to complete execution.
2) starvation is possible for long process. Long process may wait forever.
18
NON-PRE-EMPTIVE PRIORITY
1) selection area
 The process, that has highest priority is served first.
2) decision mode
 Once a process is selected, it runs until it blocks for an io or some event or it
terminates.
19
CONT...
3) implementation
 This method can be implemented by using sorted fifo queue.
 All process in queue an sorted based on their priority with highest priority
process at front end.
 When cpu becomes free, a process from the first position in a queue is
selected to run.
20
EXAMPLE OF NON PRE-EMPTIVE
21
CONT...
 Advantages
1) priority is considered so critical process can get even better response time.
 Disadvantages
1) starvation is possible for low priority process. It can be overcome by using
technique called “aging”.
Aging : gradually increases the priority of process that wait in
the system for a long time.
22
DIFFERENCE
PRE-EMPTIVE
 In this resources are allocated to a
process for a limited time.
 Process can be interrupted in
between.
NON-PRE-EMPTIVE
 Once resources are allocated to a
process the process holds it till it
completes its burst time or switches
to waiting state.
 Process can not be interrupted until
it terminates itself or its time is up.
23
CONT...
 It has overheads of scheduling the
process.
 Flexible
 Cost associated
 Cpu utilization is high.
 Waiting time is less.
 Response time is less.
 It does not have overheads.
 Rigid
 No cost associated
 Cpu utilization is low.
 Waiting time is high.
 Response time is high.
24
CONCLUSION
 Non-pre emptive scheduling algorithms offer efficiency, predictability,
fairness, lower overhead, and simplicity, making them suitable for various
computing environments, especially those with stringent timing
requirements or resource limitations.

NON-PREEMPTIVE_SCHEDULING operating system

  • 1.
    NON PRE-EMPTIVE SCHEDULING ALGORITHM SUBJECT: OPERATING SYSTEM(SEMINAR) GROUP MEMBERS CLASS : 4IT1 KETAN CHUNARA(53) KEVAL PARMAR(54) KHUSHAL PRAJAPATI(55)
  • 2.
    OUTLINES 1. SCHEDULING 2. NONPRE EMPTIVE SCHEDULING 3. ADVANTAGES & DISADVANTAGES 4. FIRST COME FIRST SERVE 5. SHORTEST JOB FIRST 6. NON PRE EMPTIVE PRIORITY 7. PREEMPTIVE VS NON PREEMPTIVE 8. CONCLUSION
  • 3.
    3 SCHEDULING  Scheduling isthe process of selecting a process from a ready queue. And allotting cpu to this process for execution.  Scheduler is a part of operating system that allots computer resources to the processes.  Scheduler uses scheduling algorithms to decide which processes it must allot to the cpu.
  • 4.
    4 CONT...  Scheduling provides 1)better efficiency 2) reduce any kind of delay 3) even waiting time
  • 5.
  • 6.
    6 NON PRE-EMPTIVE SCHEDULING In non pre-emptive scheduling, once a process is selected, it runs to completion until is blocked for an i/o devices or other events.  This scheduling does not interrupt a process running CPU in the middle of the execution.  It wait till the process completes its CPU burst time, and it can allocate the CPU to another process.
  • 7.
    7 ADVANTAGES OF NONPRE-EMPTIVE SCHEDULING  It has a minimal scheduling burden.  It is a very easy procedure.  Less computational resources are used.  It has a high throughput rate.  It is a very simple method.
  • 8.
    8 DISADVANTAGES OF NONPRE-EMPTIVE SCHEDULING  It has poor response time for process.  A machine can freeze up due to bugs.  Waiting time is high.
  • 9.
    9 TYPES OF NONPRE- EMPTIVE SCHEDULING
  • 10.
    10 FIRST COME FIRSTSERVE 1) selection area  As the name suggests, the FCFS assign the CPU to the process that arrive first in the ready queue.  This means that the process that requests the CPU for its execution first will get the CPU allocated first. 2) decision mode  Once a process is selected, it run until either it is blocked for an io or some event or it is terminated
  • 11.
    11 CONT... 3) implementation  Thismethod can be easily implemented by fifo.  When CPU becomes free, a process from the first position in a queue is selected to run.
  • 12.
  • 13.
    13 CONT..  Advantages ofFCFS 1) it is a simplest form of scheduling algorithm. 2) its implementations is easy  Disadvantages of FCFS 1) not efficient because average waiting time is high.
  • 14.
    14 SHORTEST JOB FIRST 1)selection area • The process, that requires shortest time to complete execution, is served first. 2) decision mode • Once a process is selected, it run until either it is blocked for io some other event or it is terminated.
  • 15.
    15 3) implementation  Thismethod can be easily implemented by FIFO.  All processes in queue are sorted in ascending order based on their required CPU bursts.  When CPU becomes free, a process from the first position in a queue is selected to run. CONT...
  • 16.
  • 17.
    17 CONT..  Advantages 1) lesswaiting time. 2) good response for short process.  Disadvantages 1) it is difficult to estimate time required to complete execution. 2) starvation is possible for long process. Long process may wait forever.
  • 18.
    18 NON-PRE-EMPTIVE PRIORITY 1) selectionarea  The process, that has highest priority is served first. 2) decision mode  Once a process is selected, it runs until it blocks for an io or some event or it terminates.
  • 19.
    19 CONT... 3) implementation  Thismethod can be implemented by using sorted fifo queue.  All process in queue an sorted based on their priority with highest priority process at front end.  When cpu becomes free, a process from the first position in a queue is selected to run.
  • 20.
    20 EXAMPLE OF NONPRE-EMPTIVE
  • 21.
    21 CONT...  Advantages 1) priorityis considered so critical process can get even better response time.  Disadvantages 1) starvation is possible for low priority process. It can be overcome by using technique called “aging”. Aging : gradually increases the priority of process that wait in the system for a long time.
  • 22.
    22 DIFFERENCE PRE-EMPTIVE  In thisresources are allocated to a process for a limited time.  Process can be interrupted in between. NON-PRE-EMPTIVE  Once resources are allocated to a process the process holds it till it completes its burst time or switches to waiting state.  Process can not be interrupted until it terminates itself or its time is up.
  • 23.
    23 CONT...  It hasoverheads of scheduling the process.  Flexible  Cost associated  Cpu utilization is high.  Waiting time is less.  Response time is less.  It does not have overheads.  Rigid  No cost associated  Cpu utilization is low.  Waiting time is high.  Response time is high.
  • 24.
    24 CONCLUSION  Non-pre emptivescheduling algorithms offer efficiency, predictability, fairness, lower overhead, and simplicity, making them suitable for various computing environments, especially those with stringent timing requirements or resource limitations.