...
Code Block |
---|
Schedule(M,T,X){ while isTokenRecieved() is false // wait 1 sec for another check totalBytes = B // B is the total no. of bytes received in Token target = GetHighestPriorityElement(X) ChangePriority(X) while totalBytes > 0 tool = GetHighestPriorityElement(T) target = GetHighestPriorityElement(X) exec (tool,target) totalBytes = totalbytes - tool.bytesRequired ChangePriority(T) ChangePriority(X) sendToken(NextSite(M,i),B) } |