Producer and consumer simulation