Disclaimer: Please let me know in case some of the portions of the article match your research. I would include the link to your research in the description section of my article.
Description:
The main concern of our paper describes that we are proposing a model for a uniprocessor system for improving CPU scheduling. Our model is implemented at low-level language or assembly language and LINUX is used for the implementation of the model as it is an open-source environment and its kernel is editable.
There are several methods to predict the length of the CPU bursts, such as the exponential averaging method, however, these methods may not give accurate or reliable predicted values. In this paper, we will propose a Machine Learning (ML) based on the best approach to estimate the length of the CPU bursts for processes. We will make use of Bayesian Theory for our model as a classifier tool that will decide which process will execute first in the ready queue. The proposed approach aims to select the most significant attributes of the process using feature selection techniques and then predicts the CPU-burst for the process in the grid. Furthermore, applying attribute selection techniques improves the performance in terms of space, time, and estimation.
2. 3
OPERATING SYSTEM
REPORT TITLE
DESIGNING A MODEL FOR IMPROVING CPU SCHEDULING BY
USING MACHINE LEARNING
Problem Statement
The main concern of our paper describes that we are proposing a model for a uniprocessor system for
improving CPU scheduling. Our model is implemented at low-level language or assembly language and
LINUX is used for the implementation of the model as it is an open-source environment and its kernel is
editable.
There are several methods to predict the length of the CPU-bursts, such as exponential averaging method,
however these methods may not give an accurate or reliable predicted values. In this paper, we will
propose a Machine Learning (ML) based best approach to estimate the length of the CPU-bursts for
processes. We will make use of Bayesian Theory for our model as a classifier tool that will decide which
process will execute first in the ready queue. The proposed approach aims to select the most significant
attributes of the process using feature selection techniques and then predicts the CPU-burst for the process
in the grid. Furthermore, applying attribute selection techniques improves the performance in terms of
space, time and estimation.
Material and Methods
1.Bayesian Decision Theory
The methodology of selecting process which will be first executed on the ready queue involves two
phases. They are comparison of static and dynamic properties of new processes in the queue with the
properties of the dataset of the previously executed process. Data comes from a process that is not
completely known. The dataset is divided into two categories of processes; useful processes and not-
useful processes. The new process will be categorized as either useful or not useful depending on the
results of the comparison of properties. Furthermore, we can find the probability of the new process in the
ready queue to be executed given that the previous process has been executed as:
P(A|B)=P(A∩B)/P(B)
3. 4
=> P(A∩B)=P(A|B).P(B) --------(i)
Also, P(B|A)=P(B∩A)/P(A)
=> P(B∩A)=P(B|A).P(A) ----------(ii)
Since (i) and (ii) are equal. We have,
P(A|B).P(B)=P(B|A).P(A)
In the above formula, A is a new process which is yet to be executed and B is a previous process which
has been executed. The process A is a hypothesis while process B is the evidence or data. In the above
case, we are finding the probability of hypothesis when we have given some evidence or data. By
knowing the probability of a new process occurring we can optimise CPU Scheduling. But if wrong
decision is taken, then there might be losses. A decision rule α(.) takes input x and outputs a decision α(x).
We will usually require that α(.) lies in a class of decision rules A, i.e. α(.) ∈ A. A is sometimes called
the hypothesis class. In Bayes Decision Theory there are usually no restrictions placed on A (i.e. all rules
α(.) are allowed). In Machine Learning, we will usually put restrictions on A to ensure that we have
enough data to learn them. The loss function L(α(x), y) is the cost you pay if you make decision α(x), but
the true state is y.To put everything together, we have :
likelihood function: p(x|y) x ∈ X, y ∈ Y
prior: p(y)
decision rule: α(x) α(x) ∈ Y
loss function: L(α(x), y) cost of making decision α(x) when true state is y.
The risk function combines the loss function, the decision rule, and the probabilities. More precisely, the
risk of a decision rule α(.) is the expected loss L(., .) with respect to the probabilities p(., .). R(α) = X x,y
L(α(x), y)P(x, y) (Note: if x takes continuous values (instead of discrete values) then we replace P x,y by
P y R dx.) According to Bayes Decision Theory one has to pick the decision rule ˆα which minimizes the
risk. αˆ = arg min α∈A R(α), i.e. R(ˆα) ≥ R(α) ∀α ∈ A (set of all decision rules). αˆ is the Bayes
Decision R(ˆα) is the Bayes Risk.
2.Proposed Approach
Our purpose in the proposed model is to reduce the possibility of selecting an inappropriate process that
may increase the waiting time of all other processes waiting for CPU. Furthermore, (throughput) will be
4. 5
decreased on selecting the process which will take maximum time of CPU. Bayesian Decision Theory
(BDT), works on previous knowledge and distribution of the data from which we have to select the
appropriate data item expecting to achieve the target. Our model proposes the data set of 100 execution
instances of five programs: (1) matrix multiplication, (2) quick sort, (3) merges sort, (4) heap sort and (5)
a recursive Fibonacci number generator. The data collection may be performed by saving the process
control blocks of the executed processes. Data of about 100 instances of the five programs is enough and
made into 02 categories; useful and not-useful processes.
Training and Testing methodology: We proposed two types of tests on the training examples with all the
learners described in the section, BDT will be applied as classifier, on the data sets collected in the first
phase.
The tests are:
Use Training Set: The classifier is evaluated on how well it predicts the class of the instance it was trained
on.
Cross-Validation: The classifier can be evaluated by cross-validation, using the number of processes that
are entered in the system. Recognition accuracy can be tested via cross validation.
BASIC APPROACH
1) The programs are run according to different time slices using the scheduler in order to find the best
STS that is the best time slice which will help in giving the minimum turnaround time , that is the
minimum time required to complete the entire process of a CPU Scheduling.
2) Taking the help of basic static and dynamic properties of our process, we fetch the properties to the
BDT(Bayesian Classifier) in order to classify the processes into useful and non useful categories in order
to help us determine which process should be scheduled first.
3) If a new program comes, classify it and run the program with this predicted STS.
4) If the new program instance is not in the knowledge-base, go to step 1.
5) BDT works as effective classifier to classify the process which may or may not be useful process for
the system from both user and system point of view. The BDT is solely based on probabilistic and
statistical data so as a result the ratio of accuracy of selecting the appropriate process may vary from time
to time.
5. 6
A variety of criteria are used in designing the real-time scheduler. Some of these criteria relate to the
behavior of the system as perceived by the individual user (user oriented), while others view the total
effectiveness of the system in meeting the needs of all users (system oriented). Some of the criteria relate
specifically to quantitative measures of performance, while others are more qualitative in nature. From a
user’s point of view, response time is generally the most important characteristic of a system, while from
a system point of view, throughput or processor utilization is important. In this work, BDT works as
effective classifier to classify the process which may or may not be useful process for the system from
both user and system point of view. The BDT is solely based on probabilistic and statistical data so as a
result the ratio of accuracy of selecting the appropriate process may vary from time to time.