Total execution time of a process consists of CPU time and time for I/O operations. Thus nature of the process either CPU bound or I/O bound.
In some examples may be burst time is divided into CPU time and I/O time.
In the above example burst time divide in practical fashion first burst time for CPU then I/O operations and again next CPU time to complete the operation.
GANTT Chart: (I/O time and CPU time)
Now we calculate Turn Around Time (TAT) and Waiting Time (WT) using the following formula:
TAT = CT – AT and WT = TAT – BT (here BT means only total BT for CPU)
Q. (Assignment)
Three processes arriving at time zero with a total execution time of 10, 20, and 30 units respectively. Each process spends the first 20% of execution time doing I/O, 70% time doing computerization, and last 10% time doing again I/O. Compute % of idle time for SRTF.
Answer: