Skip to main content

Scheduling: Non-Preemptive Scheduling

Scheduling:
In multi-programmed computer, multiple processes competing for the CPU at the same time. This situation occurs whenever two or more processes are simultaneously in the ready state. If only one CPU is available. Then we need a system that decide which process run first and then next and this will be done by the scheduler.
Scheduler:
scheduler is an operating system module that she loves an axe top to be admitted into the system and then the next process to run.
Scheduling is of two type:
1) Pre-emptive
2) Non pre-emptive

Non Pre-emptive Scheduling:
In batch non Pre-emptive scheduling implies that, once scheduled, selected job runs to completion.
In other words, the running process not forced to relinquish ownership of the processor when a higher priority process becomes ready for execution.
The scheduling techniques which use non preemptive scheduling are:
1) first come first serve (FCFS) scheduling
2) shortest job next (SJN) scheduling
3) deadline scheduling

 a) First Come First Serve ( FCFS): FCFS schedules the process in such a way, such that the process which requires the right of CPU is located first. There is a simple queue of ready process.

  • It's very simple to implement
  • It's non-discriminatory 
 Disadvantages:
  • The waiting time is often long
  • The system throughput and CPU utilisation is very low
  • No preemption means it does not taken into consideration of process priority and the execution time
  •  It cannot be using time sharing system
Example:

PROCESS

BURST TIME

 

P1

20

P2

07

P3

08

 



The processes P1 P2 P3 aimed in the order P1,P2 and P3. When they served according to FCFS policy, we get the result as shown in Gantt chart:

0                                              20                                           7                                              5

                        P1

 

                            P2

                         P3

0                                                          20              

Waiting for process p1 = 0
Waiting for process P2= 20
Waiting for process P3 = 27

Average waiting time = (0+20+27)/3 = 15.67

b) Shortest Job Next: SJN scheduling, whenever a new job is to be admitted the shortest of the arrived jobs is selected and given the CPU time . Throughput remains the same as in FCFS scheduling but waiting time improves.
Example:
                                                                      

                                        JOB

 

                     CPU BURST TIME

                                         J1

                                   4

                                         J2

                                   6

                                         J3

                                   3

                                         J4

                                   2

                                         J5

                                   7

                                         J6

                                   3

 

Here, note that if two job have same burst time than give priority to job which comes first

Using SJN, scheduling order of this jobs would be:
Job 4, job 3, job 6, job 1, job 2, job 5
 Waiting time for job 1= 8
Waiting time for job 2= 12
Waiting time for job 3= 2
Waiting time for job 4= 0
Waiting time for job 5= 18
Waiting time for job 6= 5

Average waiting time = (45)/6 = 7.5 

Hence it's clearly seen that waiting time for SJN is better than FCFS.

Deadline scheduling:
In deadline scheduling, the job at the earliest deadline is selected for schedule. Deadline of a job is the time limit within which a job must be over.if a job overshoots its deadline, it is said to be deadline over  Deadline over run is calculated as
                                  K=C - D
where K is deadline overrun, C is job completion time and D is deadline for a job.


Comments

  1. Your Affiliate Profit Machine is ready -

    Plus, making money with it is as easy as 1, 2, 3!

    Here is how it all works...

    STEP 1. Tell the system which affiliate products you intend to promote
    STEP 2. Add some push button traffic (it LITERALLY takes JUST 2 minutes)
    STEP 3. See how the system grow your list and sell your affiliate products on it's own!

    Are you ready???

    Get the full details here

    ReplyDelete
  2. Did you know there's a 12 word phrase you can tell your crush... that will induce intense feelings of love and instinctual attractiveness for you buried within his heart?

    Because hidden in these 12 words is a "secret signal" that triggers a man's instinct to love, cherish and look after you with all his heart...

    12 Words Will Trigger A Man's Love Instinct

    This instinct is so built-in to a man's mind that it will make him try better than before to make your relationship as strong as it can be.

    Matter of fact, fueling this dominant instinct is absolutely essential to achieving the best possible relationship with your man that once you send your man one of these "Secret Signals"...

    ...You'll immediately notice him open his heart and soul to you in a way he haven't experienced before and he will recognize you as the one and only woman in the universe who has ever truly attracted him.

    ReplyDelete

Post a Comment

If you find something wrong about this post please let us know. No Abusive Messages please.

Popular posts from this blog

Hub, repeater, switch, router, gateway, bridge

HUB Hub is a controller that controls the traffic on the network.  The following important properties of hub are:  1) It amplify signals. 2) It propagates signals through the network. 3) It does not require filtering. 4) It does not require path determination for switching. 5) It is used as network concentration points. Hubs are basically two types: 1) Active hub 2) Passive hub Active hub: A ctive hub works as repeater which is a hardware device that regenerates the received bit pattern before sending them out . Passive hub : A passive hub is a simple hardware device which provide a simple physical connection between the attached devices. Advantages of hub: It cannot filter the traffic full stop feeling generally refers to a process or device that screens network traffic for certain characteristics such as source address and destination address and protocol. Disadvantages of hub: On a hub, more than one user may try to send data on the netwo...

Data Warehousing

  Data Warehouse is open to an almost limitless range of definitions. Simply put, data warehouses store and aggregation of a company's data. Data warehouses are an important asset for organisations to maintain efficiency, profitability and competitive advantages, organisations collect data through many sources- online, call centre, sales needs, inventory management. The data collected have degrees values and business relevance. Figure shown below shows the architecture of a typical data warehouse and illustrate the gathering of data, the storage of data, and the quaring and data analysis support. Different steps involved in getting data into a warehouse are called as extract, transform and lode or ELT tasks; extraction refers to getting data from the sources, while loaders reference to loading the data into data warehouse. Characteristics of data warehouse: Multidimensional conceptual view Generic dimensionality Unlimited dimensions and aggregation le...