1 / 23

Transactional Concurrency Control for Intermittent, Energy-Harvesting Computing Systems

This paper explores a transactional concurrency control mechanism for intermittent computing systems powered by energy harvesting. It proposes a solution called Coati that ensures correct execution with interrupts, simplifies concurrent code, and provides simple and correct semantics for concurrency control.

moll
Download Presentation

Transactional Concurrency Control for Intermittent, Energy-Harvesting Computing Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Transactional Concurrency Control for Intermittent, Energy-Harvesting Computing Systems Emily Ruppel and Brandon Lucia June 26, 2019 PLDI 2019 -- Systems II

  2. Powered on Charging Energy • Power down Time Intermittent Energy-Harvesting Computing Systems [Capybara, ASPLOS 2018] ML/AI beyond the edge [Sonic & Tails, ASPLOS 2019]

  3. Intermittent devices need concurrent interrupts Atomic w.r.t power failures [Alpaca, OOPSLA 2017] Not intermittence safe [Chain, OOPSLA 2016]

  4. Intermittent devices need concurrent interrupts • Event-atomic tasks • Multi-task transactions • Timely split-phase events

  5. Prior work supports one execution context Idempotent re-execution [Alpaca, OOPSLA 2017] taskincX() Write-after-read dependence Z = X X++ next_taskincY() task Z = X X++ W = Z Y++ assert(X==Y) taskincY() event W = Z Y++ assert(X==Y) next_tasksend() X =0 Y =0 Non-volatile

  6. Interrupts violate correctness assumptions Assumptions: • Tasks always start from the same point • Tasks re-execute idempotently taskincX() Z = X X++ next_taskincY() X = sense() taskincY() W = Z Y++ assert(X==Y) next_tasksend() [Alpaca, OOPSLA 2017]

  7. Problem #1: Interrupt Interrupted Power failures can happen during interrupts • eventclear() taskincrement() … t1 = X + 1 … t2 = Y + 1 assert(t1==t2) next_tasksend() X = 0 Y = 0 return

  8. Problem #2: False Flag Conventional synchronization fails taskincX() … flag = 1 T1 = X + 1 next_taskincY() • eventclear() if(flag)return X = 0 Y = 0 return task incY() … T2 = Y + 1 assert(T1==T2) flag = 0 next_tasksend()

  9. Coati produces correct code with interrupts for intermittent systems Coati Executable Intermittent Device Coati Application App Binary Programmer App code Coati Binary Deployed App Linker Coati Runtime

  10. Coati serializes interrupts after scheduled tasks transaction taskincX() event sensor() … X++ next_taskincY() Atomic w.r.t power failures X = sense() event_return() Atomic w.r.t events not power failures & events taskincY() … Y++ assert(X == Y) next_tasksend()

  11. Split-phase events provide timely reaction Private Variable • topsensor() X’ = senseX() Y’ = senseY() top_return(sensor) Schedules bottom half event sensor() X = senseX() Y = senseY() AvgX= movingAvg(X) AvgY= movingAvg(Y) evt_return() • bottomsensor() AvgX = movingAvg(X’) AvgY = movingAvg(Y’)

  12. Split-phase serialization orders tasks & events taskincrement() • topsensor() … X++ … Y++ assert(X==Y) next_tasksend() X’ = senseX() Y’ = senseY() evt_return(sensor) • bottomsensor() AvgX = movingAvg(X’) AvgY = movingAvg(Y’) tasksend()

  13. Coati serializes multiple interrupts in FIFO order taskincX() • topsensor() … X++ next_tasksend() … evt_return(sensor) taskincY() • topsensor() … Y++ assert(X==Y) tx_nextsend() … evt_return(sensor) • tasksend() • bottomsensor() • bottomsensor() … … …

  14. Coati Evaluation • Correctness • Programming Effort • Runtime Overhead

  15. We evaluated Coati on real hardware

  16. Coati ensures correct execution with interrupts • Synchronization was carefully added to the Alpaca code • Both systems used the same task decomposition • Data in Alpaca still become inconsistent

  17. Coati transactions simplify concurrent code • On average, fewer, simpler transitions are required • Lines of synchronization code reduced by 67% on average

  18. Coati’s overhead is similar to other strategies without their drawbacks

  19. Coati provides simple, correct semantics for concurrency control in an intermittent execution For more: • Read the paper • Experiment with our code • Stick around! github.com/CMUAbstract/coati_pldi19.git

  20. Transactional Concurrency Control for Intermittent, Energy-Harvesting Computing Systems Emily Ruppel and Brandon Lucia June 26, 2019 PLDI 2019 -- Systems II

More Related