Producer/Consumer Pipes
network
file/cache
manager
char inbuffer[1024];
char outbuffer[1024];
while (inbytes != 0) {
inbytes = input->read(inbuffer, 1024);
outbytes = process data from inbuffer to outbuffer;
output->write(outbuffer, outbytes);
}
This example illustrates one important use of the producer/consumer bounded buffer in Lab #3.
Previous slide
Next slide
Back to first slide
View graphic version