1
00:00:01,480 --> 00:00:01,900
Hello.

2
00:00:03,000 --> 00:00:11,120
Welcome back and a lesson we go in to see how to achieve time slice and using our Vitalis daily function,

3
00:00:11,610 --> 00:00:17,580
we've seen the effect that our program has when we disable time slicing.

4
00:00:18,090 --> 00:00:23,340
OK, I'm going to close all of this and then I'm going to make a copy of our last project.

5
00:00:24,210 --> 00:00:27,450
I'll copy this and then I'll paste over here.

6
00:00:28,410 --> 00:00:32,550
I'll call this pseudo time slicing, OK?

7
00:00:43,640 --> 00:00:44,060
Yeah.

8
00:00:52,650 --> 00:00:59,100
OK, so we're going to open this and everything remains the same.

9
00:00:59,460 --> 00:01:05,280
We're not going to change any of our schedule or configuration, but to make use of all four of the

10
00:01:05,280 --> 00:01:10,140
tasks or four tasks here, I'm going to give all of them the same priority.

11
00:01:12,040 --> 00:01:13,890
OK, they all have the same priority.

12
00:01:14,410 --> 00:01:14,850
OK.

13
00:01:17,160 --> 00:01:24,100
And let's go to actually our schedule as we left it, with time slicing enabled.

14
00:01:24,120 --> 00:01:25,750
So let's go back and disable it.

15
00:01:26,130 --> 00:01:31,890
I'm going to go to include food are free config Dorridge and time slice in here.

16
00:01:31,900 --> 00:01:33,330
I'm going to set it to zero.

17
00:01:36,440 --> 00:01:42,830
Control is to safe and we know what would happen, what would happen is if we run this only the orange

18
00:01:42,830 --> 00:01:46,470
alert, the controller would have the process or let's verify that.

19
00:01:47,010 --> 00:01:48,020
I'll click here to build.

20
00:01:53,360 --> 00:01:54,020
It's biotin.

21
00:02:01,660 --> 00:02:08,320
It's still building, OK, it's done now, and I'm going to right click over here.

22
00:02:11,250 --> 00:02:13,380
And I'm going to say you book us.

23
00:02:14,320 --> 00:02:16,660
SDM to Coatex and.

24
00:02:20,330 --> 00:02:23,510
Selects the latest one, 32 over here.

25
00:02:31,850 --> 00:02:32,200
OK.

26
00:02:32,640 --> 00:02:33,790
OK, over here.

27
00:02:40,530 --> 00:02:41,850
Click switch over here.

28
00:02:44,220 --> 00:02:47,140
OK, and then I'm going to click to run, you know.

29
00:02:47,150 --> 00:02:54,270
You can see we have just the orange task running, of course, with disabled time slicing and all the

30
00:02:54,270 --> 00:02:56,040
tasks have the same priority.

31
00:02:56,070 --> 00:02:59,790
And because orange was created first, then that is the only one running.

32
00:02:59,890 --> 00:03:04,710
OK, still time slicing is disabled, but we go into.

33
00:03:05,780 --> 00:03:08,820
Let's define a delay amount, 50 milliseconds.

34
00:03:08,840 --> 00:03:17,330
I'm going to define a global variable here called underscore VMS 50 50 Ms.

35
00:03:17,900 --> 00:03:21,710
And this is basically passing 50 to Purdum's to Tick's.

36
00:03:22,040 --> 00:03:25,580
So this will give us the equivalent value in ticks and it in this variable.

37
00:03:25,820 --> 00:03:28,790
This is a bad name for a variable, but I'll just keep it.

38
00:03:29,450 --> 00:03:37,820
OK, so now I'm going to let each task go to the blocked stage or delay for this amount so the task

39
00:03:37,820 --> 00:03:39,370
functions over here.

40
00:03:39,860 --> 00:03:41,060
I'm going to add this.

41
00:03:42,560 --> 00:03:52,160
So this one go for TM's like this one, also this and this so quickly to build.

42
00:03:55,740 --> 00:03:59,940
It's built successfully and then we click over here to go to the Dibakar.

43
00:04:04,000 --> 00:04:04,750
It's open in.

44
00:04:05,900 --> 00:04:06,680
Click the switch.

45
00:04:10,180 --> 00:04:12,140
And then we click here to run.

46
00:04:13,730 --> 00:04:22,820
So we see all of them running now because the tasks go to sleep or do timesharing is disabled, it's

47
00:04:22,820 --> 00:04:30,110
as if there is there is a moment that the tasks all three, there's a moment that three tasks are you

48
00:04:30,110 --> 00:04:32,990
sleep and one can have charge to run.

49
00:04:33,510 --> 00:04:38,900
So there is a moment that three will be sleeping and then one will have the chance to run, although

50
00:04:38,900 --> 00:04:39,800
blue has stopped.

51
00:04:39,830 --> 00:04:43,550
OK, blue is getting some time, although this is not perfect time.

52
00:04:43,600 --> 00:04:44,710
So they're not running.

53
00:04:44,750 --> 00:04:49,850
We're not saying they are running for equal amount of time, but what is happening is they are all running

54
00:04:50,240 --> 00:04:50,690
right.

55
00:04:50,810 --> 00:04:53,420
And this happens because there is a window.

56
00:04:53,750 --> 00:04:55,410
All of them go to sleep for 50 five.

57
00:04:56,180 --> 00:05:02,320
So it could be that you find three of them sleeping and then one of them gets time to run and then a

58
00:05:02,330 --> 00:05:05,180
separate three goes to sleep and then one runs.

59
00:05:05,450 --> 00:05:07,970
So this is what I personally called a pseudo time.

60
00:05:08,990 --> 00:05:09,890
Time slicing.

61
00:05:10,580 --> 00:05:12,230
Um, yeah.

62
00:05:12,230 --> 00:05:16,420
So this it just so you know about this, right.

63
00:05:16,430 --> 00:05:21,590
So we would see a large configuration of the scheduler known as the cooperative configuration.

64
00:05:21,590 --> 00:05:23,030
You see that in the next lesson.

65
00:05:24,110 --> 00:05:25,760
OK, so I'll conclude here.

66
00:05:25,760 --> 00:05:26,420
See you later.
