Hello.
Welcome back and a lesson we go in to see how to achieve time slice and using our Vitalis daily function,
we've seen the effect that our program has when we disable time slicing.
OK, I'm going to close all of this and then I'm going to make a copy of our last project.
I'll copy this and then I'll paste over here.
I'll call this pseudo time slicing, OK?
Yeah.
OK, so we're going to open this and everything remains the same.
We're not going to change any of our schedule or configuration, but to make use of all four of the
tasks or four tasks here, I'm going to give all of them the same priority.
OK, they all have the same priority.
OK.
And let's go to actually our schedule as we left it, with time slicing enabled.
So let's go back and disable it.
I'm going to go to include food are free config Dorridge and time slice in here.
I'm going to set it to zero.
Control is to safe and we know what would happen, what would happen is if we run this only the orange
alert, the controller would have the process or let's verify that.
I'll click here to build.
It's biotin.
It's still building, OK, it's done now, and I'm going to right click over here.
And I'm going to say you book us.
SDM to Coatex and.
Selects the latest one, 32 over here.
OK.
OK, over here.
Click switch over here.
OK, and then I'm going to click to run, you know.
You can see we have just the orange task running, of course, with disabled time slicing and all the
tasks have the same priority.
And because orange was created first, then that is the only one running.
OK, still time slicing is disabled, but we go into.
Let's define a delay amount, 50 milliseconds.
I'm going to define a global variable here called underscore VMS 50 50 Ms.
And this is basically passing 50 to Purdum's to Tick's.
So this will give us the equivalent value in ticks and it in this variable.
This is a bad name for a variable, but I'll just keep it.
OK, so now I'm going to let each task go to the blocked stage or delay for this amount so the task
functions over here.
I'm going to add this.
So this one go for TM's like this one, also this and this so quickly to build.
It's built successfully and then we click over here to go to the Dibakar.
It's open in.
Click the switch.
And then we click here to run.
So we see all of them running now because the tasks go to sleep or do timesharing is disabled, it's
as if there is there is a moment that the tasks all three, there's a moment that three tasks are you
sleep and one can have charge to run.
So there is a moment that three will be sleeping and then one will have the chance to run, although
blue has stopped.
OK, blue is getting some time, although this is not perfect time.
So they're not running.
We're not saying they are running for equal amount of time, but what is happening is they are all running
right.
And this happens because there is a window.
All of them go to sleep for 50 five.
So it could be that you find three of them sleeping and then one of them gets time to run and then a
separate three goes to sleep and then one runs.
So this is what I personally called a pseudo time.
Time slicing.
Um, yeah.
So this it just so you know about this, right.
So we would see a large configuration of the scheduler known as the cooperative configuration.
You see that in the next lesson.
OK, so I'll conclude here.
See you later.