Operating Systems

Table of Contents

Process model

process: program in execution (amount of processes depends on the program)

it’s an abstraction that allows OS to simplify resource allocation, accounting, and limiting.

Process table

OS maintains info on resources and internal state of every process

information in Process Table: ID (PID), User (UID), Group (GID), memory address space, hw registers, open files, signals, etc.

process control blocks:

screenshot.png

Concurrent processes

in principle, multiple processes are mutually independent (they have nothing at all in common). need explicit means to interact with each other.

the CPU gets allocated to each process in turn

OS (normally) offers no timing or ordering guarantees

Process hierarchies

OS creates only 1 init process (usually) parent process can create a child process results in a tree-like structure and process groups

Process management

fork: create new process

exec: execute new process image

exit: cause voluntary process termination

kill: send signal to process (or group)

Process states

OS allocates resources to processes three process states:

scheduler allocates/deallocates the CPU. there is no immediate transition between states because process has to wait for scheduler

Scheduler vs processes