Round robin is simply an algorithm that lets you share resources among multiple servers/devices. By studying the code provided, while it isn't exactly what you want, it is a demonstration of the algorithm, and is definitely a huge step in accomplishing your task. In fact, I'm sure it could easily be modified to switch from RAM and CPU to ports. No one here is going to flat out do your work for you. But what we have for you is a round robin algorithm and even in the same language you are looking for. What more could you ask for? ;) Remember, the first step is understanding the theory behind the algorithm, itself (how it works, why it works that way, what it does, etc.) The second step has been provided to you - read up and see how the algorithm could be implemented. Step three, implement it to your own specifications using the guideline provided to you.