1
00:00:00,630 --> 00:00:01,750
Hello, welcome back.

2
00:00:01,770 --> 00:00:08,630
In this lesson, we going to see how to delete a task or in other words, kill a task, right?

3
00:00:08,670 --> 00:00:10,290
I'm going to make a copy of a.

4
00:00:12,770 --> 00:00:17,030
Well, let's see our resume talk project, I'm going to make a copy of this number nine.

5
00:00:17,600 --> 00:00:20,800
Controversy to copy and paste this over here.

6
00:00:22,070 --> 00:00:23,450
I call this number 12.

7
00:00:25,680 --> 00:00:26,670
Children, a task.

8
00:00:36,510 --> 00:00:38,390
And then copy over here.

9
00:00:39,330 --> 00:00:39,730
Right.

10
00:00:40,020 --> 00:00:49,920
So by default, the function for doing things like deleting a task are not enabled by the kernel, so

11
00:00:49,920 --> 00:00:53,100
we need to go to the configuration files to enable those features.

12
00:00:53,760 --> 00:00:59,640
OK, so to go to the configuration file where we would have to do is going to click on Simms's.

13
00:01:00,300 --> 00:01:02,250
I'm going to click on Simms's dot.

14
00:01:03,930 --> 00:01:11,400
One way to do it is to find the free config, each file, and we can do that by going to see him systems

15
00:01:11,430 --> 00:01:18,800
each and then go to free that each and then from free artists each go to free Archos conflict attatched.

16
00:01:19,170 --> 00:01:25,650
Another way is to click free actors to see, followed by here, which is a source for the open free

17
00:01:25,650 --> 00:01:26,490
artist to see.

18
00:01:26,850 --> 00:01:30,990
And in here we find free art or storage, but we do not find conflict.

19
00:01:30,990 --> 00:01:35,160
Orridge So I double click free artists that HLC open declaration.

20
00:01:35,690 --> 00:01:42,390
When we open declaration of this file and scroll down, we have free Arktos conflict each double click

21
00:01:42,390 --> 00:01:44,400
on this and then open declaration.

22
00:01:45,570 --> 00:01:53,750
And this file here gives the configurations of our current system over here config enable FPU.

23
00:01:53,910 --> 00:02:01,020
It says zero meaning we've not enabled FPU here MPU Memory Protection Unit that also says you were meeting

24
00:02:01,020 --> 00:02:01,810
with my neighborhood.

25
00:02:01,810 --> 00:02:06,360
It's static allocation is enabled, dynamic allocation is enabled.

26
00:02:06,720 --> 00:02:09,870
I hook it's not enabled.

27
00:02:10,050 --> 00:02:10,880
Take hook.

28
00:02:10,890 --> 00:02:12,090
It's not enabled.

29
00:02:13,010 --> 00:02:13,720
And see.

30
00:02:15,500 --> 00:02:16,070
Waddell's.

31
00:02:17,230 --> 00:02:21,170
Use mutex is not a neighborhood, it is a neighborhood, OK?

32
00:02:21,570 --> 00:02:23,960
Anywhere you see, zero means it's not a neighborhood.

33
00:02:24,400 --> 00:02:27,130
We came here to see if I want to lead the task.

34
00:02:27,820 --> 00:02:28,650
It's a neighborhood.

35
00:02:29,050 --> 00:02:30,130
So these are the functions.

36
00:02:30,130 --> 00:02:32,920
And neighborhood sets priorities and neighborhood gets priorities.

37
00:02:32,920 --> 00:02:35,620
And Neighborhood Daily Task is actually a neighborhood here.

38
00:02:36,610 --> 00:02:41,350
Task cleanup resource is disabled and all other functions are enabled.

39
00:02:41,530 --> 00:02:44,280
So we can see that the daily task is a neighborhood.

40
00:02:44,500 --> 00:02:49,360
If we change from one to zero over here, we wouldn't be able to use that particular function.

41
00:02:50,290 --> 00:02:50,830
OK.

42
00:02:53,060 --> 00:02:58,170
OK, so let's see how it works, I'm going to come down here, over here.

43
00:02:58,340 --> 00:02:59,740
This is our previous project.

44
00:02:59,750 --> 00:03:01,160
We built a copy of our.

45
00:03:03,000 --> 00:03:05,920
Let's see, let's make sure we are in our project.

46
00:03:05,940 --> 00:03:06,720
No, I live in.

47
00:03:07,650 --> 00:03:09,120
What was the project, no.

48
00:03:15,150 --> 00:03:15,810
Let's see.

49
00:03:18,090 --> 00:03:19,080
Killing the task.

50
00:03:19,530 --> 00:03:21,420
OK, I'm going to rename this the name.

51
00:03:22,440 --> 00:03:25,890
As Retina's 19 is supposed to be 12.

52
00:03:29,340 --> 00:03:30,960
OK, just bear with me.

53
00:03:34,670 --> 00:03:37,100
OK, so I'm going to open the window, see for.

54
00:03:40,920 --> 00:03:48,540
OK, so this is from our Resume Project Resume TASC project, where we suspended Red Read, suspended

55
00:03:48,540 --> 00:03:51,570
itself and then it was resumed by green.

56
00:03:52,320 --> 00:03:56,610
So what we're going to do is we're going to make red kill itself or red delete itself.

57
00:03:56,880 --> 00:03:59,370
I'm still going to keep this resume monitor.

