SlideShare una empresa de Scribd logo
1 de 61
Chapter 7:  Process Synchronization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Background ,[object Object],[object Object],[object Object],[object Object]
Bounded-Buffer  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bounded-Buffer  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bounded-Buffer  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bounded Buffer ,[object Object],[object Object]
Bounded Buffer ,[object Object],[object Object],[object Object]
Bounded Buffer ,[object Object],[object Object]
Bounded Buffer ,[object Object],[object Object]
Race Condition ,[object Object],[object Object]
The Critical-Section Problem ,[object Object],[object Object],[object Object]
Solution to Critical-Section Problem ,[object Object],[object Object],[object Object],[object Object],[object Object]
Initial Attempts to Solve Problem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Algorithm 1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Algorithm 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Algorithm 3 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bakery Algorithm ,[object Object],[object Object],[object Object],Critical section for n processes
Bakery Algorithm  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bakery Algorithm  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Synchronization Hardware ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mutual Exclusion with Test-and-Set ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Synchronization Hardware  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mutual Exclusion with Swap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Semaphores ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Critical Section of  n  Processes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Semaphore Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Semaphore as a General Synchronization Tool ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Deadlock and Starvation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Two Types of Semaphores ,[object Object],[object Object],[object Object]
Implementing  S  as a Binary Semaphore ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implementing  S ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Classical Problems of Synchronization ,[object Object],[object Object],[object Object]
Bounded-Buffer Problem ,[object Object]
Bounded-Buffer Problem Producer Process ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bounded-Buffer Problem Consumer Process ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Readers-Writers Problem ,[object Object]
Readers-Writers Problem Writer Process ,[object Object],[object Object],[object Object],[object Object],[object Object]
Readers-Writers Problem Reader Process ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dining-Philosophers Problem ,[object Object],[object Object],[object Object]
Dining-Philosophers Problem  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Critical Regions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Critical Regions ,[object Object],[object Object]
Example – Bounded Buffer ,[object Object],[object Object],[object Object],[object Object],[object Object]
Bounded Buffer Producer Process ,[object Object],[object Object]
Bounded Buffer Consumer Process ,[object Object],[object Object]
Implementation region  x  when  B  do  S ,[object Object],[object Object],[object Object],[object Object]
Implementation ,[object Object],[object Object],[object Object]
Monitors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Schematic View of a Monitor
Monitor With Condition Variables
Dining Philosophers Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dining Philosophers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dining Philosophers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitor Implementation Using Semaphores ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitor Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitor Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitor Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Solaris 2 Synchronization ,[object Object],[object Object],[object Object],[object Object]
Windows 2000 Synchronization ,[object Object],[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
Wayne Jones Jnr
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
anandammca
 

La actualidad más candente (20)

6 Synchronisation
6 Synchronisation6 Synchronisation
6 Synchronisation
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
 
Mutual exclusion
Mutual exclusionMutual exclusion
Mutual exclusion
 
Semaphores OS Basics
Semaphores OS BasicsSemaphores OS Basics
Semaphores OS Basics
 
Os3
Os3Os3
Os3
 
Critical Section Problem - Ramakrishna Reddy Bijjam
Critical Section Problem - Ramakrishna Reddy BijjamCritical Section Problem - Ramakrishna Reddy Bijjam
Critical Section Problem - Ramakrishna Reddy Bijjam
 
Bakery algorithm
Bakery algorithmBakery algorithm
Bakery algorithm
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
 
Os module 2 c
Os module 2 cOs module 2 c
Os module 2 c
 
Monitors
MonitorsMonitors
Monitors
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvin
 
Bakery algorithm in operating system
Bakery algorithm in operating systemBakery algorithm in operating system
Bakery algorithm in operating system
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
ITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded bufferITFT_Semaphores and bounded buffer
ITFT_Semaphores and bounded buffer
 
Operating System-Ch6 process synchronization
Operating System-Ch6 process synchronizationOperating System-Ch6 process synchronization
Operating System-Ch6 process synchronization
 
VHDL Behavioral Description
VHDL Behavioral DescriptionVHDL Behavioral Description
VHDL Behavioral Description
 

Similar a OS_Ch7

Process Synchronization -1.ppt
Process Synchronization -1.pptProcess Synchronization -1.ppt
Process Synchronization -1.ppt
jayverma27
 
Galvin-operating System(Ch7)
Galvin-operating System(Ch7)Galvin-operating System(Ch7)
Galvin-operating System(Ch7)
dsuyal1
 
Os2 2
Os2 2Os2 2
Os2 2
issbp
 

Similar a OS_Ch7 (20)

CH05.pdf
CH05.pdfCH05.pdf
CH05.pdf
 
OS Process synchronization Unit3 synchronization
OS Process synchronization Unit3  synchronizationOS Process synchronization Unit3  synchronization
OS Process synchronization Unit3 synchronization
 
Operating System
Operating SystemOperating System
Operating System
 
U3-PPT-1 (1).ppt
U3-PPT-1 (1).pptU3-PPT-1 (1).ppt
U3-PPT-1 (1).ppt
 
Synchronization in os.pptx
Synchronization in os.pptxSynchronization in os.pptx
Synchronization in os.pptx
 
Lecture16-17.ppt
Lecture16-17.pptLecture16-17.ppt
Lecture16-17.ppt
 
Process Synchronization -1.ppt
Process Synchronization -1.pptProcess Synchronization -1.ppt
Process Synchronization -1.ppt
 
Ch7: Process Synchronization
Ch7: Process SynchronizationCh7: Process Synchronization
Ch7: Process Synchronization
 
Os2
Os2Os2
Os2
 
Galvin-operating System(Ch7)
Galvin-operating System(Ch7)Galvin-operating System(Ch7)
Galvin-operating System(Ch7)
 
Lecture_6_Process.ppt
Lecture_6_Process.pptLecture_6_Process.ppt
Lecture_6_Process.ppt
 
Slides for OS 06-Sync.pdf
Slides for OS 06-Sync.pdfSlides for OS 06-Sync.pdf
Slides for OS 06-Sync.pdf
 
Mca ii os u-2 process management & communication
Mca  ii  os u-2 process management & communicationMca  ii  os u-2 process management & communication
Mca ii os u-2 process management & communication
 
ALGO.ppt
ALGO.pptALGO.ppt
ALGO.ppt
 
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and AlgorithmsCP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
 
Os2 2
Os2 2Os2 2
Os2 2
 
Ch7
Ch7Ch7
Ch7
 
MCRL2
MCRL2MCRL2
MCRL2
 
14- Process Synchronization.pptx
14- Process Synchronization.pptx14- Process Synchronization.pptx
14- Process Synchronization.pptx
 
Code Tuning
Code TuningCode Tuning
Code Tuning
 

Más de Supriya Shrivastava (20)

OS_Ch17
OS_Ch17OS_Ch17
OS_Ch17
 
OS_Ch18
OS_Ch18OS_Ch18
OS_Ch18
 
OS_Ch19
OS_Ch19OS_Ch19
OS_Ch19
 
OS_Ch15
OS_Ch15OS_Ch15
OS_Ch15
 
OS_Ch16
OS_Ch16OS_Ch16
OS_Ch16
 
OS_Ch14
OS_Ch14OS_Ch14
OS_Ch14
 
OS_Ch13
OS_Ch13OS_Ch13
OS_Ch13
 
OS_Ch12
OS_Ch12OS_Ch12
OS_Ch12
 
OS_Ch11
OS_Ch11OS_Ch11
OS_Ch11
 
OS_Ch10
OS_Ch10OS_Ch10
OS_Ch10
 
OS_Ch9
OS_Ch9OS_Ch9
OS_Ch9
 
OS_Ch8
OS_Ch8OS_Ch8
OS_Ch8
 
OS_Ch6
OS_Ch6OS_Ch6
OS_Ch6
 
OS_Ch21
OS_Ch21OS_Ch21
OS_Ch21
 
OS_Ch20
OS_Ch20OS_Ch20
OS_Ch20
 
OS_Ch3
OS_Ch3OS_Ch3
OS_Ch3
 
OS_Ch4
OS_Ch4OS_Ch4
OS_Ch4
 
OS_Ch2
OS_Ch2OS_Ch2
OS_Ch2
 
OS_Ch1
OS_Ch1OS_Ch1
OS_Ch1
 
OS_Ch5
OS_Ch5OS_Ch5
OS_Ch5
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

OS_Ch7

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Schematic View of a Monitor
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.