busy
and a sorted container free
.count
to record the workload of each server.free
.busy
to move servers that have finished their tasks to free
.
b. If free
is empty, drop the request.
c. Otherwise, use binary search on free
to find the correct server.
d. Assign the request, update the server's workload, and move the server to busy
.