4. Buffer management
mind Mapping
What is a buffer
Buffer function
Single buffer
How long does it take to calculate the average processing time for each piece of data?
1. T>C
2. T<C
3. Conclusion
Double buffering
1. T>C+M
2. T<C+M
3. Conclusion:
Circular buffer
Buffer pool
Essentially, the buffers are put together, and the buffers are classified according to the type of request
1. The input process requests input data
Empty------hin-------Enter the end of the queue
2. The calculation process wants to obtain a piece of input data
Full------sin------empty tail
3. The calculation process wants to flush the prepared data into the buffer
Empty------hout-------output tail
4. The output process requests output data
Full-------sout------empty