Description: a buffer size of 3, initially empty
2 producers
Random waiting for a period of time, adding data to the buffer area.
If the buffer is full, wait for the consumer to pick up the data and add it later.
- repeat 6 times
3 consumers
Randomly waiting for a period of time to read data from the buffer.
If the buffer is empty, wait for producers to add data before reading. repeat 4 times
Display the time of adding and reading data every time and the state of the buffer.
To Search:
File list (Check if you may need any files):
Filename | Size | Date |
---|
pc_lin.c | 4608 | 2018-03-27 |