160 likes | 208 Views
Explore the functioning of processes in operating systems. Learn about resource allocation, protection, and security mechanisms. Dive into process states, components, and control blocks. Discover process scheduling, creation, and execution.
E N D
Processes: Basic Concepts CPE 261403 - Operating Systems
OS Functions (2.1) Resource Allocation Accounting Protection & Security
What happens when a program executes? Example.c void main() { int i=0; i = add (2,3); printf(“%d”,i); } int add(int p1, int p2) { return (p1 + p2); }
Process States Figure 3.2
Components of a Process Figure 3.1
RAM instruction CPU Example.exe Example.exe Hard Drive
What goes where in RAM? void main() { int i=0; i = add (2,3); printf(“%d”,i); } int add(int p1, int p2) { return (p1 + p2); }
Process Control Blocks Figure 3.3
OS RAM Prog1.exe Prog1.exe Prog2.exe Prog2.exe Hard Drive
Context Switching Figure 3.4
Process 1 Process 2 Execution
Process Queues Figure 3.5
Process Scheduling Figure 3.6
Process Creation Figure 3.8