270 likes | 436 Views
Compositional & Parallel Real Time Systems. CoPaRTS. Efficient Admission Control for Enforcing Arbitrary Real-Time Demand-Curve Interfaces. Farhana Dewan and Nathan Fisher RTSS, December 6 th , 2012. Sponsors:. Outline . Background: Compositional Real-Time System
E N D
Compositional & Parallel Real Time Systems CoPaRTS Efficient Admission Control for Enforcing Arbitrary Real-Time Demand-Curve Interfaces FarhanaDewan and Nathan Fisher RTSS, December 6th, 2012 Sponsors:
Outline • Background: • Compositional Real-Time System • Real-Time Interfaces • Problem: Enforcing Interfaces • Setting: • Aperiodic Jobs • Demand-Curve Interfaces • Solution: • Admission Control for MAD Jobs • Simulation • Future Work: • Admission Control for Arbitrary Jobs
Background • Problem • Setting • Solution • Future Work Compositional Real-Time System • Component C • Workload W • Component-level Scheduling Algorithm A • Real-time Interface I Global Scheduler C A I C1 C2 C3 W … A1 A2 A3 I3 I2 I1 𝝉1 𝝉2 𝝉n W1 W2 W3 … … … 𝝉1 𝝉2 𝝉n 𝝉1 𝝉2 𝝉n 𝝉1 𝝉2 𝝉n
Background • Problem • Setting • Solution • Future Work Real-Time Interfaces Global Scheduler Server-based interface model Demand-curve interface model Server Interface Selection (using functions) Ex- periodic resource model, bounded-delay resource model Ex- Real-Time Calculus, demand-bound server Ik Ii Interface Selection (using parameters) Ci Ck Ak Ai Wi Wk … … τ2 τ2 τnk τni τ1 τ1
Background • Problem • Setting • Solution • Future Work Real-Time Interfaces Server-Based Interface Demand-Curve Interface • Simple • Schedulabiltiy analysis explicit • Interfaces over-allocates processing resource • Servers enforce strict temporal isolation • Complex • Schedulabiltiy analysis implicit • Interfaces precisely modelresource demand • Temporal isolation is not guaranteed
Background • Problem • Setting • Solution • Future Work This Work • For demand-based models, achieving efficient resource allocation as well as strict temporal isolation among components is challenging • There is no known “policing” protocol to ensure that a system does not violate its demand-curve interface [SanjoyBaruah, CRTS2008] Goal: Design Efficient and near-optimal admission controllers for arbitrary demand-curve interface with aperiodiccomponentworkload
Background • Problem • Setting • Solution • Future Work This Work Global Scheduler Server-based interface model Demand-curve interface model Server Interface Enforcement (Admission Control) Interface Selection (using functions) Ik Ik Ii Interface Selection (using parameters) Interface Selection (using functions) Ck Ck Ci Ak Ai Ak Wk Wk Wi … … … τ2 τ2 τ2 τn τn τn τ1 τ1 τ1
Background • Problem • Setting • Solution • Future Work Setting: Aperiodic Jobs Set of Aperiodic Jobs J = {j1 … jN} • Aperiodic job ji =(Ai , Di , Ei) • Arrival time Ai • Relative deadline Di; absolute deadline di = Ai +Di • Worst-case execution Eiduring interval [Ai, Ai+Di) j4 j2 j1 j3 j5 A3 d3 d4 A5 A4 d5 t A2 A1 Monotonic absolute deadline (MAD) jobs C A I W … d2 d1 t1 t2 j1 j2
Background • Problem • Setting • Solution • Future Work Demand-Curve Interfaces Arbitrary Demand Interface Single-Step Demand Interface dbi dbi α σ α4 σ4 α3 σ3 ∆ t α2 σ2 α1 σ1 t ∆1 ∆2 ∆3 ∆4
Background • Problem • Setting • Solution • Future Work Example: Periodic Demand-Curve Interface • dbi can be generated from dbf • Consider τ contains 3 tasks: • τ1(1,3,3) • τ2(2,5,5) • τ3(2,8,8) dbf(τ1,t) DBF t dbf(τ2,t) dbf(τ3,t) t Cumulative Demand Bound Function, DBF(τ,t) t t
Background • Problem • Setting • Solution • Future Work Admission Control Exact admission control Approximate admission control
Background • Problem • Setting • Solution • Future Work Admission Control • Demand-point: In the XY-plane, a demand-point P(x,y) is represented by any interval length (x) and demand (y) over that interval dbi P(x,y) demand t Interval
Background • Problem • Setting • Solution • Future Work Exact Admission Control dbi E2 + E3 E1 + E2 + E3 Step 1 Step 4 Step 2 Step 3 Challenges E1 + E2 E3 • No assumption on interface • Store all demand-points with interval of all accepted job’s arrival and most recently accepted job’s deadline • Complexity linear in number of accepted jobs E1 Update existing demand-points w.r.t new interval Insert demand-point corre-sponding to new job Store demand-points corresponding to admitted jobs in a list ACCEPT the job if no demand-point violates dbi E2 j2 j1 j3 Infeasible for long running online system! d1 A3 d2 d3 A2 A1 t t
Background • Problem • Setting • Solution • Future Work Approximate Admission Control dbi (1+ϵ)3 Step 1 Step 2 Step 3 Step 4 (1+ϵ)2 Approximation regions Merge points within region to get approximate points Remove redundant points Merge approximate points 1+ϵ 1 t
Background • Problem • Setting • Solution • Future Work Approximate Admission Control dbi (1+ϵ)3 Step 4 Step 3 Step 2 Step 1 (1+ϵ)2 Polynomial complexity in number of bits to represent max dbi and ϵ Merge points within region to get approximate points Remove redundant points Merge approximate points Approximation regions 1+ϵ 1 t
Approximate Admission Control Theorem [Correctness] Theorem [Approximation Ratio] • Given a demand-curve interface Λ, ϵ, and set of previously-admitted jobs J, when new job jkarrives in the system, if APPROXIMATEAC returns “Accept”, thenjk may be admitted without violating Λ • Given a demand-curve interface Λ, ϵ, and set of previously-admitted jobs J, if APPROXIMATEAC returns “Reject” for a new job jk, then EXACTAC also returns “Reject” for a demand-curve (1/1+ϵ)dbi(Λ,・) on the same previously-admitted job set
Background • Problem • Setting • Solution • Future Work Reducing Demand Points for Periodic Demand-Curve Interface • DBI-WrapCheck dbi 𝚇 Observation 1 Observation 2 3uH • Any demand-point in the XY-plane with interval length (x-value) greater 4H can be discarded • Any demand-point in the XY-plane with demand (y-value) greater 2u.H can be mapped to previous region 𝙸𝚇 𝚅𝙸 2uH 2uH 𝚅 𝚅𝙸𝙸𝙸 𝙸𝙸𝙸 uH 𝙸𝙸 𝚅𝙸𝙸 𝙸𝚅 𝙸 t H 2H 3H 4H 4H
Background • Problem • Setting • Solution • Future Work Enforcing Temporal Isolation • Component-level temporal isolation • Lightweight server to execute each admitted job • The server will discontinue executing a job jk when it has executed upto its Ek • Enforce temporal isolation in component level • Reclaim unused execution • Keep a buffer of active jobs • Instead of updating the demand-points in the list at the time of job arrival, update after a job has finished execution
Background • Problem • Setting • Solution • Future Work Simulation: Exact Vs Approximate • Demand-curve interface (periodic dbi): • 8 periodic tasks with randomly generated parameters are used to generate periodic dbi • Workload: • For MAD jobs, inter-arrival time, deadline and execution time are generated from uniform distribution • Approximation parameter: ϵ = 0.01, 0.1, 0.2 • Simulation process: • A 2.33 GHz Intel Core 2 Duo E6550 machine with 2.0GB RAM is used • The simulation runs until Ai≥ 4H • Metrics: • Execution time trace • Number of accepted jobs
Background • Problem • Setting • Solution • Future Work Simulation: Exact Vs ApproximateExecution Time Trace Observation • Approximate algorithm significantly reduces runtime as it does not depend on number of jobs in the system • After 0.9s, exact algorithm takes 19ms, approximate algorithm (ϵ=0.01) takes 0.5ms
Background • Problem • Setting • Solution • Future Work Simulation: Exact Vs ApproximateAccepted Jobs Vs Execution Time Observation • Number of accepted jobs for ϵ=0.01 is very close to the number of accepted jobs by the exact algorithm
Background • Problem • Setting • Solution • Future Work Admission Control for Arbitrary Jobs • A simple extension to arbitrary aperiodic jobs is given in [Dewan and Fisher, WSU-CS-TR 2012] • Keep a buffer to store active jobs • Insert demand-point corresponding to the newly admitted job in the list in absolute deadline order • Other operations are modified accordingly • Currently working on improving space/time complexity
Background • Problem • Setting • Solution • Future Work Summary • Focused on: Enforcing demand-curve interfaces for compositional real-time systems • Developed: Exact and approximate AC for arbitrary demand-interface • Proved: Given an accuracy parameter ϵ, the approximate AC runs in polynomial in terms of the dbi representation and ϵ • Verified: Simulation results show significant improvement of performance of the approximate AC with respect to the exact AC
Background • Problem • Setting • Solution • Future Work Future Work • Uniprocessor: • Admission control for arbitrary demand-curve interface with arbitrary job arrival • Reduce space/time complexity • Implementation of admission controller in operating system • Verify practicality of admission controller • Multiprocessor: • Enforcing demand-curve interface for multiprocessor
THANK YOU! Questions? farhanad@wayne.edu
Background • Problem • Setting • Solution • Future Work Resetting Admission Controller • Not possible to reset at arbitrary subsystem idle point • Requires global system knowledge • Example • S with interface dbi(Λ,t)=0.9t • j1 = (0,0.9,1), j2 = (0.91,0.9,1) • If j1is contiguously executed at its release time by the processor, S will be idle at time 0.9 • If S is reset at 0.9, j2 will be admitted at time 0.91 • However, j1+ j2 together violates S (1.91x0.9 = 1.719<0.9+0.9=1.8)
Background • Problem • Setting • Solution • Future Work Simulation: Exact Vs Approximate • Demand-curve interface (periodic dbi): • 8 periodic tasks with total utilization = 0.5 • Periods in the range [5,40] • Task utilizations using UUniFast [Bini and Buttazzo, ECRTS’2004] • Hyperperiod H = 197505 • Workload: • Uniform distribution is used to generate random parameters • Inter-arrival time in the range [0,20] • Relative-deadline in the range [0,50] • Execution-time in the range [0, Di] • Approximation parameter: ϵ = 0.01, 0.1, 0.2