> 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/summary_ch3.md).

# Summary ch3

1. **Process Concept:** &#x20;

   (1)The program code, also called **text section** &#x20;

   (2)Current activity context including **program counter**, processor registers &#x20;

   (3)**Stack** containing temporary data &#x20;

   (4)**Data section** containing global variables &#x20;

   (5)**Heap** containing memory dynamically allocated during run time &#x20;
2. **Process state:** &#x20;

   (1)**new**: The process is being created &#x20;

   (2)**running**: Instructions are being executed  &#x20;

   (3)**waiting**:  The process is waiting for some event to occur  &#x20;

   (4)**ready**:  The process is waiting to be assigned to a processor &#x20;

   (5)**terminated**:  The process has finished execution
3. **Process Control Block (PCB):** &#x20;

   (1)Each process is represented by a PCB &#x20;

   (2)Created and managed by the operating system &#x20;

   (3)Contains the process elements &#x20;
4. **When to switch process:** &#x20;

   (1)Clock interrupt &#x20;

   (2)I/O interrupt &#x20;

   (3)Memory fault &#x20;

   (4)Trap &#x20;

   (5)System call
5. **Context switch:** When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch
6. **interprocess communication (IPC)** &#x20;

   (1)Shared memory &#x20;

   (2)Message passing
