Process vs. Threads
Process vs. Threads Definition and Differences explained To understand the differences between processes and threads, one should know the basics about both of them. What is a process? A process is just the name given to programs that have been loaded into the memory (RAM) for a purpose and managed by the operating system while being executed by the CPU. A program is a set of instructions and a process is the execution of those instructions. If you relate the real life to OS, a process is like “Baking a cake”, and here the program is the “cake recipe”, the input is the cake ingredients and the output is the cake. So a process contains a program, input, output and a state. If the same program is running twice (E.g.: a text editor started twice), they count as 2 processes and the OS shares the code between them. How a process is created? There are 4 ways generally known to create processes. ...