> For the complete documentation index, see [llms.txt](https://liuyang89116.gitbook.io/operating-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liuyang89116.gitbook.io/operating-system/chapter_3_processes/32_process_scheduling.md).

# 3.2 Process Scheduling

## Scheduling Queue

![](https://1492199575-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lpv9LvE9HvRZfFprm8G%2F-Lpv9N-nJJPlGgPdEDsP%2F-Lpv9NlNwInXlnpztJno%2Fch3_05.png?generation=1569729389670106\&alt=media)

## Scheduler

* **long-term scheduler** (job scheduler):selects processes from this pool and loads them into memory for execution.
* **short-term scheduler** (CPU scheduler):selects from among the processes that are ready to execute and allocates the CPU to one of them.

## Context Switch

* Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process. This task is known as a **context switch**.&#x20;
