My first thought was: check it out ! Both of your arguments seem reasonable. You must implement both strategies and run tests from which they lead to greater bandwidth.
The problem that you describe in your question is similar to the process that operating systems face. Therefore, it might be useful to use priorities. Use PriorityQueue and assign different priorities to your tasks, which can dynamically change over time, such as Aging .
Last but not least, as mentioned in the comments, you can try as ConcurrentLinkDeque , and let some get front objects and some back objects. Here's also my advice - to try and measure which balancing works best.
source share