synchronization methods for multicore programming
Download
Skip this Video
Download Presentation
Synchronization Methods for Multicore Programming

Loading in 2 Seconds...

play fullscreen
1 / 11

Synchronization Methods for Multicore Programming - PowerPoint PPT Presentation


  • 61 Views
  • Uploaded on

Synchronization Methods for Multicore Programming. Brendan Lynch. Introduction. Synchronization techniques l ocks, barriers, non-blocking approaches, atomic primitives Concurrent memory paradigms s hared memory, d istributed memory Safety concerns and guarantees

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Synchronization Methods for Multicore Programming' - rana-langley


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction
Introduction
  • Synchronization techniques
    • locks, barriers, non-blocking approaches, atomic primitives
  • Concurrent memory paradigms
    • shared memory, distributed memory
  • Safety concerns and guarantees
    • Mutual exclusion, deadlock, livelock, starvation, race conditions, priority inversion
synchronization in the cloud
Synchronization in the Cloud
  • Granularity of synchronization plays a major roll in parallel performance. Modeling the concurrency of a program allows the user to decide on correct granularity.
  • Cloud computing relies on a classic distributed memory paradigm.
    • Memory updates in the cloud are very expensive
synchronization in the cloud1
Synchronization in the Cloud
  • Local parallel code should always be optimized for concurrency.
  • Coarse grain locks provide necessary data synchronization
    • Design emphasis on reliability and not performance
chubby locks
Chubby Locks
  • Relies on a locking file system as well as paxos algorithm master election.
    • These combined give users the illusion of sequential programming
  • System scales well with development
    • ‘Young’ systems do not plan for consensus protocol
  • Maintaining a small file system allows for local small read/write.
    • Commonly used for synchronizing events with high polling.
zookeeper
Zookeeper
  • Used by Amazon Simple Queue Service
    • Claims wait free synchronization through operation linearizability
    • Coordination kernel allows users to program their own primitive operations. This is important for application specific synchronization requirements.
  • Zookeeper has two basic ordering guarantees
    • Linearizable writes and FIFO client order
zookeeper1
Zookeeper
  • Linearizable writes: all requests that update the state of ZooKeeper are serializable and respect precedence
  • FIFO client ordering: all requests from a given client are executed in the order that they were sent by the client.
  • Locks and other primitives can be easily built in to the system. Blocking primitives will down-grade offered guarantees; except for the two mentioned above.
zookeeper2
Zookeeper
  • Zab uses by default simple majority quorums to decide on a proposal, so Zab and thus ZooKeeper can only work if a majority of servers are correct (i.e., with 2f + 1 server we can tolerate f failures).
read write register example

write(2)

write(1)

Read/Write Register Example

linearizable

write(0)

write(2)

read(1)

write(1)

time

time

(4)

Art of Multiprocessor Programming

read write register example1

write(2)

write(1)

Read/Write Register Example

Not

linearizable

write(0)

read(1)

write(2)

read(2)

write(1)

time

time

(2)

Art of Multiprocessor Programming

references
References
  • Mike Burrows, The Chubby lock service for loosely-coupled distributed systems, Proceedings of the 7th symposium on Operating systems design and implementation, November 06-08, 2006, Seattle, Washington
  • Maurice Herlihy and NirShavit. The Art of Multiprocessor Programming. Morgan Kaufmann, March 2008.
  • P. Hunt, M. Konar, F. P. Junqueira, and B. Reed, "ZooKeeper: wait-free coordination for internet-scale systems," in USENIXATC\'10: Proceedings of the 2010 USENIX conference on USENIX annual technical conference. Berkeley, CA, USA: USENIX Association, 2010, pp. 11-11. 
ad