Forum Moderators: open
Process
A process is an execution stream in the context of a particular process state.An execution stream is a sequence of instructions.Process state determines the effect of the instructions. It usually includes (but is not restricted to):
Registers
Stack
Memory (global variables and dynamically allocated memory)
Open file tables
Signal management information
Key concept: processes are separated: no process can directly affect the state of another process.
Process is a key OS abstraction that users see - the environment you interact with when you use a computer is built up out of processes.
The shell you type stuff into is a process.
When you execute a program you have just compiled, the OS generates a process to run the program.
Your WWW browser is a process
THREAD
A thread is again an execution stream in the context of a thread state. Key difference between processes and threads is that multiple threads share parts of their state. Typically, allow multiple threads to read and write same memory. (Recall that no processes could directly access memory of another process). But, each thread still has its own registers. Also has its own stack, but other threads can read and write the stack memory.