Click here to load reader

Reactive Synchronization Algorithms for Multiprocessors

  • View
    20

  • Download
    0

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Text of Reactive Synchronization Algorithms for Multiprocessors

  • Reactive Synchronization Algorithms for MultiprocessorsBeng-Hong Lim and Anant AgarwalLaboratory of Computer ScienceMassachusetts Institute of Technology

    Zahid IrfanDepartment of Computer ScienceLahore University of Management Sciences1st February 2003

  • IntroductionMultiprocessors Alewife Shared memory Multiprocessor SynchronizationShared Memory ProtocolsMessage Passing ProtocolsReactive Synchronization AlgorithmsDynamically select the protocol

  • Synchronizations Algorithms Passive Spin-Lock AlgorithmsTest & Set with Exponential BackoffQueue Locks

  • Synchronization AlgorithmsPassive Fetch & Op AlgorithmLock-based Fetch & OpSoftware Combining Tree

  • ProblemsVariation in performance at different contention levelsSpin Locks Low Contention Test & Set with Exponential Back offHigh ContentionMCS Queue Lock

  • ProblemsVariation in performance at different contention levelsFetch and OpLow Contention Test & Test & Set LockHigh ContentionSoftware Combining Tree

  • Need.. Justifies .. SolutionSolution for synchronizationSelect Protocol Dynamically How to detect?How to change the protocol?When to switch the protocol?

  • Reactive synchronization AlgorithmSynchronization AlgorithmProtocol Selection AlgorithmSelects the appropriate protocolWaiting AlgorithmSelects the mechanism to wait for synchronization

  • Algorithm BuildingMain Difficulty lies in Multiple ProcessesProcesses with correct protocol should be preferredAssumption : Contention levels are fairly constantContention time is highly architecture dependentSwitching policy will be Architecture optimized

  • Reactive Spin LockA combination of Test-Test-Set Lock + MCS Queue LockMode Variable determines which protocol to use.Protocol Detection SchemeCached-mode variable which provides hints of level of contention

  • Reactive Spin LockProtocol ChangeLock holders can update the mode variable i.e., effectively change protocolsWhen to change Level of lock contention crosses a threshold switch to the Queue LockThe queue is empty switch to the TTS Lock

  • Reactive Spin Lock Consensus ObjectUnique 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.

  • Reactive Fetch & OpMode variable selecting betweenTest-Test-Set and LockQueue LockSoftware Combining TreeOnly one consensus object is validProcess with consensus object is allowed to change the protocol.

  • Reactive Fetch & OpQueue 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.

  • Message Passing ProtocolsMost Shared Memory on top of Message Passing MachinesUse Message Passing Combining Tree Message Passing Queue Lock

  • Applications TestedGamtebTraveling Sales Man ProblemAdaptive Quadrature (AQ)MP3DCholesky

  • PerformanceSpin Lock Algorithms

  • PerformanceFetch & Op Algorithms

  • PerformanceVariations in Contention

  • PerformanceVariations in Contention

  • ConclusionsProved that managing different protocols is not prohibitiveEfficient Selection of protocols through consensus objectPerformance modest for Spin Locks and significant for Fetch & Op

    For source listings: ftp://hing.lcs.mit.edu