process synchronization from critical section to monitor.pptx
ssmietpremalatha
8 views
24 slides
Mar 10, 2025
Slide 1 of 24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
About This Presentation
process synchronization
Size: 6.56 MB
Language: en
Added: Mar 10, 2025
Slides: 24 pages
Slide Content
Process synchronization
Cooperating process P1 P2 P3 Data inconsistency P4 Data Bounded-Buffer : orderly execution of cooperating process
Common Integer count Initially count=0 If producerproducesbuffer count=count+1 If consumer <-- consumes <-- buffer count=count-1
Critical section
Peterson’s Solution (provides algorithm with machine level language) LOAD and STORE (no simultaneous execution) Two process share 2 variable turn and flag If turn= i Pi enters CS Flag[ i ]=true Pi is ready