blob: 78d074e9295774d7002b606e49ffa4a4cf7074ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
---
tags:
- ostep
---
Process = abstraction of **running program**. Program = lifeless code stored on disk.
**Mechanisms** are low-level protocols that implement needed piece of functionality. Example a **context-switch** that enables time-sharing the CPU.
**Policies** are algorithms to make a decision; such as which program to run.
Process = **Machine state**. Important parts of the system. Its address space: the memory allocated by the OS.
The program counter; which instruction is being executed.
Stack & frame pointer: the stack for function params, return addresses and local variables.
Seperating the mechanisms (how) from policies (which) allows changing either seperately from one another.
API:
- Create : create new process to run a program
- Destroy : kil preemptively
- Wait : stop running
- Misc control: e.g suspend/resume
- Status : e.g ps axf
|