CSE 131 Chapter 2.4:
Document Summary
Multiple processes or threads can be competing for cpu at the same time. Scheduler: part of operating system that makes the choice of which process to run next. Scheduler has to make efficient use of cpu because process switching is expensive. Cpu bound: some processes spend most of their time computing. I/o bound: other processes spend most of their time waiting for i/o. When a new process is created, a decision needs to be made whether to run the parent process or child process. A scheduling decision needs to be made when a process exits - which process is chosen next from the set of ready processes. When a process blocks on i/o, on a semaphore, etc, another process has to be selected to run. When an i/o interrupt occurs, a scheduling decision may be made to decide whether to run the newly ready process, the process that was running at the time of the interrupt or another process.