1.What's cpu schedule criteria?
Different CPU scheduling algorithms have different properties and the choice of a particular algorithm depends on the various factors. Many criteria have been suggested for comparing CPU scheduling algorithms.
The criteria include the following:
- CPU utilisation
The main objective of any CPU scheduling algorithm is to keep the CPU as busy as possible. Theoretically, CPU utilisation can range from 0 to 100 but in a real-time system, it varies from 40 to 90 percent depending on the load upon the system.
- Throughput
A measure of the work done by CPU is the number of processes being executed and completed per unit time. This is called throughput. The throughput may vary depending upon the length or duration of processes.
- Turnaround time
For a particular process, an important criteria is how long it takes to execute that process. The time elapsed from the time of submission of a process to the time of completion is known as the turnaround time. Turn-around time is the sum of times spent waiting to get into memory, waiting in ready queue, executing in CPU, and waiting for I/O.
- Waiting time
A scheduling algorithm does not affect the time required to complete the process once it starts execution. It only affects the waiting time of a process i.e. time spent by a process waiting in the ready queue.
- Response time
In an interactive system, turn-around time is not the best criteria. A process may produce some output fairly early and continue computing new results while previous results are being output to the user. Thus another criteria is the time taken from submission of the process of request until the first response is produced. This measure is called response time.
2.what are cpu burst time and I/O burst time?
CPU Burst : It is the amount of time required by a process or can be said the amount of time required by the process to finish. We can not estimate the time taken by the process before running it. So most of the problem is related to the burst time.
Burst Time= Turn around Time(Completion Time)-Waiting Time. This is the time that a process spends on the cpu executing some code. CPU Burst deals with the RUNNING state of the process.
I/O Burst : While the process is in the running state, it may ask for i/o , thus the process goes to the block or wait state, where the i/o will be processed and then it will be sent back to the ready state. This is the time that a process spends in waiting for the completion of the I/O request. I/O Burst deals with the WAITING STATE of the process.