- A
Processis simply a running program- When you run a program, it receives the resources (memory) needed for execution from the OS and becomes a
process - In other words, a
processrefers to a running program that has been loaded from Disk into memory and can receive CPU allocation.
- When you run a program, it receives the resources (memory) needed for execution from the OS and becomes a
- A
Processconsists of an address space, files, memory, and other resources needed to run the program, as well asthreads,- and the
threadis what actually performs the work using theProcess's resources
- and the
- A
Processincludes a process stack that holds temporary data such as function parameters, return addresses, and local variables, as well as a data section that stores global variables- Additionally, a
processincludes a Heap, which is dynamically allocated memory during execution
- Additionally, a
- Every
processhas at least onethread, and aprocesswith two or morethreadsis called a multi-threaded process- Tip) It is easy to understand if you think of a Thread as a worker in a workspace (factory) called a process!
- There is no limit to the number of
threadsa singleprocesscan have, but since eachthreadrequires its own memory space (call stack) to perform work, the number ofthreadsthat can be created is determined by theprocess's memory limit