Problem
Many users search several books at once. Premium users get priority without starving free users.
Design
Each user is a thread and each search fans out across sources. Scheduling splits priority 80/20, concurrency is bounded, and a dedicated thread handles balance top-ups. Synchronisation uses mutexes and condition variables.