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.
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:
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
OS creates only 1 init process (usually) parent process can create a child process results in a tree-like structure and process groups
fork: create new process
exec: execute new process image
exit: cause voluntary process termination
kill: send signal to process (or group)
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