WEBVTT

00:05.250 --> 00:10.200
So, guys, now let us try to understand the nature of Netlink communication.

00:10.440 --> 00:16.890
So from Netlink flags which we discussed in the previous lecture video, you should get an idea that

00:16.890 --> 00:25.530
Netlink based communication user space application is generally the requester that is the master who

00:25.530 --> 00:27.360
is placing an order.

00:27.360 --> 00:28.140
Right?

00:28.140 --> 00:35.550
And kernel space is generally the request entertainer that is the kernel space acts as a slave to the

00:35.550 --> 00:40.500
user space who acts on applications, order or request.

00:40.500 --> 00:41.220
Right.

00:41.430 --> 00:47.520
So most of the time it is user space application which initiate the communication with the kernel space

00:47.520 --> 00:50.070
and places the order, right?

00:50.070 --> 00:59.040
So user space application acts as a master, whereas your Linux kernel module acts as a slave, right?

01:00.430 --> 01:07.120
However, in case of event based notification, it is kernel which initiate the communication with the

01:07.120 --> 01:08.620
userspace application.

01:08.680 --> 01:12.340
So let us try to understand this with the help of an example.

01:12.880 --> 01:20.080
Let us suppose that your Linux kernel module, which is a routing table manager, maintains a routing

01:20.110 --> 01:27.110
table in which there are three entries, let us say entry R1 and three R2 and entry R3.

01:27.130 --> 01:33.250
So these three are the entries of the routing table present in the Linux kernel space.

01:33.340 --> 01:39.520
Now let us suppose the process P two and process P three, which are running in the user space, are

01:39.520 --> 01:43.350
interested in the entry number R3, Right.

01:43.360 --> 01:51.460
And suppose in the kernel space we have triggered the timer that after 10s the entry R3 will going to

01:51.460 --> 01:52.390
be deleted.

01:52.840 --> 02:00.620
Now the process P2 and P3 has placed the request that whenever the entry R3 gets deleted, the process,

02:00.650 --> 02:06.540
P2 and P3 both want to be notified from the kernel space of such deletion.

02:06.560 --> 02:14.720
So after the 10s has been elapsed, it is the responsibility of your Linux kernel module to delete the

02:14.750 --> 02:22.250
entry R3 and also notify the interested process, P2 and P3 about the event.

02:22.280 --> 02:26.120
So this example illustrates the event based notification.

02:26.120 --> 02:33.170
That is, some event happens in the kernel space and the interested processes running in the user space

02:33.170 --> 02:36.080
needs to be notified of that event.

02:36.110 --> 02:42.180
We will going to cover event based notification in the last section of this course more elaborately.

02:42.200 --> 02:47.360
This is just one example to explain what is event based notification.
