Ourfirstquestionfocusesonmain-two-cvs-while.c(thework- ing solution). First, study the code. Do you think you have an un- derstanding of what should happen when you run the program?
Run with one producer and one consumer, and have the producer produce a few values. Start with a buffer (size 1), and then increase it. How does the behavior of the code change with larger buffers? (or does it?) What would you predictnum fullto be with different buffer sizes (e.g.,-m 10) and different numbers of produced items (e.g.,-l 100), when you change the consumer sleep string from default (no sleep) to-C 0,0,0,0,0,0,1?
Ifpossible,runthecodeondifferentsystems(e.g.,aMacandLinux). Do you see different behavior across these systems?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here