×

Operating System Tutorial

Operating System Practice

Prediction of CPU Burst Time for a Process in SJF by Static Method

In this tutorial, we will learn how to predict of CPU burst time for a process in SJF scheduling by static method? By Monika Jha Last updated : May 08, 2023

In SJF Scheduling, CPU is assigned to the process having the smallest burst time but it can not be implemented practically, because we don't know burst time of the arrived processes in advance.

The predicted burst time of the future process may not always be correct because the burst time of a process also depends on the kind of a process.

There are many methods by which we can predict the burst time for the processes,

  1. Static methods
  2. Dynamic methods

In this tutorial, we will discuss static method.

predict the burst time 1

Prediction of CPU Burst Time for a Process in SJF by Static Method

There are two static factors by we can predict the burst time of processes,

  1. According to process type
  2. According to process size
predict the burst time 2

1. According to process type

In this method, burst time can be predicted according to the type of process,

User Process

The Process which is initiated by the users is referred to as user processes. User processes can be of the following types.

Foreground Process

The processes which are accessed by the user to perform their needs such as MS office, Editors, utility software, calculators, etc are called foreground processes.

These types of processes are a perfect mix of CPU and IO bound processes so they have a bit higher burst time.

Interactive Process

The processes which interact with the user at different time intervals or execution of these processes totally depends on the user inputs are called Interactive Processes. Various games have come in the category of interactive processes.

They don't need a processor for a large amount of time. As a result, the burst time of these processes is low. They are mainly IO bound processes because they mainly depend upon the user's interactivity with the process

Background Process

Some processes support the execution of other processes are known as background processes. These processes work in hidden mode. Just like, the key logger is the process that records the keys pressed by the user and activities of the user on the system. These processes need CPU for a large amount of time that’s why they are CPU bound processes.

Operating System Process

Operating System Processes can be of different types such as schedulers, compilers, program managers and many more other system processes. Burst time of Operating system process is generally lower approximate 3 to 5 units of time.

2. According to process size

In this method, burst time can be predicted according to the size of a process.

Here, the burst time is taken similar to the currently running process and the newly arrived process that is to be executed.

For example, suppose a size currently running process (Pold) is 150 KB and it takes 10 units of time for its execution.

So, the burst time for any newly arrived process of size around 150 KB can be taken as 10 units of time.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.