Which scheduler removes processes from main memory when an I/O request occurs?

The Medium-Term Scheduler is responsible for removing processes from main memory and placing them into secondary storage when an I/O request occurs. This process is known as swapping. The medium-term scheduler helps optimize the use of main memory and ensures that CPU utilization remains efficient by managing the processes that are currently not ready for execution.