THE ROYAL SITES IN TIMES OF CHARLES III ABSTRACT
1. UNA CORTE EN MOVIMIENTO *
In the preceding description of the MILP, each request Rx,q,v that could possibly contribute to the blocking of the task under analysis is represented by two blocking variables, Xx,q,vS and Xx,q,vA , for spin delay and arrival blocking, respectively. With large task sets, task sets with a large ratio between longest and shortest period, or task sets with many requests for shared resources, the number of blocking variables can potentially grow large, which increases the computational cost of solving the MILP. In the following, we show how the blocking variables can be aggregated to reduce the total number of variables in the MILP.
Instead of representing each request by corresponding blocking variables, we introduce aggregate blocking variables for sets of requests. In particular, for each task Tx and for each resource `q accessed by Tx, we introduce the aggregate blocking variables Xx,qS and Xx,qA for spin delay and arrival blocking, respectively. Similar to per-request blocking variables, aggregate blocking variables can take non-negative values and are not restricted to integer values.
Unlike their per-request counterparts, aggregate blocking variables are not
generally upper-bounded by 1. The interpretation of the aggregate blocking variables is similar to the interpretation of the per-request blocking variables:
in an arbitrary but fixed schedule, the requests for `q issued by jobs of Tx contribute to Ji’s spin delay with exactly Xx,qS ·Lx,qtime units. The aggregate blocking variables for arrival blocking are interpreted analogously.
The MILPs as described in the preceding sections can be rephrased such that per-request blocking variables are avoided completely and aggregate blocking variables are used instead. We illustrate this approach by constructing the MILP for the analysis of F|N locks. Analogously to Equation (2), the objective function for the MILP is to maximize
bi, X
Tx∈τi
X
`q∈Q
Xx,qS + Xx,qA · Lx,q. (14)
Note that this objective function stated with regard to aggregate blocking variables is identical to the objective function we used previously when applying the following substitution:
∀Tx ∈ τi : ∀`q ∈ Q : Xx,qS =
Nx,qi
X
v=1
Xx,q,vS and (15)
Xx,qA =
Nx,qi
X
v=1
Xx,q,vA . (16)
In fact, as we will show, many constraints previously stated with regard to per-request blocking variables can be rephrased for aggregate blocking variables by applying the substitutions above. We next walk through all constraints previously established for the analysis of F|N locks and detail how they are adapted for aggregate blocking variables.
Constraint 1 is adapted as follows:
Constraint 29. In any schedule ofτ :
∀Tx ∈ τi : ∀`q∈ Q : Xx,qA + Xx,qS ≤ Nx,qi .
Proof. Observe that jobs of Tx issue at most Nx,q requests for `qwhile a single job of Ti is pending, and hence no more than Nx,qi of Tx’s requests for `q can cause Ji to incur arrival blocking or spin delay: Xx,qA ≤ Nx,qi and Xx,qS ≤ Nx,qi . The remainder of the proof is identical to the proof of Constraint 1.
Constraints 2–4 do not contain any blocking variables and can be used un-modified with aggregate blocking variables. Constraint 5 is simply adapted by substituting per-request blocking variables according to Equation (16):
Constraint 30. In any schedule ofτ :
X
Tx∈τlh
X
`q
Xx,qA ≤ 0. (17)
The proof is identical to the proof of Constraint 5. The remaining con-straints applicable to F|N locks, Concon-straints 6–9, can similarly be adapted by substituting the per-request blocking variables accordingly.
Constraint 31. In any schedule ofτ :
∀`q∈ Q : X
Tx∈τll
Xx,qA ≤ Aq.
Proof. Suppose not. If Aq = 0, this would imply, by definition of Xx,qA , that in some schedule a request Rx,q,v caused Ji to incur arrival blocking, even though by definition of Aq no request for `q arrival-blocked Ji, which is clearly impossible. If Aq = 1, at least two requests by local lower-priority
tasks caused arrival blocking. Analogously to Constraint 2, this is impossible because at most one request can be in progress on P (Ti) when Ji is released.
Constraint 32. In any schedule ofτ :
X
Tx∈τll∪τlh
X
`q
Xx,qS ≤ 0. (18)
Proof. The proof is identical to the proof of Constraint 7.
Constraint 33. In any schedule ofτ with F|N locks:
∀`q∈ Q : ∀Pk, Pk6= P (Ti) : X
Tx∈τ (Pk)
Xx,qS ≤ ncs(Ti, q).
Proof. The proof is identical to the proof of Constraint 8.
Constraint 34. In any schedule ofτ with F|N locks:
∀Pk, Pk6= P (Ti) : ∀`q∈ Q : X
Tx∈τ (Pk)
Xx,qA ≤ Aq.
Proof. The proof is identical to the proof of Constraint 9.
Except for Constraint 29, all of the above constraints and the objective function for F|N locks using aggregate blocking variables were obtained by applying the respective substitutions (Equations (15) and (16)) for per-request blocking variables, and hence, are equivalent with regard to the total blocking they permit. Constraint 29, however, differs from the corresponding
constraint established using per-request blocking variables (Constraint 1). As we will show, this does not introduce any pessimism when compared to the analysis with per-request blocking variables presented in Section 6.3.2.
Theorem 5. The blocking bounds obtained from the analysis of F|N locks using aggregate blocking variables does not exceed the blocking bounds obtained from the analysis of F|N locks using per-request blocking variables.
Proof. We show that a solution to the MILP using aggregate blocking variables can be transformed into a solution for the MILP with per-request blocking variables that satisfies all constraints and has the same objective value (i.e., blocking bound). Hence, the blocking bound obtained with the MILP using aggregate blocking variables cannot exceed the blocking bound obtained with the MILP with per-request blocking variables, as otherwise the objective value would not be maximal.
Let τ be a task set and Ti with Ti ∈ τ the task under analysis. In the following, we prefix all variables used in the formulation of the respective MILPs with eitherag orpr to denote that the variable is part of the MILP using aggregate or per-request blocking variables, respectively. For instance, we use prXx,q,vS to denote the blocking variable Xx,q,vS of the MILP using per-request blocking variables, and we useagbi to denote Ti’s blocking bound (i.e., objective value) obtained with the MILP using aggregate blocking variables.
Let an assignment to the aggregate blocking variablesagXx,qS andagXx,qA with Tx ∈ τi∧ `q ∈ Q and the variablesagAq with `q∈ Q be given. We construct an assignment to the variablesprAq with `q∈ Q as follows:
∀`q∈ Q : prAq ,agAq. (19)
We construct an assignment to the per-request blocking variables as
The idea behind this construction is that the value assigned to one aggregate blocking variable for spin delay is “distributed” among multiple per-request blocking variables for spin delay, assigning a value of at most 1 to each of them. The value of an aggregate blocking variable for arrival blocking (which is at most 1) is directly assigned to one per-request blocking variable for arrival blocking. As we show in the following, this construction ensures thatprbi = agbi holds and all constraints specified for the the MILP with per-request blocking variables are satisfied.
Observe that this assignment by construction fulfills Equations (15) and (16) that we previously used to substitute per-request blocking variables to obtain constraints using aggregate blocking variables:
From the definition of the objective functions Equation (2) and Equation (14) for the MILPs with per-request and aggregate blocking variables, respectively,
it directly follows thatprbi =agbi holds. We next show that this assignment also satisfies all constraints.
We start with Constraint 1 that we restate here for convenience:
∀Tx ∈ τi : ∀`q ∈ Q : ∀v, 1 ≤ v ≤ Nx,qi : prXx,q,vA +prXx,q,vS ≤ 1.
Let Txwith Tx∈ τi be a task and `qwith `q ∈ Q be a resource. For blocking variables prXx,q,vS andprXx,q,vA with v 6= Nx,qi , this follows immediately since
prXx,q,vS ≤ 1 by Equation (20) and prXx,q,vA = 0 by Equation (21). For blocking variables with v = Nx,qi , we distinguish between the three cases considered in Equation (20). IfagXx,qS = Nx,qi = v, then, by Constraint 33, we haveagXx,qA = 0, and hence prXx,q,vS = 1 andprXx,q,vA = 0, which satisfies Constraint 1. If Nx,qi − 1 ≤agXx,qS < Nx,qi , then bagXx,qS c = Nx,qi − 1, and hence, by Constraint 33, we have
Xx,qA + Xx,qS ≤ Nx,qi
Xx,qA + Xx,qS − bagXx,qS c ≤ Nx,qi − bagXx,qS c Xx,qA + Xx,qS − bagXx,qS c ≤ 1.
It follows that Constraint 1 is satisfied. If agXx,qS < v − 1, Constraint 1 is trivially satisfied since agXx,qA ≤ agAq holds due to Constraints 30, 31, and 34.
Constraints 2–4 trivially hold since these constraints are used unmodified for the MILP with aggregate blocking variables. The assignment also trivially satisfies Constraints 5–9: the corresponding Constraints 30–34 were obtained by applying the substitution defined in Equations (15) and (16), and Equa-tions (15) and (16) hold under the assignment defined in EquaEqua-tions (20) and (21).
Hence, a solution to the MILP using aggregate blocking variables can be
transformed into a solution for the MILP using per-request blocking vari-ables, and thus, the blocking bound obtained from the MILP using aggregate blocking variables does not exceed the blocking bound obtained from the
MILP using per-request blocking variables.
As we show next, in the case of non-preemptable spin locks, the integer variables used in the construction above can be eliminated, and hence, the blocking analysis can be carried out by solving (non-integer) LPs.