While,B:=,0,true while,B:=,1,true N:=,B:=,0,true P1 N:=,B:=,1,true P1 while,end,0,false end,end,0,false P1 N:=,end,0,false P2 while,end,1,false end,end,1,false.

Slides:



Advertisements
Similar presentations
The Important Thing About By. The Important Thing About ******** The important thing about ***** is *****. It is true s/he can *****, *****, and *****.
Advertisements

Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
תרשים מצבים - התהליכים P2: wait(S); signal(S); Q; P1: signal(S); wait(S); A;
מבוא למדעי המחשב לתעשייה וניהול
1 Formal Specifications for Complex Systems (236368) Tutorial #4 Refinement in Z: data refinement; operations refinement; their combinations.
Map-Reduce Input: a collection of scientific articles on different topics, each marked with a field of science –Mathematics, Computer Science, Biology,
מערכות הפעלה ( אביב 2004) חגית עטיה © 1 תיאום בין תהליכים : יסודות  דוגמאות לבעיות תיאום  הגדרות : קטע קריטי, מנעולים  אלגוריתם קופת - חולים.
Enforcing Mutual Exclusion Message Passing. Peterson’s Algorithm for Processes P0 and P1 void P0() { while( true ) { flag[ 0 ] = false; /* remainder */
דוד שוורץ, עידן זק, נטע צור וחיה כהן. הפונקציונאליות : המשתמש יבחר קובץ שעליו הוא רוצה לבצע את האנליזה, וילחץ עליו עם כפתור ימני בעכבר. יפתח תפריט ובו.
Section 4.2: Functions that Test Conditions (continued)
אביב תשס " ה JCT תיכון תוכנה ד " ר ר ' גלנט / י ' לויאןכל הזכויות שמורות 1 פרק 10 Packages.
משטר דינמי המשך – © Dima Elenbogen :55 חידה שכדאי לעבור עליה: 2011/ho/WCFiles/%D7%97%D7%99%D7%93%D7%94%20%D7%A2%D7%9D%20%D7%91%D7%95%D7%A0%D7%95%D7%A1.doc.
חורף - תשס " ג DBMS, Design1 שימור תלויות אינטואיציה : כל תלות פונקציונלית שהתקיימה בסכמה המקורית מתקיימת גם בסכמה המפורקת. מטרה : כאשר מעדכנים.
Map-Reduce Input: a collection of scientific articles on different topics, each marked with a field of science –Mathematics, Computer Science, Biology,
1 Data Structures, CS, TAU, Splay Tree Splay Tree  מימוש של עץ חיפוש בינארי  מטרה לדאוג ל- Amortized Time  פעולה בודדת יכולה לקחת O(N)  אבל כל רצף.
Poster Title 95 point, Arial font Primary heading Xx xxx x xx xxxxx xx xxxx xxx xx xx x x xxxxx xxxx xx xxxxx xx xxxxxx xxx xx. X xx xxxx xxxxx xx xxxx.
1 Formal Specifications for Complex Systems (236368) Tutorial #5 Refinement in Z: data refinement; operations refinement; their combinations.
Data Structures, CS, TAU, Splay Tree 1 Splay Tree - עץ חיפוש בינארי - מטרה לדאוג ל - Amortized Time - פעולה בודדת יכולה לקחת O(N) - אבל כל רצף M פעולות.
1 Reader-writer Problem w/ Additional Requirement I Reader-writer problem: Share a buffer which holds one item (an integer) A single reader and writer.
תזכורת: גרפים גרף (G=(V,E V|=n, |E|=m| מכוון \ לא מכוון דרגה של קדקד
מוסכמות קריאה לשגרה ב- Assembly מיון מערך (merge sort)
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 16, Monday, October 6.
תהליכים  מהו תהליך ?  מבני הנתונים לניהול תהליכים.  החלפת הקשר.  ניהול תהליכים ע " י מערכת ההפעלה.
Multi-Cycle MIPS דוגמאות. דוגמה 1 נתון קטע הקוד הבא: begin:addi $v0, $zero, -1 loop:add $a0, $a0, $a0 addi$v0,$v0,1 bne $a0, $zero, loop הניחו כי בתחילת.
A. Frank File Organization Various Parameter Issues.
Registers and Counters
Tutorials #4-#5 Controller + DataPath design – © Yohai Devir 2007 Technion - IIT.
יחס סדר חלקי.
1 Formal Specifications for Complex Systems (236368) Tirgul Hazara.
תיאום בין תהליכים : יסודות  דוגמאות לבעיות תיאום  הגדרות : קטע קריטי, מנעולים  אלגוריתם קופת - חולים.
מבוא למדעי המחשב, סמסטר א ', תשע " א תרגול מס ' 1 נושאים  הכרת הקורס  פסאודו - קוד / אלגוריתם 1.
Data Structures, CS, TAU, RB-Tree 1 עץ אדום-שחור - עץ חיפוש בינארי - בכל צומת ביט אינפורמציה נוסף - צבע « עץ “ כמעט מאוזן ” « (O(log n במקרה גרוע ביותר.
Selection Sort
A. Frank File Organization Hardware Size Parameters.
Generalized De Morgan’s Theorem Lecture L5.4 Section 5.1.
Multiples of 6 BY Andrew & Wil.
MULTIPLES OF 2 By Preston, Lincoln and Blake. 2 X 1 =2 XX 2X1=2 1+1=2.
Lesson #3- Exponent Laws
Section 8.1.  Exponents are a short hand way to write multiplication  Examples: 4 ·4 = 4 2 4·4·4 = 4 3 4·4·x·x·x= 4 2 x 3 = 16 x 3.
Divide by 8 page – groups of 8 Division Sentence 0 ÷ 8 = 0.
TABLES AND VALUES Section 1.5. Open Sentence Equation.
מבוא למדעי המחשב הרצאה 11: תכנות רקורסיבי 4 כולל מיון רקורסיבי 1.
מבוא למדעי המחשב לתעשייה וניהול הרצאה 7. סברוטינות subroutines.
Selection Sort
Contents Building Web Services כתב אקת'ם חאג' יחיא BuildingWeb Services Building Web Services
6.1 - Polynomials. Monomial Monomial – 1 term Monomial – 1 term; a variable.
מבוא למדעי המחשב לתעשייה וניהול הרצאה 12. ספריות.
מבוא למדעי המחשב לתעשייה וניהול הרצאה 6. מפעל השעווה – לולאות  עד עכשיו  טיפלנו בייצור נרות מסוג אחד, במחיר אחיד  למדנו להתמודד עם טיפול במקרים שונים.
Merge Sort Comparison Left Half Data Movement Right Half Sorted.
אביב תשס " ה JCT תיכון תוכנה ד " ר ר ' גלנט / י ' לויאןכל הזכויות שמורות 1 פרק 5 תרשימי מצבים Statecharts למחלקות תגובתיות Reactive Classes הקדמה ודוגמא.
Exercise 1 Oral Examples.
Logic Gates.
מבוא למדעי המחשב לתעשייה וניהול
Component D: Data Collection in Field Surveys
פקודות data לסדר את המקרים לפי סדר מסויים Sort cases.
البرمجة بلغة الفيجول بيسك ستوديو
Data Structures, CS, TAU, Splay Tree
Gamma Theta Upsilon Recent GTU Initiates
פרק רביעי – תקשורת בין תהליכים פנימיים
While (lock = 1) wait Lock = 1 Lock = 0 While (lock = 1) wait Lock = 1 Lock = 0.
CIS 720 Mutual Exclusion 2.
הודעות ריענון מהיר והרחבות מערכים וגבולות הלולאה המשך
Signal Conditioning.
SECTION 2-4 : SOLVING EQUATIONS WITH THE VARIABLE ON BOTH SIDES
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
CIS 720 Mutual Exclusion 2.
True or False True or False
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
RANDOM NUMBERS SET # 1:
Exercise (6).
Presentation transcript:

while,B:=,0,true while,B:=,1,true N:=,B:=,0,true P1 N:=,B:=,1,true P1 while,end,0,false end,end,0,false P1 N:=,end,0,false P2 while,end,1,false end,end,1,false N:=,end,1,false P1 X X P2 X X X X X X עצירת לולאה עם משתנה בוליאני

while,while,0 sugar:=,while,0while,sugar:=,0 while,while,1 sugar:=,sugar:=,0 end, while,1while,end,1 end,end,1 X ראה המשך בשקף הבא XXX רובוטים ומיץ - חלק א

sugar:=,sugar:=,0 while,sugar:=,1sugar:=,while,1 while,while,2 end,while,2while,end,2 end,end,2 end,sugar:=,1sugar:=,end,1 XXXXXX רובוטים ומיץ - חלק ב

wait,wait,1 signal,wait,0wait,signal,0 signal,block,0block,signal,0 אסור תרשים מצבים לבעיית הק " ק

P1 begin X:=1; signal(S); end; סדר ביצוע טענת נכונות : X:=1 מתבצע לפני Y:=1 בכל מסלול. P2 begin wait(S); Y:=1; end; x:=1, w, 0 s, w, 0 P1 x:=1, B, 0 P2 התרשים הושלם end, w, 1 P1 X X X s, B, 0 P2 end, y:=1, 0 P2 אסור P2 end, end, 0 P2 X אסור P2

s,s,w 1,0 sort1 {sort} signal(S); end; סדר ביצוע : מיון - מיזוג בדוק בכל מסלול שה - end של התהליך merge אינו מופיע לפני ה - end של שני תהליכי sort. sort2 {sort} signal(S); end; merge wait(S); {merge} end; X end,end,w 1,2 s,end,w 2,0 XXX end,s,w 2,0end,end,w 2,1 X end,s,B,0 X אסור end,end,end,0 s,end,B,0 XXXXXXX אסור התרשים הושלם end,s,w 1,1 S1 s,end,w 1,1 S2 s,s,B,0 merge

E:=init(1); יצרן { יצר } wait(E); { הכנס } signal(F); סדר ביצוע הדדי : יצרן - צרכן בדוק ש (s(E ו (s(F מתבצעים לסירוגין על כל מסלול F:=init(0); צרכן wait(F) { הוצא } signal(E); { צרוך } w(E),w(F),E=1,F=0 w(E),w(F),E=0,F=1B,w(F),E=0,F=1B,s(E),E=0,F=0 אסור s(F),B,E=0,F=0w(E),s(E),E=0,F=0 התרשים הושלם w(E),B,E=1,F=0 צרכן s(F),w(F),E=0,F=0 יצרן

P1/P2/P3 while true do wait(S); {critical section} signal(S); s,w,w, w,s,w,0 3 w,w,w,1 1 4 w,w,s,0 s,B,w,0 5 s,w,B,0 6 B,s,w,0 7 w,B,s,0 10 w,s,B,0 8 3 אסור s,B,B,0 11 אסור אסור 2 B,s,B,0 12 אסור 69 4 B,B,s,0 13 אסור B,w,s,0 9 התרשים הושלם קטע קריטי שלושה תהליכים

הרעבה s,w,B,0 6 B,s,B, אסור 4 s,B,B, w,s,B,0 8 9 התרשים הושלם