Producer-Consumer problem using Thread pool
A.M. Abhishek Sai, D Vasavi Reddy, Perumalla Raghavendra, G. Yashwanth Kiran, V R Rejeenth · 2022 3rd International Conference for Emerging Technology (INCET) · 2022
Many server programs perform repetitive operations on a large number of short tasks. As there is a need for the improvement of the efficiency in doing many concurrent processes, thread-pools came into existence to improve the performance of these concurrent servers. The thread-pool-based solution to the producer-consumer problem is discussed in this paper. We used semaphores to prevent multiple processes from accessing the same buffer at the same time. We’ve discussed how the proposed producer-consumer problem plays out in various scenarios. We observed that using thread-pool instead of threads made this model more efficient in terms of time. This paper describes a real-life scenario in which this approach can be employed (Delivery System).