Taxminan 3 soatda bugungi leetcode daily challengeni yechdim.Alhamdulillah.
Program vs Process vs Thread
Program - is an executable file that contains set of instructions.It is stored passively on disk.
Process - When the Program is loaded into the memory and is active, it becomes Process.It will require some resources, such as counter, stack and etc..
Thread - is the smallest unit of execution within a process.One process can have one or more Threads.
e.g. In your laptop, you have Microsoft Word (Program).When you click it, it will be opened (Process).When you are writing on doc (Thread).
Program - is an executable file that contains set of instructions.It is stored passively on disk.
Process - When the Program is loaded into the memory and is active, it becomes Process.It will require some resources, such as counter, stack and etc..
Thread - is the smallest unit of execution within a process.One process can have one or more Threads.
e.g. In your laptop, you have Microsoft Word (Program).When you click it, it will be opened (Process).When you are writing on doc (Thread).