• No results found

The CK-OMLP

In document Elliott_unc_0153D_15621.pdf (Page 66-68)

Chapter 2: Background and Prior Work

2.1 Multiprocessor Real-Time Scheduling

2.1.7 Multiprocessor k Exclusion Locking Protocols

2.1.7.3 The CK-OMLP

TheCK-OMLP, like theR2DGLP, is ak-exclusion locking protocol that is optimal under s-oblivious analysis. Unlike theR2DGLP, theCK-OMLPalso supports the protection of a pool ofkresources shared by tasksacrossprocessor clusters. The pi-blocking experienced byanyjob in a cluster where resources protected by theCK-OMLPisO(m/k). TheCK-OMLPis designed as follows.

Structure. The structure of theCK-OMLPis illustrated in Figure 2.11. TheCK-OMLPuses a single FIFO queue, denoted FQ, that holds a maximum ofm−k unsatisfied resource requests. The requests of thek resource holders arenotkept in FQ. TheCK-OMLPrelies upon additionalschedulerdata structures that track thec-highest priority incomplete jobs within each processor cluster. Min-heaps are an efficient data structure for such bookkeeping, so these scheduler data structures are depicted by triangles in Figure 2.11. We denote the set of thec-highest priority incomplete jobs with theathcluster byCa. A job may be inCa while also waiting for, or holding, a resource replica.

Rules. TheCK-OMLPoperates under the following rules. LetJidenote a job in theathcluster that issues a requestRi,j,kfor resource`j.

C1 Jireceives a donated priority from a donor job inCaifJi/Ca, pursuant to the description of priority donation in Section 2.1.6.1, whileRi,j,k is incomplete.

C2 Jiacquires the replicaxwhenJiissuesRi,j,kif such a replica is available. Otherwise,Ri,j,k is enqueued on FQ andJisuspends.

C3 WhenJireleases the replicax, the pending request at the head of FQ (if it exists) is dequeued, and the associated job acquiresx.

Blocking Analysis. We provide a summary of the blocking analysis presented by Brandenburg and Anderson (2013). We direct the reader to that paper for the rational behind the following claims. For simplicity of presentation, we assume that each job issues at most one request per resource.

k resources c donors FQ Resource Holders m - k m c clusters scheduler data structures

Figure 2.11: Queue structure of theCK-OMLP.

Under theCK-OMLP, a job may experience bothdirectandindirectpi-blocking. A job may experience direct pi-blocking while it is blocked for a shared resource. A job may experience indirect blocking while it acts as a priority donor. We consider bounds on direct and indirect blocking, in turn.

The priority donation rule, Rule C1, ensures that there are at mostmincomplete requests. Since thek resource holders are not kept in FQ,FQ has a maximum length ofm−k. We denote the bound on direct pi-blocking with the termbCK-OMLPi,j -D. By Rule C1, resource holders are always scheduled, so requests are satisfied at a rate of at leastkrequests perLmaxj -units-of-time. Thus, by this property and Rule C3, direct pi-blocking is bounded by bCK-OMLPi,j -D= m−k k ·Lmaxj =lm k m −1 ·Lmaxj . (2.36)

A job experiences indirect pi-blocking while it acts as a priority donor. We denote the bound on indirect pi-blocking due to resource`j with the termbCK-OMLPi,j -I. This duration is bounded by the maximum time that a request may be waiting in FQ,plus the critical section length of that request. Thus, indirect pi-blocking due

to resource`jis bounded by

bCK-OMLPi,j -I=biCK-OMLP,j -D+1·Lmaxj =lm k

m

·Lmaxj . (2.37)

There may exist multiple pools of resources that are each protected by a different instance of the CK- OMLP, sobCK-OMLPi,j -I does not bound indirect pi-blocking due toallsuch resources. We denote the set of resources accessed by tasks within theathcluster byla. We denote the bound ontotalindirect pi-blocking by bCK-OMLPi -I, which is bCK-OMLPi -I=max `j∈la n bCK-OMLPi,j -I o . (2.38)

We denote the bound on the total pi-blocking experienced by a job under theCK-OMLPwith the term bCK-OMLPi . For jobs that donotissue requests,

bCK-OMLPi =bCK-OMLPi -I. (2.39)

Letliadenote the subset of resources accessed by jobJithat is scheduled within theath cluster. For jobs that do issue requests resource requests under theCK-OMLP,

bCK-OMLPi =bCK-OMLPi -I+

`j∈lia

bCK-OMLPi,j -D. (2.40)

This concludes our review of real-timek-exclusion locking protocols.

In document Elliott_unc_0153D_15621.pdf (Page 66-68)