Waiting time = Turnaround time - completion time
Waiting time is the sum of the periods spent waiting in the ready queue.
Turnaround time = Completion time - (Burst time + I/O burst time)
The interval from the time of submission of a process to the time of completion is the
turnaround time. Turnaround time is the sum of the periods spent waiting
to get into memory, waiting in the ready queue, executing on the CPU, and
Time from the submission of a request until the first response is produced.