Hello. So what we want to look at now are deadline driven scheduling methods which are dynamic priority, as opposed to fix priority. And what I have here for you is a fairly simple rate monotonic schedule that just goes out to period of ten. And we've got three total services. Their periods are 25 and seven. So they're definitely not harmonic if we look at the multiples of the fundamental frequency for t three. And we analyze a little bit beyond the longest period because that allows us to see where there's failures with the rate monotonic fixed priority policy. And where EDF and LF have an advantage over rate monetary. So there are certainly many scenarios like this where the flexibility of dynamic priorities allows them to succeed where the rigid, fixed priority policy rate monotonic will lead to failure. So this is a downside to rate monotonic and one of the reasons you might consider using the dynamic priorities. Whether dynamic priorities are really part of rape, monotonic or not, I guess this is an interesting philosophical question. I would certainly sort of view them as an extension to the standard rate monotonic theory, which normally is considered fixed priority policies. So for use with our toss cyclic executive possess real time extensions. But Lennox lately has added skinhead deadline, which essentially is an EDF schedule. So that's quite interesting. Anyway, enough of background hope. I've got you interested. Now let's see how you do it, right. So like I said, we've got total utilization. Just north of 90 eight 0.57 percent. So we've got a lot of utilization here, and we got an LC in the seventies, so the lCM is way out there, so there's no way we're going to look at the entire under fully understand this service set over the lCM. But if we look out to the longest deadline, a little beyond will have some insight into comparing the various policies. So great montagne IQ as always, we can just fill in period equals to dispatches of s one all the way across. And I put a question mark on this fourth dispatch of s one at Windows seven because it's questionable as to whether it was the best thing that could have been done. But it is what will happen with a great amount of time. Okay. And in fact, it would continue on to nine. And so on and so forth, all the way out and so easy to fill in very deterministic. We feel in s two now in the first available window after s one has executed and we fill it in again over here at windows six when it's requested again. So it's requested again right here. And it would buy rate Montagne policy normally execute their It's also questionable as to whether that was the best decision. The reason you can see is that it's going to cause s three to miss a deadline. So this is where we have the deadline mess with rate monotonic. And it is simply not adapted for this kind of scenario, right? It can't adjust. So however, as we've talked about s three fails and his lower priority, and that's what we would expect, and we know it's above the Lubbe. So, we know that it's quite possible it will fail right? Without even doing this worst case analysis, but looking at the worst case analysis, these are the two questionable dispatches. Maybe we could have waited on s two and pushed it over here so that we could have gotten some work done on s three over here earlier and have met the deadline. Well LA that's what Pdf does. How does it do it? It moves the dispatch of s three earlier, and it goes ahead, and it differs the dispatch of s two until later. And that's a very good thing for s three because now s three can meet its deadline. Remember, s three requires two units of computation over a window of seven. So well, what we do is we encode urgency and remember urgency for EDF. So for EDF, we have time to deadline. And if we look at this column that I've added over here right underneath each window for the EDF analysis, what you see is from the left edge this critical instant, I look at each service and I compute how long it is until their deadline. So for s one, it's two for s two its five for s three at seven because the deadline is equal to period. Now what happens is if I satisfy s one it becomes a don't care necks because it's no longer requesting CPU, and it's done. Well s two got one unit of time closer to its deadline. So on this left edge, the value is now four, right, beause there's only four more windows until its deadline. And so it has more urgency. And likewise for s three. It now drops down by one to six based on time to deadline from the left edge where I filled in the number and so we would dispatch the most urgent service. And that would be us, too, because four is the smallest and s one is it don't care. So, in fact, we do that we dispatch as to and now as to only needs one unit of time every five interval deadline, Interval five. So it becomes a don't care. But s one now again is requesting, and it starts at it, too. And it's going to continue this pattern of two x two x two x typically. But you can see there's a lot harder to analyse. There's a lot more thinking that you have to do here more potential for air to write just as the human schedule. So, we have s three drops down to five because we haven't made any progress. It drops down to four. The s one and s two becomes don't cares because it's now dispatched. So over here it was of course s one and then s one becomes available. Well, s three got one more close to the deadline and still isn't done. Still has more work to do. So it dropped down to three. But s one still has it beat because it has a very short period and therefore a short deadline, and so it dispatches. And then we get to the next window where finally, as three completes. And this right here, I would point out, is where the good decision that wasn't made by rate monotonic. Right. So it because of the computation of urgency, we realized that s three is more urgent. It makes its higher priority to make progress on s three than it is to simply take care of s two because of its higher frequency. Right? And that's a key decision because it still allows us to take care of s one, which is relatively urgent. And yet meet the deadline for s three. So we see EDF is clearly a winner in scenarios where rate monotonic may not work and those are most often going to be for utilization levels that are above the RM love. So that's another reason the RM love is a great back of the envelope calculation. We know that we want to be careful and be concerned and perform exact worst case analysis when we're above the are in love. And we know that maybe a dynamic priority policy like pdf is an option. So let's look at LF quickly. So LF in this case isn't very exciting because you can see results in the same schedule as pdf. What is the difference? So LF also encodes urgency, but it's much smarter urgency. It says I'm going to take the time to deadline just like pdf, and I'm going to subtract off the time remaining to complete the request for service. So this is I sometimes with students call this student thinking so when you have classes, you most likely dynamically prioritize your work based on how long it is to the due date for the assignment you're working on. But you probably also consider how much more work you have yet to complete on that assignment, not just how soon it's due, right? And it makes sense to work on the assignment where you have the most to do and as well as a deadline that's coming up soon, right? And if we subtract the two that captures the idea of the most urgent in terms of must be worked on first in order to prevent missing a deadline. So one of the things you'll notice about this is we have to update these metrics and adjust priorities every single window of time. Or on any change, in other words, to the ridicu, which would come about through interrupts or various types of inter process communication or system calls and things like that. So, for at least laxity first, it's similar for a simple case like this. What we have is we have time to dead language was 25 and seven and in each case, each one of these. We had a c value of one. I'm sorry for SME. We have a C value too. So we have 11 and two. So actually, we just subtract those off here at this last edge and we start out with 14 and five. So we're going to have the dispatch here and it becomes a don't care. Now we subtract one because s two and s three made no progress. So we we just subtract one off now as to gets dispatched. It's the winter based on the most urgent and it becomes a don't care as one is re requested and it dispatches notice that s three just continues to decay here. And this is where it gets interesting. Both s one and s to become don't care because they satisfied their requirements. Over their request, period as three continues to decay to two. So it becomes the winner and it dispatches just like a pdf. But what happens here is interesting. In pdf, we continue to decay down a value and in LF we hold constant. Why do we do that? Well, because we got one unit close to the deadline here compared to this left edge. But we also got a unit of worked up, so that actually lowers the change in urgency. Decreases the amount, the change in urgency. So it just remains constant because one unit work done one unit closer to the deadline. It's the same level of urgency. So as one wins and it dispatches here. And then we finally dispatch s three here because now it does go down by one. Because it got one closer to the deadline and no work was done in this window five here. Right? And so now we dispatch it winds up being the same as EDF. But it certainly can be different because of this time to deadline minus time remaining. So, it is slightly more adaptive than EDF. The big question is the added complexity for that adaptation Vitti worth it. Right. So that's something we need to see. That's still somewhat of an open research topic. EDF is definitely used as an alternative to fixed priority rate montane IQ very often for SRT or soft real time. And fixed priority rate Monotonic is a state of practice typically for hard, real time mission critical systems. So we'll leave it on that note, and I wil leave you to think about that. And we'll look at more dynamic priority policy schedules and methods of timing, analysis and feasibility determination, along with more advanced rate monotonic concepts in this second course in this series. Thank you very much.