homework 3 PATIENCE FERO 2019529628044 Version 0 | |
👤 Author: by feropatienceoutlookcom 2021-12-28 09:24:20 |
Every process in a computer system requires some amount of time for its execution. This time is both the CPU time and the I/O time. The CPU time is the time taken by CPU to execute the process. While the I/O time is the time taken by the process to perform some I/O operation. In general, we ignore the I/O time and we consider only the CPU time for a process. So, Burst time is the total time taken by the process for its execution on the CPU.
Arrival time is the time when a process enters into the ready state and is ready for its execution.
Here in the above example, the arrival time of all the 3 processes are 0 ms, 1 ms, and 2 ms respectively.
Exit time is the time when a process completes its execution and exit from the system.
Response time is the time spent when the process is in the ready state and gets the CPU for the first time. For example, here we are using the First Come First Serve CPU scheduling algorithm for the below 3 processes:
Here, the response time of all the 3 processes are:
Response time = Time at which the process gets the CPU for the first time - Arrival time
Waiting time is the total time spent by the process in the ready state waiting for CPU. For example, consider the arrival time of all the below 3 processes to be 0 ms, 0 ms, and 2 ms and we are using the First Come First Serve scheduling algorithm.
Then the waiting time for all the 3 processes will be:
Waiting time = Turnaround time - Burst time
In the above example, the processes have to wait only once. But in many other scheduling algorithms, the CPU may be allocated to the process for some time and then the process will be moved to the waiting state and again after some time, the process will get the CPU and so on.
Please login to reply. Login