58
00:04:00,520 --> 00:04:03,760
And then I'm going to change the flag here.

59
00:04:06,180 --> 00:04:06,660
From.

60
00:04:07,910 --> 00:04:12,680
The suspended officer is killed and then I'll simply call this.

61
00:04:14,580 --> 00:04:19,860
I could call this execution monitor rather than resume so that it doesn't get confusing.

62
00:04:23,220 --> 00:04:23,800
OK.

63
00:04:24,720 --> 00:04:30,210
Rather than suspend, I change, suspend, monitor to execution monitor, because we're not suspending

64
00:04:30,210 --> 00:04:30,460
here.

65
00:04:30,780 --> 00:04:31,710
So over here.

66
00:04:33,210 --> 00:04:39,060
Red is green to whenever red execute, we bring to increment execution monitor.

67
00:04:40,370 --> 00:04:46,370
And then we're going to see if execution is greater than 50, we're going to set skewed to true.

68
00:04:48,850 --> 00:04:57,280
And then we're going to set the execution one meter to zero and then going, we will call the X. We're

69
00:04:57,280 --> 00:05:04,870
going to call the V task delete function when we personally means delete this same task.

70
00:05:06,710 --> 00:05:07,220
Thank you.

71
00:05:11,990 --> 00:05:13,190
And what we're going to do is.

72
00:05:15,960 --> 00:05:22,410
I'm going to comment on this block in green, remember green control, I was supposed to resume right

73
00:05:22,410 --> 00:05:25,740
after it suspended Green to comment on this.

74
00:05:26,950 --> 00:05:35,620
A highlight this in comments like this, let's build this and see what we have read is going to execute

75
00:05:35,750 --> 00:05:41,050
execution monitor when it's passed is 50 is screen to delete itself.

76
00:05:41,590 --> 00:05:42,670
I'll click here to build.

77
00:05:56,620 --> 00:05:57,280
It's building.

78
00:05:59,270 --> 00:06:02,720
It's been successfully a click here to get onto the board.

79
00:06:04,620 --> 00:06:06,330
I'll see, OK, over here.

80
00:06:13,470 --> 00:06:14,400
Click here to switch.

81
00:06:19,710 --> 00:06:20,270
OK.

82
00:06:22,190 --> 00:06:26,750
So what is of interest is the counter variables of the three tasks.

83
00:06:28,000 --> 00:06:34,930
The profile as Plutarch profile of red and then green, when I click here to run, they are running,

84
00:06:34,930 --> 00:06:36,170
they're all running together.

85
00:06:36,220 --> 00:06:37,290
Let's see what happens.

86
00:06:40,310 --> 00:06:46,430
It would have been good to monitor execution monitor as well to an execution monitor, to live expressionists

87
00:06:47,120 --> 00:06:51,050
in a way, as soon as they hit 50 red stops moving.

88
00:06:51,980 --> 00:06:55,430
And it doesn't move again, Red has, in effect, killed itself.

89
00:06:55,910 --> 00:06:59,510
OK, so let's see, how is this different from suspension?

90
00:07:00,260 --> 00:07:04,940
Well, we're going to attempt to resume, read and see what happens.

91
00:07:05,690 --> 00:07:11,030
I'm going to come over here on comment this block and see over here if Eskild.

92
00:07:13,860 --> 00:07:20,560
If it's killed, then we're going to start running our resume monitor and after that, after resume

93
00:07:20,560 --> 00:07:28,620
monitors greater than 30, we want to resume read this wonderful read and then we're going to set Eskild

94
00:07:28,620 --> 00:07:30,360
back to force, just like we did.

95
00:07:30,360 --> 00:07:31,500
Four is suspend

96
00:07:34,650 --> 00:07:35,790
so quickly to build.

97
00:07:38,200 --> 00:07:40,930
It's built successfully a click here to get onto the boat.

98
00:07:46,200 --> 00:07:47,130
Click here to switch.

99
00:07:50,910 --> 00:07:53,280
What I'm going to do is I'm going to add Eskild.

100
00:07:55,090 --> 00:08:00,850
Oh, execution Wanita sorry, I'm going to add execution monitor to live expressions, I'll copy this.

101
00:08:01,260 --> 00:08:05,050
I'm going to remove this one here knownas or spend money to.

102
00:08:06,340 --> 00:08:08,620
OK, so now let's run this and see.

103
00:08:10,220 --> 00:08:16,700
As you can see, incrementing, execute and monitor, execution monitors incrementing as well, execution

104
00:08:16,700 --> 00:08:19,670
monitor, as soon as it hits 50 read is going to be killed.

105
00:08:21,420 --> 00:08:27,690
It's hits 15 already frozen now resume monitor, as soon as it hits 30 would attempt to resume, right,

106
00:08:28,170 --> 00:08:29,240
but it hits 30.

107
00:08:29,250 --> 00:08:30,110
Nothing happened.

108
00:08:30,130 --> 00:08:31,270
Read wasn't resumed.

109
00:08:31,860 --> 00:08:34,470
So Red was, in effect, deleted.

110
00:08:34,530 --> 00:08:36,780
This is different from suspending it.

111
00:08:37,620 --> 00:08:40,260
OK, so this all the risk for this lesson?

112
00:08:40,260 --> 00:08:44,620
If you have any questions, leave them in the questions and also area, you know, see you later.

113
00:08:44,620 --> 00:08:44,820
Have.
