Greetings!We have recently published 100+ articles on android tutorials with kotlin and java. If you need, you may visit Android Tutorial for beginners page. You can also check Kotlin Tutorial for beginners. Also, if you are interested in content writing, you can mail us at email@example.com.
Process management is the process where operating system can manage processes, enable processes to share information, allocate resources to process.
What is process?
A process is a program in execution.
When we execute the program, program is loaded from secondary memory to main memory. So, in main memory, program is in execution and becomes a process. Thus, we can say that when program in execution, it is called a process.
There are two types of process.
(1) System process: Processes which are created by operating system and run inside the operating system is called system processes.
2) User process: Processes which are created by user and interacts with the operating system are called user process. Web browser, torrent is example of user processes because these are installed by user.
When program is loaded into the Main Memory, at that time, it will create a structure. That structure is used to call a process.
What does a process look like?
Below picture clearly depicts how a process looks like –
– a.out is an executable code. CPU will take each line from a.out and execute. program is collection of instructions.
– Static and global variable will be throughout the program. It can be accesses by other files also.
– Heap is used for dynamic memory allocation. Using heap, we can allocate space to process during run time.
– Stack is used for static memory allocation. Stack is mainly used for recursive programs. stack contains the data such as local variables, method, return parameters. Without using stack, we are not able to use recursive programs.
– Stack and heap both are in different direction so whichever wants to take more space both can take.
That’s it about introduction to process management. In next section, we will learn about attributes of process, process control block and states of process.