[MUSIC] So if you feel a bit lost from looking at the theoretical framework for validating sporadic jobs, don't worry because in this lesson we will take a more practical example. Consider an already given schedule with periodic jobs. Four sporadic jobs arrive to this schedule as seen here in the table. And all the sporadic jobs schedulable without altering the periodic schedule, and if yes what are the response times for sporadic jobs? The schedule here is identical to the one in the last lecture and a queue is used to illustrate the queuing of sporadic jobs once released. So the sporadic job S1 arrives at thyme three and has an execution thyme of 4.5. S2 arrives at 4.5 and has an execution time of four. S3 arrives at time 11 with an execution time of 1.5. And finally S4 arrives at 14.5 with the execution time of five. So we first check S1 since it arrived first. The acceptance test is made in the beginning of the frame, in other words at line four. And with the deadline DS1 the job must be scheduled into frames two, three, and four. In these frames we calculate the slack to be four. So now as one has an execution time of 4.5, so it is not possible to schedule this job and it is therefore rejected. Then we take S2, which test is made in the beginning of next frame at time eight. The deadline of 29 makes it possible to schedule the job into frames three to seven, and in this range we have a slack of 5.5, so the job with the execution time of four is schedulable. One part of S2 is now scheduled from time ten to time 12, after which S3 arrives and the next frame begins. Now we have the incoming S3 job and the S2 job in the queue. This means that we have to consider S2 when making the analysis for S3. So with a deadline of 22 the job must be scheduled in the frames four and five with a total slack of two. In case S2 can be delayed for a while it would be possible to schedule S3. So we then push S2 back in the queue and put S3 in the front, because S2 can be scheduled after S3 and still not miss the deadline. We then add S2 and S3 to the schedule and then we've got the fourth job S4 at time 14.5. The analysis is then made at time 16 because here is where the frame begins. So without S2 and S3, S4 with a deadline of 44 would fit, but now S2 and S3 cannot be delayed enough such that S4 would fit into the schedule. So S4 must be rejected. In this case, only S2 and S3 could be accepted, so their reaction time is the difference between the completion time and the release time, so for S2 it is 28-4.5 which is 23.5, and for S3 it is 19.5-11, which is 8.5. We will take yet another example, where we mix periodic, sporadic and aperiodic jobs. Here we have the periodic jobs D1, D2, and D3 according to the table. And the figure shows the provided schedule of the periodic tasks and they have a frame size of four. One sporadic job of length one arrives at time one, and this job has a deadline of 15. Another sporadic job arrives at time four, having a length of two and a deadline of 22. And finally an aperiodic job arrives at time six with a length of 0.5. So we ask a question, will the sporadic jobs meet the deadlines? And what is the response time of the aperiodic job? We start with the acceptance test for the first sporadic job having the execution time of one. The total slack between two and four is then one. So therefore, the job is schedulable. We add the job to the schedule by placing it in the empty slot here at time 11. Then we take the next periodic job with the execution time of two and again we run the same test but with the frames relevant for this job namely frames two and six. The total slack here is four, so there's plenty of room to schedule the job. We illustrate this by showing the second sporadic job arriving at time four. And the first job already scheduled at time 11. S2 is then placed in the time slot from 19 to 20, and it's second part from 21 to 22. We finally also look at aperiodic job, which arrives at time six. Since there's no deadline for this job, no validation test must be performed and the job is simply put where there is room left in the schedule. This is a time 22. We then start response times for jobs and the first aperiodic job arrives at time one and completes at time 12, which gives it a response time of 11. Still arrives at times four and completes at time 22, so it's response time is then 18. And the aperiodic job arrives at time six and completes at time 22.5, giving it a response time of 16.5. In this lesson, we saw an example of how sporadic jobs are validated when arriving to a system with already scheduled periodic jobs. Note that it is important to take already scheduled and partly executed sporadic jobs into account when multiple sporadic jobs arrive.