processor utilization.
Note that schedulability analysis looks only at how systems meet temporal requirements, not functional requirements.
The commonly practiced analytical method for real-time systems is
A set of assumptions is associated with the basic RMA. These assumptions are that:
· all of the tasks are periodic,
· the tasks are independent of each other and that no interactions occur among tasks,
· a task's deadline is the beginning of its next period,
· each task has a constant execution time that does not vary over time,
· all of the tasks have the same level of criticality, and
· aperiodic tasks are limited to initialization and failure recovery work and that these aperiodic tasks do not have hard deadlines.
14.4.1 Basic RMA Schedulability Test
Equation 14.1 is used to perform the basic RMA schedulability test on a system.
Let's look at a sample problem and see how the formula is implemented. Table 14.3 summarizes the properties of three tasks that are scheduled using the RMS.
Table 14.3: Properties of tasks.
Periodic Task | Execution Time | Period (milliseconds) |
---|---|---|
Task 1 | 20 | 100 |
Task 2 | 30 | 150 |
Task 3 | 50 | 300 |
Using Equation 14.1, the processor utilization for this sample problem is calculated as follows
Total utilization for the sample problem is at 57%, which is below the theoretical bound of 77%. This system of three tasks is schedulable, i.e., every task can meet its deadline.
14.4.2 Extended RAM Schedulability Test
The basic RMA is limiting. The second assumption associated with basic RMA is impractical because tasks in real-time systems have inter-dependencies, and task synchronization methods are part of many real-time designs. Task synchronization, however, lies outside the scope of basic RMA.
Deploying inter-task synchronization methods implies some tasks in the system will experience blocking, which is the suspension of task execution because of resource contention. Therefore, the basic RMA is extended to account for task synchronization. Equation 14.2 provides the equation for the extended RMA schedulability test.
where:
This equation is best demonstrated with an example. This example uses the same three tasks provided in Table 14.3 and inserts two shared resources, as shown in Figure 14.7. In this case, the two resources represent a shared memory (resource #1) and an I/O bus (resource #2).
Figure 14.7: Example setup for extended RMA.
Task #1 makes use of resource #2 for 15ms at a rate of once every 100ms. Task #2 is a little more complex. It is the only task that uses both resources. Resource #1 is used for 5ms, and resource #2 is used for 10ms. Task #2 must run at a rate of once every 150ms.
Task #3 has the lowest frequency of the tasks and runs once every 300ms. Task #3 also uses resource #2 for 18ms.
Now looking at schedulability, Equation 14.2 yields three separate equations that must be verified against a utility bound. Let's take a closer look at the first equation
Either task #2 or task #3 can block task #1 by using resource #2. The blocking factor