1
00:00:00,890 --> 00:00:01,900
Hello, welcome back.

2
00:00:01,910 --> 00:00:05,750
In this lesson, we're going to see how to kill a threat or Terminator threat.

3
00:00:06,320 --> 00:00:09,380
This is a copy of a threat resume project.

4
00:00:09,980 --> 00:00:15,470
So I'm simply going to replace the department that does the.

5
00:00:16,870 --> 00:00:23,230
The part that does the suspension and the resumption, I'm going to just delete that, okay, and then

6
00:00:23,230 --> 00:00:26,470
I'm going to delete this part and that's the resumption as well.

7
00:00:26,950 --> 00:00:27,420
OK.

8
00:00:28,660 --> 00:00:35,700
And then up here, let's see, OK, up here, the global variables we had, I'm going to remove them.

9
00:00:35,710 --> 00:00:39,460
We're going to bring a new set of global variables, OK?

10
00:00:39,730 --> 00:00:47,340
We're going to have execution monitor and then a resume monitor and then if like so we're going to see

11
00:00:47,350 --> 00:00:50,010
red execution monitor, resume monitor.

12
00:00:50,020 --> 00:00:54,210
And then this boolean will tell us what the threat is killed or not.

13
00:00:54,760 --> 00:00:58,450
So this time the execution monitor is like our suspend monitor.

14
00:00:58,460 --> 00:01:04,810
We're going to increment the execution monitor until it hits a particular threshold and then we can

15
00:01:04,810 --> 00:01:07,500
decide to terminate the threat.

16
00:01:08,680 --> 00:01:12,550
So we're going to use blue threat to terminate the red threat.

17
00:01:13,140 --> 00:01:17,230
OK, so I'm going to come over here inside the blue thread.

18
00:01:18,170 --> 00:01:24,230
And I'm going to first start off by incrementing our red execution monitor and then we're going to see

19
00:01:24,230 --> 00:01:31,100
if the execution monitor, let's see, is equal to forty nine, then we want to set our flag cued to

20
00:01:31,100 --> 00:01:31,490
true.

21
00:01:31,730 --> 00:01:37,370
And then we want to reset the execution monitor by setting it back to zero and calling this new API

22
00:01:37,370 --> 00:01:39,860
here called us threat terminate.

23
00:01:40,340 --> 00:01:42,080
This terminates the threat.

24
00:01:42,080 --> 00:01:47,300
It takes one argument and that is the idea of the threat that you wish to terminate.

25
00:01:48,630 --> 00:01:54,140
And what we want to do is we're going to have a controlled experiment to show that this is not the same

26
00:01:54,140 --> 00:01:55,220
US suspend.

27
00:01:55,430 --> 00:01:59,500
We would try to resume this terminated threat and see what happens.

28
00:01:59,960 --> 00:02:06,430
So inside our orange alert controller to ask what I'm going to do is I'm going to check if our cute

29
00:02:06,530 --> 00:02:11,270
flag is set and if it's set, I'm going to try to resume.

30
00:02:11,270 --> 00:02:17,840
It's so over here, we would say if killed sets, we would set our resume.

31
00:02:17,840 --> 00:02:21,020
Plus plus, this is our resume counter that we had before.

32
00:02:21,170 --> 00:02:28,490
And we're going to see if the monitor is, say, equal to 100, then we want to see always threat resume

33
00:02:29,510 --> 00:02:36,440
and then we set the spark to zero and then said this box secured just like we had before, before we

34
00:02:36,440 --> 00:02:37,150
had this on top.

35
00:02:37,160 --> 00:02:40,100
So for me to show you, it's exactly the same.

36
00:02:41,210 --> 00:02:46,130
We said these before actually doing the rounds, before actually doing the resumption.

37
00:02:48,650 --> 00:02:54,710
So this what we had before, but it was suspension, resumption now is termination resumption.

38
00:02:55,180 --> 00:02:56,360
Let's see how that goes.

39
00:02:56,720 --> 00:02:59,330
Going to right click over here to build the project.

40
00:03:05,050 --> 00:03:14,440
It's built successfully, and I'm going to right click over here and I'll say debug system 32.

41
00:03:15,310 --> 00:03:17,020
I select this thirty nine.

42
00:03:19,370 --> 00:03:21,230
And then I say, OK, over here.

43
00:03:28,430 --> 00:03:30,080
And I'll click switch over here.

44
00:03:37,150 --> 00:03:38,410
OK, and then.

45
00:03:39,990 --> 00:03:45,120
I would suspend monitor doesn't exist anymore, I'm just going to take the suspend and resume monitors

46
00:03:45,120 --> 00:03:47,820
out less quick to run and see what we have.

47
00:03:49,010 --> 00:03:52,460
OK, let's see, Red Task is suspended.

48
00:03:53,360 --> 00:03:59,240
It's not coming back, it's a Terminator, sorry, so it's not coming back, although we are trying

49
00:03:59,240 --> 00:04:04,970
to resume it and when we issue other resume Wanita to the watch window, you realize that resume monitor

50
00:04:05,450 --> 00:04:08,450
always crosses its threshold, but nothing happens.

51
00:04:11,100 --> 00:04:18,380
There's the resume monitor, its Richard 100 goes back to zero by Red Task is just terminated.

52
00:04:18,630 --> 00:04:20,650
So that's the difference between resumption.

53
00:04:21,540 --> 00:04:23,880
That's the difference between suspension and termination.

54
00:04:24,510 --> 00:04:25,920
OK, that's all there is.

55
00:04:26,160 --> 00:04:27,090
I'll see you later.

56
00:04:27,120 --> 00:04:27,900
Have a nice day.
