Parallel and high-performance computing

A producer-consumer queue has capacity N. Which semaphore arrangement is suitable for tracking available queue slots and items, assuming a separate mutex protects queue updates?