# Processes and Threads: Lifecycle of a Process

## Metadata
- Author: [[codecademy.com]]
- Full Title: Processes and Threads: Lifecycle of a Process
- Category: #articles
- Summary: A process moves through five states: New, Ready, Running, Blocked, and Finished. The OS switches processes between these states so the CPU can work on other tasks while some wait. Switching states (context switching) costs time, so the OS tries to minimize unnecessary switches.
- URL: https://www.codecademy.com/courses/fundamentals-of-operating-systems/lessons/os-processes-and-threads/exercises/lifecycle-of-a-process
## Highlights
-  ([View Highlight](https://read.readwise.io/read/01k6rc18308zfaa9pff4sr6fa6))
- processes are put into one of five states:
• `New`: The program has been started and waits to be added into memory in order to become a full process.
• `Ready`: Process fully initialized, loaded into memory, and waiting to be picked up by the processor.
• `Running`: Currently being executed by the processor.
• `Blocked`: The process requires a contested resource that it must wait for.
• `Finished`: The process has been completed. ([View Highlight](https://read.readwise.io/read/01k6rc1r7saxm79ns17pcmkakf))
- managing the state of processes allows the processor to interleave these tasks and allows multiple processes to best share these cores and other limited computer resources. ([View Highlight](https://read.readwise.io/read/01k6rc386x34yjygq9jdx7yq9r))