The process of selecting the next job that will run on the CPU belongs to the
short-term or CPU scheduler. The CPU scheduler can only pick from the jobs that
are already in memory and ready to go. The scheduler works in cooperation with
the interrupt system.
The scheduler assigns the CPU to perform computation on behalf of a particular process or thread within a process.
CPU can be "borrowed" from its current process by an interrupt. It is under
the control of external devices not scheduler. Interrupts can be disabled for a
short time.
When a process or thread requests an I/O transfer, it normally becomes
ineligible to use the CPU until the transfer is complete. This means that the
scheduler will have to choose a new process or a new thread within the same
process to use the CPU.
The process or thread that requested the I/O again becomes eligible to use the
CPU when the I/O transfer is complete.