MCP-S11-08 - LECTURE 8 SYNCHRONIZED DATA STRUCTURES NYU...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LECTURE 8 SYNCHRONIZED DATA STRUCTURES NYU Multicore Programming Class, Spring 2011 lerner@cs.nyu.edu 1 OS HW application concurrency support Were going to look at how to create more higher level synchronized data structures Context 2 NYU Multicore Programming, Spring 2011 Concurrent manipulation of ordered lists A Lock-free hash table Ordered concurrent accesses with Skiplists Todays agenda 3 NYU Multicore Programming, Spring 2011 Overall idea: build more complex data structures using synchronized lists But wed like a finer grained lock than the whole list Whats so hard about concurrent operations over lists? Ordered lists as a basic building block 4 NYU Multicore Programming, Spring 2011 Nave approach: lock the node wed like to delete Concurrent deletion of b and insertion of c list a b d c Concurrent deletion/insertion 5 NYU Multicore Programming, Spring 2011 a b d c Wrong! Hazardous deletion/deletion as well Fine grained locking (with coupling) Lock-free Basic approaches 6 NYU Multicore Programming, Spring 2011 Lock coupling: needs lock on both current and previous nodes list a b d c list a b d c Synchronizing operations with locks 7 NYU Multicore Programming, Spring 2011 locks for b deletion locks for c insertion Can we achieve it in a lock-free way? b d c prev cur loop if find(list, key) return false // sets prev,cur...
View Full Document

Page1 / 18

MCP-S11-08 - LECTURE 8 SYNCHRONIZED DATA STRUCTURES NYU...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online