1 / 21

Reactive Synchronization Algorithms for Multiprocessors

Reactive Synchronization Algorithms for Multiprocessors. Beng-Hong Lim and Anant Agarwal Laboratory of Computer Science Massachusetts Institute of Technology. Zahid Irfan Department of Computer Science Lahore University of Management Sciences 1 st February 2003. Introduction.

liseli
Download Presentation

Reactive Synchronization Algorithms for Multiprocessors

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. Reactive Synchronization Algorithms for Multiprocessors Beng-Hong Lim and Anant Agarwal Laboratory of Computer Science Massachusetts Institute of Technology Zahid Irfan Department of Computer Science Lahore University of Management Sciences 1st February 2003

  2. Introduction • Multiprocessors • Alewife – Shared memory Multiprocessor • Synchronization • Shared Memory Protocols • Message Passing Protocols • Reactive Synchronization Algorithms • Dynamically select the protocol

  3. Synchronizations Algorithms • Passive Spin-Lock Algorithms • Test & Set with Exponential Backoff • Queue Locks

  4. … Synchronization Algorithms • Passive Fetch & Op Algorithm • Lock-based Fetch & Op • Software Combining Tree

  5. Problems • Variation in performance at different contention levels… • Spin Locks • Low Contention • Test & Set with Exponential Back off • High Contention • MCS Queue Lock

  6. … Problems • Variation in performance at different contention levels… • Fetch and Op • Low Contention • Test & Test & Set Lock • High Contention • Software Combining Tree

  7. Need.. Justifies .. Solution • Solution for synchronization • Select Protocol Dynamically… • How to detect? • How to change the protocol? • When to switch the protocol?

  8. Reactive synchronization Algorithm • Synchronization Algorithm • Protocol Selection Algorithm • Selects the appropriate protocol • Waiting Algorithm • Selects the mechanism to wait for synchronization

  9. Algorithm Building • Main Difficulty lies in Multiple Processes • Processes with “correct” protocol should be preferred • Assumption : Contention levels are “fairly” constant • Contention time is highly architecture dependent • Switching policy will be Architecture optimized

  10. Reactive Spin Lock • A combination of Test-Test-Set Lock + MCS Queue Lock • Mode Variable determines which protocol to use. • Protocol Detection Scheme • Cached-mode variable which provides hints of level of contention

  11. Reactive Spin Lock • Protocol Change • Lock holders can update the mode variable i.e., effectively change protocols • When to change • Level of lock contention crosses a threshold switch to the Queue Lock • The queue is empty switch to the TTS Lock

  12. Reactive Spin Lock • Consensus Object • Unique for each protocol (valid or invalid) ensures single protocol. • Complete the execution of the protocol. • State is modified only by the process having consensus object.

  13. Reactive Fetch & Op • Mode variable selecting between • Test-Test-Set and Lock • Queue Lock • Software Combining Tree • Only one consensus object is valid • Process with consensus object is allowed to change the protocol.

  14. Reactive Fetch & Op • Queue gives a good estimate of contention level if high switch to Combining Tree. • If number the number of successive Fetch & Op reach the root without combining switch to TTS-Lock.

  15. Message Passing Protocols • Most Shared Memory on top of Message Passing Machines • Use Message Passing Combining Tree • Message Passing Queue Lock

  16. Applications Tested • Gamteb • Traveling Sales Man Problem • Adaptive Quadrature (AQ) • MP3D • Cholesky

  17. Performance Spin Lock Algorithms

  18. Performance Fetch “&” Op Algorithms

  19. Performance Variations in Contention

  20. Performance Variations in Contention

  21. Conclusions • Proved that managing different protocols is not prohibitive • Efficient Selection of protocols through consensus object • Performance modest for Spin Locks and significant for Fetch & Op For source listings: ftp://hing.lcs.mit.edu

More Related