SlideShare a Scribd company logo
1 of 14
Presented by:
A P S Subash
B.Tech, II Year.
DEPT. OF COMPUTER SCIENCE AND ENGG.
SWARNANDHRA COLLEGE OF ENGG&TECH
NARSAPUR, ANDHRA PRADESH
 What is producer/consumer problem ?
 Solution for producer/consumer problem.
 What is inter-thread communication ?
 What are wait(), notify() and notifyAll()
 Working of Interthread Communication
 Applications
 Conclusion SUBASH ANDEY
 In computing , the producer–consumer problem is a classic
example of a multi-process synchronization problem.
 Here, the problem describes two threads: one is the producer
and other one is the consumer. These two threads share a
common, fixed-size buffer used as a queue.
 The producer's job is to generate data, put it into the buffer, and
start again. At the same time, the consumer is consuming the
data (i.e., removing it from the buffer), one piece at a time.
 The problem is to make sure that
- The producer won't try to add data into the
buffer if it's full.
- And the consumer won't try to remove data from an
empty buffer.
SUBASH ANDEY
SUBASH ANDEY
 The solution for the producer is to either go to sleep or discard
data if the buffer is full.
The next time the consumer removes an item from the buffer, it
notifies the producer, who starts to fill the buffer again.
 In the same way, the consumer can go to sleep if it finds the buffer to
be empty.
The next time the producer puts data into the buffer, it wakes up the
sleeping consumer.
 The solution can be reached by means of ”Inter-thread
communication”.
 An inadequate solution could result in a deadlock where both threads
are waiting to be awakened.
SUBASH ANDEY
Inter-thread Communication is a mechanism by which
two or more threads communicate smoothly with each
other by way of sending and receiving messages
among them.
Inter-thread Communication is an elegant mechanism
which will be used to solve producer/consumer problem
efficiently through the use of the following methods of
Object class :
(1) wait()
(2) notify()
(3) notifyAll()
SUBASH ANDEY
 wait() tells the calling thread to give up the
monitor and go to sleep until some other
thread enters the same monitor and calls
notify() or notifyAll().
 notify() wakes up a thread that called wait() on
the same object.
 notifyAll() wakes up all the threads that called
wait() on the same object. One of the threads
will be granted access.
SUBASH ANDEY
SUBASH ANDEY
 Producer/Consumer model is used in parallel
computing.
 Producer/Consumer model is key model for threads
programming, especially for the Pool of Threads model.
 It is used for synchronization of concurrently running
processes.
 It is used in real-time critical applications with
multi-Tasking.
SUBASH ANDEY
SUBASH ANDEY
SUBASH ANDEY
This presentation proved programmatically that
the producer/consumer problem can be effectively
solved with the help of Inter-thread
Communication. Inter-thread Communication
successfully solves the problem by ensuring that:
- the producer won't try to add data into the
buffer if it's full.
- and the consumer won't try to remove data
from an empty buffer.
SUBASH ANDEY
SUBASH ANDEY
SUBASH ANDEY

More Related Content

What's hot (20)

Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Java And Multithreading
Java And MultithreadingJava And Multithreading
Java And Multithreading
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVA
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Exception handling
Exception handlingException handling
Exception handling
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVA
 
JVM
JVMJVM
JVM
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
 
Multithreading
Multithreading Multithreading
Multithreading
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Interprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.SInterprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.S
 
Java IO
Java IOJava IO
Java IO
 
Java exception handling
Java exception handlingJava exception handling
Java exception handling
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 

Similar to Producer-Consumer Problem & Inter-thread Communication

Processes, Threads and Scheduler
Processes, Threads and SchedulerProcesses, Threads and Scheduler
Processes, Threads and SchedulerMunazza-Mah-Jabeen
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process CommunicationAdeel Rasheed
 
An Approach Towards Lossless Compression Through Artificial Neural Network Te...
An Approach Towards Lossless Compression Through Artificial Neural Network Te...An Approach Towards Lossless Compression Through Artificial Neural Network Te...
An Approach Towards Lossless Compression Through Artificial Neural Network Te...IJERA Editor
 
Oop2018 tutorial-stal-mo2-io t-arduino-en
Oop2018 tutorial-stal-mo2-io t-arduino-enOop2018 tutorial-stal-mo2-io t-arduino-en
Oop2018 tutorial-stal-mo2-io t-arduino-enMichael Stal
 
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...IJSRD
 
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...IJSRD
 
Inter-Process communication in Operating System.ppt
Inter-Process communication in Operating System.pptInter-Process communication in Operating System.ppt
Inter-Process communication in Operating System.pptNitihyaAshwinC
 
Ontologies Ontop Databases
Ontologies Ontop DatabasesOntologies Ontop Databases
Ontologies Ontop DatabasesMartín Rezk
 
Os sample mid exam
Os sample mid examOs sample mid exam
Os sample mid examMesfin123
 
Eventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introductionEventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introductionMarc Seeger
 
Producer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.pptProducer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.pptossama8
 
Producer consumer.docx
Producer consumer.docxProducer consumer.docx
Producer consumer.docxAbhishek361641
 
Operating System Process Synchronization
Operating System Process SynchronizationOperating System Process Synchronization
Operating System Process SynchronizationHaziq Naeem
 
Name____________________________________________Date______.docx
Name____________________________________________Date______.docxName____________________________________________Date______.docx
Name____________________________________________Date______.docxpauline234567
 
