1 / 20

Håkan Sundell Philippas Tsigas Computing Science Chalmers University of Technology

Space Efficient Wait-free Buffer Sharing in Multiprocessor Real-time Systems Based on Timing Information. Håkan Sundell Philippas Tsigas Computing Science Chalmers University of Technology. Real-Time System Synchronization Algorithm Bounding Examples Conclusions Future work. Schedule.

errol
Download Presentation

Håkan Sundell Philippas Tsigas Computing Science Chalmers University of Technology

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. Space Efficient Wait-free Buffer Sharing in Multiprocessor Real-time Systems Based on Timing Information Håkan Sundell Philippas Tsigas Computing Science Chalmers University of Technology

  2. Real-Time System Synchronization Algorithm Bounding Examples Conclusions Future work Schedule

  3. Multiprocessor system Interconnection Network Shared memory , possibly non-uniform Real-Time System CPU CPU CPU CPU

  4. Cooperating Tasks Timing constraints Need synchronization Shared Data Objects In this paper: Atomic Shared Buffer Real-Time System

  5. Synchronization methods Lock Uses semaphores, spinning, disabling interrupts Negative Blocking Priority inversion Risk of deadlock Positive Execution time guarantees easy to do, but pessimistic Synchronization Take lock ... do operation ... Release lock

  6. Synchronization methods Lock-free Retries until not interfered by other operations Usually uses some kind of shared flag variable Synchronization Write flag with unique value ... do operation ... Check flag value and maybe retry

  7. Synchronization methods Lock-free Negative No execution time guarantees, can continue forever - thus can cause starvation Positive Avoids blocking and priority inversion Avoids deadlock Fast execution when low contention Synchronization

  8. Synchronization methods Wait-free Uses atomic synchronization primitives Uses shared memory Negative Complex algorithms Memory consuming Synchronization Test&Set Compare &Swap Copying Helping Announcing Split operation ???

  9. Synchronization methods Wait-free Positive Execution time guarantees Fast execution Avoids blocking and priority inversion Avoids deadlock Avoids starvation Same implementation on both single- and multiprocessor systems Synchronization

  10. Constructing an Atomic Buffer N-readers and N-writers Constraints , non-uniform memory Constructing of simple components Algorithm • register that can be written by processor i • and read by processor j

  11. Wait-Free Atomic Shared Buffer by Vitanyi et. al A Matrix of 1-reader 1-writer registers Algorithm Readers R11 R12 ... R21 R22 … ... ... ... Rij • written by i • read by j Writers

  12. One reader/writer task on each processor Each registers contains a value/tag pair encoded as one value Readers scans its column for highest tag and returns the corresponding value Writers scan its column and writes the next tag together with the new value to its row Algorithm

  13. The tag increases with each write operation Unbounded maximum size for the tag field in the value/tag pair Assume 8 writer tasks with 10 ms period Maximum tag after one hour is 2880000 which needs 22 bits! Memory size is very important, 8 bit computers are still most common Algorithm

  14. Recycling of the tags is necessary Timing information is available in real-time systems (J. Chen, A. Burns) Analysing the maximum difference between tags possible observable by a task at two consecutive invocations of the algorithm Using notations from the standard response time analysis for periodic fixed priority scheduling Bounding

  15. In any possible execution: Where Tmax is the longest period Rmax is the longest response time Twr is the period of the writer tasks Bounding

  16. Analyse how to recycle the tags Newer tags can restart from zero when we reach a certain tag value In order to be able to decide if newer tags are newer we need to have: Bounding

  17. Example Task Scenario on 8 processors Examples

  18. Tmax = Rmax = 1000 MaxTagDiff = 38 TagFieldSize = 76 TagFieldBits = 7 Unbounded algorithm would have reached tag 68400 in one hour , needing >16 bits Examples

  19. We have presented an atomic n-reader n-writer shared buffer. Usage of timing information enables us to recycle the tags and thus bound the memory usage The modified algorithm has small space requirements Conclusions

  20. Investigations of other wait-free synchronization methods Implementations in RTOS kernels Future work

More Related