Prezentace se nahrává, počkejte prosím

Prezentace se nahrává, počkejte prosím

Semaphores (Avoiding Train Wrecks) Kevin O’Gorman CS 170 22 April 2002.

Podobné prezentace


Prezentace na téma: "Semaphores (Avoiding Train Wrecks) Kevin O’Gorman CS 170 22 April 2002."— Transkript prezentace:

1 Semaphores (Avoiding Train Wrecks) Kevin O’Gorman CS April 2002

2 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

3 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

4 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

5 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

6 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

7 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = -1

8 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = -1

9 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = -1

10 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

11 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

12 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

13 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

14 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

15 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

16 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

17 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

18 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. Success!

19 (continued…)

20 Semaphores Re-Run

21 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

22 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

23 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

24 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

25 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

26 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

27 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

28 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 1

29 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 1

30 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 1

31 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 1

32 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 1

33 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

34 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

35 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

36 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. sem = 0

37 Signalling. A1 statement A2 sem.signal(). B1 sem.wait() B2 statement. Success!

38


Stáhnout ppt "Semaphores (Avoiding Train Wrecks) Kevin O’Gorman CS 170 22 April 2002."

Podobné prezentace


Reklamy Google