Presentation is loading. Please wait.

Presentation is loading. Please wait.

Map-Reduce Input: a collection of scientific articles on different topics, each marked with a field of science –Mathematics, Computer Science, Biology,

Similar presentations


Presentation on theme: "Map-Reduce Input: a collection of scientific articles on different topics, each marked with a field of science –Mathematics, Computer Science, Biology,"— Presentation transcript:

1 Map-Reduce Input: a collection of scientific articles on different topics, each marked with a field of science –Mathematics, Computer Science, Biology, Chemistry, Geology, etc. Output: the field of science where the longest word occurs (in all the articles)‏ –Nicotinamideadeninedinucleotidephosphate

2 Answer: First round –map(field,paper)‏ –reduce(field, {longest words in each paper})‏ Second round (distributed sort)‏ –map(field, longest word)‏ –reduce(word size, field)‏ Do nothing

3 מבוא נתונים 4 תהליכים בלתי תלויים שרוצים להריץ על מחשב עם מעבד אחד (שיכול להריץ רק חוט אחד בו-זמנית). ביצוע סדרתי מריץ את התהליכים אחד אחרי השני. ביצוע "מקבילי" מריץ את כל התהליכים בו-זמנית. ה-speedup של הביצוע "המקבילי" ביחס לביצוע סדרתי בהכרח: –גדול או שווה ל-1 –קטן או שווה ל-1 –אין שינוי בזמן ריצה –לא ניתן לדעת

4 Answer לא ניתן לדעת The reason is that the run can be faster ( because of better caching, for example)‏ And can be slower ( because of context switches)‏ And can be the same

5 BSP איזו מההנחות הבאות אינה הנחה של מודל BSP? 1.לכל המעבדים כמות זיכרון זהה 2.כל המעבדים בעלי יכולת חישוב (מהירות) זהה 3.רשת תקשורת שמאפשרת יחס h (h-relation) כלשהו 4.רשת תקשורת בעלת רוחב פס וזמן תגובה (latency) זהים בכל כיוון

6 Answer BSP doesn't assume anything about the memory It does assume same CPU speed It does assume that h-relation is possible It does assume homogeneous communcations

7 Race Detection נתון הקוד הבא: B1 = FALSE, B2 = FALSE Thread 1Thread 2 X++IF (B2 == TRUE)‏ B1 = TRUEIF (B1 == TRUE)‏ B2 = TRUEX-- כמה Apparent data-races יש בקוד? 3 כמה Feasible data-races יש בו? 1

8 Answer Feasible data races are also apparent, but not vice versa So there is only one feasible (semantically possible) data race for B2 (written and read simultaneously by t1 and t2 There are 3 apparent data races (B2, B1, X), since they are not protected by any lock

9 Race Detection באלגוריתם Djit שבודק תכנית בעלת n חוטים באורך r גישות לזיכרון (כל חוט) והניגשת ל-s משתנים (כל חוט) ב-t מסגרות זמן (לכל החוטים אותו מספר t ), גודל היסטורית הגישות לכל משתנה הוא (גודל במילות מחשב)‏ 1.nrts 2.2nrts 3.2nrt 4.2nr 5.2n


Download ppt "Map-Reduce Input: a collection of scientific articles on different topics, each marked with a field of science –Mathematics, Computer Science, Biology,"

Similar presentations


Ads by Google