Distributed system notes unit I
Distributed system notes unit IDistributed system notes unit I
Distributed system notes unit INANDINI SHARMA
 
04 threads-pbl-2-slots
04 threads-pbl-2-slots04 threads-pbl-2-slots
04 threads-pbl-2-slotsmha4
 

Similar to Producer-Consumer Problem & Inter-thread Communication (20)

Processes, Threads and Scheduler
Processes, Threads and SchedulerProcesses, Threads and Scheduler
Processes, Threads and Scheduler
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
operating system
operating systemoperating system
operating system
 
Cse307
Cse307Cse307
Cse307
 
Cse307
Cse307Cse307
Cse307
 
An Approach Towards Lossless Compression Through Artificial Neural Network Te...
An Approach Towards Lossless Compression Through Artificial Neural Network Te...An Approach Towards Lossless Compression Through Artificial Neural Network Te...
An Approach Towards Lossless Compression Through Artificial Neural Network Te...
 
Oop2018 tutorial-stal-mo2-io t-arduino-en
Oop2018 tutorial-stal-mo2-io t-arduino-enOop2018 tutorial-stal-mo2-io t-arduino-en
Oop2018 tutorial-stal-mo2-io t-arduino-en
 
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
 
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
 
Inter-Process communication in Operating System.ppt
Inter-Process communication in Operating System.pptInter-Process communication in Operating System.ppt
Inter-Process communication in Operating System.ppt
 
Ontologies Ontop Databases
Ontologies Ontop DatabasesOntologies Ontop Databases
Ontologies Ontop Databases
 
Os sample mid exam
Os sample mid examOs sample mid exam
Os sample mid exam
 
Eventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introductionEventdriven I/O - A hands on introduction
Eventdriven I/O - A hands on introduction
 
Producer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.pptProducer Consumer Problem in C explained.ppt
Producer Consumer Problem in C explained.ppt
 
Producer consumer.docx
Producer consumer.docxProducer consumer.docx
Producer consumer.docx
 
Operating System Process Synchronization
Operating System Process SynchronizationOperating System Process Synchronization
Operating System Process Synchronization
 
Triage Presentation
Triage PresentationTriage Presentation
Triage Presentation
 
Name____________________________________________Date______.docx
Name____________________________________________Date______.docxName____________________________________________Date______.docx
Name____________________________________________Date______.docx
 
Distributed system notes unit I
Distributed system notes unit IDistributed system notes unit I
Distributed system notes unit I
 
04 threads-pbl-2-slots
04 threads-pbl-2-slots04 threads-pbl-2-slots
04 threads-pbl-2-slots
 

Recently uploaded

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 

Recently uploaded (20)

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 

Producer-Consumer Problem & Inter-thread Communication

  • 1. Presented by: A P S Subash B.Tech, II Year. DEPT. OF COMPUTER SCIENCE AND ENGG. SWARNANDHRA COLLEGE OF ENGG&TECH NARSAPUR, ANDHRA PRADESH
  • 2.  What is producer/consumer problem ?  Solution for producer/consumer problem.  What is inter-thread communication ?  What are wait(), notify() and notifyAll()  Working of Interthread Communication  Applications  Conclusion SUBASH ANDEY
  • 3.  In computing , the producer–consumer problem is a classic example of a multi-process synchronization problem.  Here, the problem describes two threads: one is the producer and other one is the consumer. These two threads share a common, fixed-size buffer used as a queue.  The producer's job is to generate data, put it into the buffer, and start again. At the same time, the consumer is consuming the data (i.e., removing it from the buffer), one piece at a time.  The problem is to make sure that - The producer won't try to add data into the buffer if it's full. - And the consumer won't try to remove data from an empty buffer. SUBASH ANDEY
  • 5.  The solution for the producer is to either go to sleep or discard data if the buffer is full. The next time the consumer removes an item from the buffer, it notifies the producer, who starts to fill the buffer again.  In the same way, the consumer can go to sleep if it finds the buffer to be empty. The next time the producer puts data into the buffer, it wakes up the sleeping consumer.  The solution can be reached by means of ”Inter-thread communication”.  An inadequate solution could result in a deadlock where both threads are waiting to be awakened. SUBASH ANDEY
  • 6. Inter-thread Communication is a mechanism by which two or more threads communicate smoothly with each other by way of sending and receiving messages among them. Inter-thread Communication is an elegant mechanism which will be used to solve producer/consumer problem efficiently through the use of the following methods of Object class : (1) wait() (2) notify() (3) notifyAll() SUBASH ANDEY
  • 7.  wait() tells the calling thread to give up the monitor and go to sleep until some other thread enters the same monitor and calls notify() or notifyAll().  notify() wakes up a thread that called wait() on the same object.  notifyAll() wakes up all the threads that called wait() on the same object. One of the threads will be granted access. SUBASH ANDEY
  • 9.  Producer/Consumer model is used in parallel computing.  Producer/Consumer model is key model for threads programming, especially for the Pool of Threads model.  It is used for synchronization of concurrently running processes.  It is used in real-time critical applications with multi-Tasking. SUBASH ANDEY
  • 12. This presentation proved programmatically that the producer/consumer problem can be effectively solved with the help of Inter-thread Communication. Inter-thread Communication successfully solves the problem by ensuring that: - the producer won't try to add data into the buffer if it's full. - and the consumer won't try to remove data from an empty buffer. SUBASH ANDEY