Create conicts later which write was rst used in

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: /Reduce, … GFS • A GFS cluster – A single master – Many chunkservers • Accessed by many clients • A file – Divided into fixed- sized chunks (similar to FS blocks) • Labeled with 64- bit unique global IDs (called handles) • Stored at chunkservers • 3- way replicated across chunkservers • Master keeps track of metadata (e.g., which chunks belong to which files) GFS Consistency Models •  Replicated data a huge theme in distributed systems •  For performance and fault tolerance •  Oven easier to replicate data than computa\on –  Caches in NFS •  Involves sophis\cated op\miza\ons for performance •  How do we know it is correct? Distributed Shared Memory •  (Reminder) Two models for communica\on in distributed systems: –  message passing –  shared memory •  Shared memory is oven thought more intui\ve to write parallel programs than message passing •  Each node can access a common address space. Naïve DSM •  Assume each host has a local copy of all of memory •  Reads are local, so they are very fast •  Send write msg to each other host –  But don't wait Naïve DSM – Example 1 •  Simple mutual exclusion algorithm, for locking. •  x and y start as zero on both CPUs •  Intui\ve explana\on for why this should "work": –  If CPU0 sees y == 0, CPU1 can't have reached "y = 1", –  so CPU1 must see x == 1, so it won't execute cri\cal sec\on. •  Perhaps neither will enter, but never both •  CPU 0: x = 1; if (y == 0) enter_cs(); •  CPU 1: y = 1; if ( x == 0) enter_cs(); Problems 1 Maybe both will enter CS CPU0 sends write x=1 msg, reads local y=0 CPU1 reads local x=0 before write msg arrives Local memory and slow writes cause disagreement about r/w order •  CPU0 thinks its x=1 was before CPU1's read of x •  CPU1 thinks its read of x was before arrival of x=1 so both can enter the cri\cal sec\on! •  •  •  •  Naïve DSM – Example 2 •  CPU0: v0 = f0(); done0 = true; •  CPU1: while(!done0) ; v1 = f1(v0); done1 = true; •  CPU2: while(!done1) ; v2 = f2(v0, v1); •  CPU2 should execute f2() with results from CPU0 and CPU1 •  Wai\ng for CPU1 implies wai\ng for CPU0 Problem 2...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online