😊

Process Scheduling and Response Times: What is the difference?

2022/03/28に公開約5,400字

Process scheduling time can be tripatiated into three branches of process scheduling subsystems where they can have their dependency on the algorithms used into those subsystems and process response time is the duration from the process got submitted for execution until the first response got produced as a part of this execution.

Scope:

  1. In this article, we will discuss process scheduling times along with brief knowledge of process scheduling subsystems and respective algorithms.
  2. We will also discuss process response time and how it is different for multiple algorithms.

Process Scheduling Times:

In an operating system that has the feature of multitasking then it has three process scheduling subsystems at different levels in the life cycle of process execution. These subsystems might be termed as “Long Term Scheduling”,” Short Term Scheduling” and “Medium-Term Scheduling”.

In Long Term Scheduling, Processes are moved from New to Ready states. In layman’s terms, we can say that whenever a new process is created and queued up into the pool then the main task of the long-term scheduler is to maximize the degree of multiprogramming by moving processes to main memory. So process scheduling time in a long-term scheduler is extremely dependent on the algorithm used in this process. In the First Come First Serve, algorithm process scheduling time depends upon the number of processes in the main memory. In the worst case if the main memory is full then process scheduling time using FCFS can be increased until one of the processes moves from main memory to CPU and some space becomes vacant. On the other hand In Priority schemes, process scheduling time depends on the priority of the process. If it has high priority then it must have low process scheduling time compared to other processes.

In Medium-Term Scheduling, There are two adjacent states of the process for two main states. In technical terms the waiting state has a waiting suspend state and on the other hand, the ready state has a ready suspend state. There are two possible scenarios like whenever there is no vacancy in waiting for state and there is one process which is coming to waiting for state and second are whenever there is no vacancy in the ready state but there is the process with more priority which wants to load in the ready state In such conditions Medium Term Scheduler swaps out some victim processes from waiting and ready state to waiting suspend and ready suspend states mean moving victim process from main memory to secondary memory and those process gets called when there is unoccupied space in main memory. In the medium-term scheduling process scheduling time highly depends on the performance of swap-in and swap out the process from main to secondary memory and vice-versa.

In Short Term Scheduling, The main motive of the operating system is to move the processes which are in the ready state to the CPU. Its main task is to improve CPU utilization by keeping it busy for the maximum amount of time and reducing starvation of other tasks which are still present in the ready state. Here also process scheduling time highly depends on the algorithms which the operating system is using for short-term scheduling. In the FCFS strategy process scheduling time for any process in the most alarming case is at least the execution time of processes that came into the ready state before the current process. In round-robin algorithms, each process can have almost the same average time for process scheduling. We can see In the Shortest Job First algorithm process scheduling time for any process can exceed up to execution time of all processes which have less execution time than the current process. You can visit this link to leran more about process scheduling in OS

https://www.scaler.com/topics/operating-system/process-scheduling/

Process Response Time:

Response time of the process is the turnaround time from the submission of process execution until as a user or operating system we receive at least the first piece of output or whole output. In the worst-case also process response time is not expected more than a few seconds in modern operating systems. Response time of the process is the term that can be majorly used in the Short Term Scheduling of processes for different algorithms.

If we consider multiple algorithms for short-term scheduling of processes then “First Come First Serve” may result in high response time. On the flip side, the “Round-robin” and “Shortest Job First” algorithms can give great response time for short processes.

Summary:

  1. Process scheduling time is the duration in which a process is scheduled from one state to another state in the process life cycle.
  2. This can be not identical for multiple types of process schedulers like Long, Medium and short-term schedulers.
  3. Process response time is the period from the submission of a process to execution until response begins to be received from process execution.

Author Bio:
Akash Pawar is a software engineer and has a passion to write technical blogs with expertise in Data Structures and Algorithms, Operating systems and has exposure to large-scale System Designs.

Discussion

ログインするとコメントできます