This is my algorithm for the problem of the producers and consumers using Threads in Java language!!
All code logic here was implemented using synchronized code blocks and some simple Data Structures like Queues, and without the use of Semaphore!
All code implemented here was made by myself just for learning reasons and it can be very improved!!
I've just made an simple implementation, be free to improve by it yourself ;)