1
00:00:06,540 --> 00:00:08,970
In this video I'll tell
you about processes and jobs.

2
00:00:10,230 --> 00:00:12,509
Anything that runs on
Linux runs as a process.

3
00:00:13,429 --> 00:00:19,649
And if processes get stalled or are creating trouble in any
other way, you need to know a little bit about process management.

4
00:00:21,089 --> 00:00:27,005
First thing to know is that the process has
a process id, also known as a pid, and it

5
00:00:27,005 --> 00:00:32,920
can be managed by sending signals to it using
the KILL command. Signals are special operating system level instructions.

6
00:00:33,960 --> 00:00:38,515
SIGTERM is a normal signal that instructs
a process to stop and Sig kill

7
00:00:38,515 --> 00:00:43,070
or signal 9 is a signal
to force a process to stop immediately.

8
00:00:43,710 --> 00:00:50,155
Jobs are user processes that have been started from a
specific shell. All processes originate as children from systemd. Let

9
00:00:50,155 --> 00:00:56,600
me make a drawing so that I can explain
the relation between the different types of processes on Linux.

10
00:00:57,869 --> 00:01:00,219
Okay, so how are
processes created on Linux?

11
00:01:00,859 --> 00:01:02,149
Well, it all
starts with the kernel.

12
00:01:04,049 --> 00:01:10,010
The kernel refers to systemd,
and systemd is PID number one.

13
00:01:10,870 --> 00:01:14,040
It's top of all processes. It's
the start of the process hierarchy.

14
00:01:14,719 --> 00:01:21,129
Now systemd is going to start multiple processes
and many of these processes are the services.

15
00:01:21,810 --> 00:01:24,329
These services are also
referred to as daemons.

16
00:01:26,109 --> 00:01:30,530
A daemon is daemon, like
the HTTPD daemon. That's a service

17
00:01:30,530 --> 00:01:34,950
that is making sure that
functionality is provided by your server.

18
00:01:35,829 --> 00:01:42,120
Now, a process by itself is manageable
using its pid. Processes might be multi threaded.

19
00:01:42,819 --> 00:01:47,849
And if a process is multi threaded, it can
be serviced by multiple CPUs at the same time.

20
00:01:48,969 --> 00:01:54,700
Now, somewhere in the process hierarchy there's also
your graphical user interface where you or your

21
00:01:54,700 --> 00:02:00,430
shell. But let's talk about the system that
we are using here, where at some point

22
00:02:00,429 --> 00:02:06,159
you'll find gdm, the GNOME display manager.
From this GDM you have the GNOME shell.

23
00:02:09,159 --> 00:02:14,389
You might not exactly find it as GNOME shell,
but this GNOME shell is a graphical user interface itself.

24
00:02:14,949 --> 00:02:19,214
And in this GNOME shell
you start your terminal window,

25
00:02:19,214 --> 00:02:23,479
and in this terminal
window you start your shell.

26
00:02:24,620 --> 00:02:29,480
And that is where we are at the
location where Bash is used. This is the

27
00:02:29,480 --> 00:02:34,340
location of the individual user if an
individual user is going to run any tasks.

28
00:02:35,009 --> 00:02:39,199
These tasks are manageable by the
user as jobs. In the next couple

29
00:02:39,199 --> 00:02:43,389
of videos you'll learn how to
work with these daemons, processes and jobs.
