basic concept
Various times related to the process
Time of arrival
The time the process enters the ready queue is called the arrival time.
Burst time
The total time required for the CPU to execute the entire process is called the burst time. This does not include waiting time.
Complete time
The time when the process enters the completion state or the time when the process completes its execution is called the completion time.
Turnaround time
The total amount of time the process takes from arrival to completion is called turnaround time.
waiting time
The total time a process waits for CPU allocation is called wait time.
Response time
The difference between the arrival time and the time when the process first acquires the CPU is called the response time.
Time calculation
CPU scheduling
In a multi-program system, the operating system schedules processes on the CPU to obtain maximum utilization. This process is called CPU scheduling.
Context switch
Whenever a running process requests an I/O operation, the short-term scheduler saves the current context of the process (also known as PCB) and changes its state from the running state to the waiting state. During this period, the process is in a waiting state; the short-term scheduler selects another process from the ready queue and allocates CPU to this process. This process is called context switching.
The operating system has three main methods for controlling hardware devices: Programmable I/O (PIO), Interrupt-driven I/O, and Direct Memory Access (DMA, Direct Memory Access) .
Reference:
Operating System Tutorial : https://www.yiibai.com/os/