S
S300
The system has a total of 10 threads. 5 threads are for generating random
integers in the range 0 to 99 in random time intervals from 0 to 10 seconds.
The generated integers are to be put into a buffer which can hold 3
integers. If the buffer is full, then the thread has to wait until a space
is available. The other 5 threads are to get two integers from the buffer.
The buffer is operated in the first in first out basis. The threads then
print the sum of the two integers onto the screen.
integers in the range 0 to 99 in random time intervals from 0 to 10 seconds.
The generated integers are to be put into a buffer which can hold 3
integers. If the buffer is full, then the thread has to wait until a space
is available. The other 5 threads are to get two integers from the buffer.
The buffer is operated in the first in first out basis. The threads then
print the sum of the two integers onto the screen.