HELP! Anyone can give me example ?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top