Recent Posts

ads

Process States







What are the process states in Linux?



The following are the process states:

1. Running: This is a state where a process is either in running or ready to run.
2. Interruptible: This state is a blocked state of a process which waits for an event or a signal from another process
3. Uninterruptible: It is also a blocked state. The process is forced to halt for certain condition that a hardware status has waited and a signal could not be handled.
4. Stopped: Once the process is completed, this state occurs. This process can be restarted
5. Zombie: In this state, the process will be terminated and the information will still be available in the process table.

What is a zombie?

Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table. Since this process is not alive, it cannot react to signals. Zombie state can finish when the parent dies. All resources of the zombie state process are cleared by the kernel


Check with the command top the different process states






you go to top command to check the running process and the memory they take


This is with top command




This will be with htop command, and wee see more details, a nicer interface to manage processes and we can choose an Function key option as well or we can highlight a specific process





As you could see we can highlight the process and  adjust the priority with the F7 ad F8 key (+ or - )


Now we will press F9  and this will be the result

And we want to kill a process , for example Firefox (we checked the process ID PID )




You can close it nicely with F15 , the default one, or you can close it immediately with F9 in a hard way




We can run the Nice command to establish the priority of certain process



This is an example of how to use it. The higher the number, the lower the priority. In this case, very low priority

Linux priority goes for -20 to 19




Now check this example:
 I this case it will run with an extra high priority, and your computer will feel that it slow down because all CPU power goes basically to this task.



We can use 15 for a process that is not time critical like backups. You don't use it with customer related issues. In other words, you use it when you want to be nice with other processes
😁


For example, here we can see here a process with a higher priority than the rest of the process -11. The rest has priority "0" the default one.
We need to identify it when we are monitoring the process in your computer



We can also renice a specific  process,  how nice it will be with the other process from the default value that is "0"




I hope this lesson was useful. If it was, please click like, and enjoy the next lesson
😄
Process States Process States Reviewed by ohhhvictor on October 31, 2018 Rating: 5

No comments:

Facebook

ads
Powered by Blogger.