Process → running program
Low-level Machinery Mechanisms→ low-level method on protocols that implement a needed piece of functionality
Context Switch → gives the OS the ability to stop running a program and start running another on a given CPU
Policies → algorithms for making some kind of decision within the OS (scheduling policies)
PC/IP (Program Counter/Instruction pointer) → Point to the next instruction to be executed
Stack Pointer/Frame Pointer → Manage stack for function parameters, local variables, return address
Time Sharing → Used by the OS to share resources, allowing the resource to be used for a little while by one entity, and then a little while by another
Space Sharing → Resource is divided among those who wish to use it. Disk Space is a shared space; when a block is assigned to a file it is not assigned to another until it is deleted
- The first thing the OS does when running a program is loading its code and static data (initialized variables) into memory, into the address pace of the process
- Modern OS are process lazy, loading pieces of code and data only when they are needed during program execution
- After the loading: -> Some memory must be allocated for the program's run-time stack -> Some memory for the heap -> Some memory for other initialization tasks (like IO, Ex: each process by default has three open file descriptors(std input, output and error)) ->jumps to main -> transfers control of the CPU to newly created process, beginning execution
- C uses the stack for local variables, function parameters, and return addresses