In this video I'll tell you about processes and jobs.
Anything that runs on Linux runs as a process.
And if processes get stalled or are creating trouble in any other way, you need to know a little bit about process management.
First thing to know is that the process has a process id, also known as a pid, and it
can be managed by sending signals to it using the KILL command. Signals are special operating system level instructions.
SIGTERM is a normal signal that instructs a process to stop and Sig kill
or signal 9 is a signal to force a process to stop immediately.
Jobs are user processes that have been started from a specific shell. All processes originate as children from systemd. Let
me make a drawing so that I can explain the relation between the different types of processes on Linux.
Okay, so how are processes created on Linux?
Well, it all starts with the kernel.
The kernel refers to systemd, and systemd is PID number one.
It's top of all processes. It's the start of the process hierarchy.
Now systemd is going to start multiple processes and many of these processes are the services.
These services are also referred to as daemons.
A daemon is daemon, like the HTTPD daemon. That's a service
that is making sure that functionality is provided by your server.
Now, a process by itself is manageable using its pid. Processes might be multi threaded.
And if a process is multi threaded, it can be serviced by multiple CPUs at the same time.
Now, somewhere in the process hierarchy there's also your graphical user interface where you or your
shell. But let's talk about the system that we are using here, where at some point
you'll find gdm, the GNOME display manager. From this GDM you have the GNOME shell.
You might not exactly find it as GNOME shell, but this GNOME shell is a graphical user interface itself.
And in this GNOME shell you start your terminal window,
and in this terminal window you start your shell.
And that is where we are at the location where Bash is used. This is the
location of the individual user if an individual user is going to run any tasks.
These tasks are manageable by the user as jobs. In the next couple
of videos you'll learn how to work with these daemons, processes and jobs.