<aside> ℹ️ Definition: Mechanisms that change the normal flow of program execution
Transfer of control to OS kernel due to an event
Exception number used as index into exception table

| Type | Reason | Async/Sync | Return Action | Examples |
|---|---|---|---|---|
| Interrupt | External I/O device signal | Async | Return to $I_\text{next}$ | Ctrl-C (I/O interrupt) |
| Trap | Intentional | Sync | Return to $I_\text{next}$ | Syscall, breakpoints |
| Fault | Potentially recoverable errors | Sync | May Return to $I_\text{next}$ | Page Fault |
| Abort | Unrecoverable errors | Sync | Won’t return | Parity errors |
| Unique ID Number | Name | Description |
|---|---|---|
| 0 | read |
Read File |
| 1 | write |
Write File |
| 2 | open |
Open File |
| 3 | close |
Close File |
| 4 | Stat |
Get info about file |
| 57 | fork |
Create process (clone of all instructions below fork()) |
| 59 | execve |
Execute a program |
| 60 | _exit |
Terminate process |
| 62 | kill |
Send signal to process |
Understanding fork()
fork()<aside> ℹ️ Basics