Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

1. Execute the tool with highest priority if bytes received in token is greater then bytes required by the tool else execute the second highest priority tool.
2. Set the priority of executed tool to the lowest priority.
3. Decrement the number of bytes used by the tool from the token.
4. if bytes in token are greater then any tool required byes then go to step 1 else set the token to its initial value and forward to the next site.

Wiki MarkupLets say we have an Array of *{_}N{_}* Monitoring sites *{_}M\[1...N\]_* and each site have *{_}n{_}* tools *{_}T\[1..n\]_* to execute. Let *{_}B{_}* be the bytes received by host in token and *{_}X\[1..x\]_* represent no of target to be probed with tools.

Code Block
NextSite(A,i)
if i is equal to length_of(A) then
   return A[1]
else return A[i+1] 
Code Block
ChangePriority(A){
  x = A[lengthOf(A)]
  for i = lengthOf(A)-1 down to 1
	A[i+1] = A[i]
	i = i -1
  A[1] = x
}

Wiki Markup      ChangePriority takes an array as argument and change its priority from N to 1 and increase the other consecutive elements priority by 1. It actually treats an index of an element as its priority. Hence, It copy A\[N\] at A\[1\] and A\[i\] at A\[i+1\      ChangePriority takes an array as argument and change its priority from N to 1 and increase the other consecutive elements priority by 1. It actually treats an index of an element as its priority. Hence, It copy A[N] at A[1] and A[i] at A[i+1]

Code Block
GetMaxPriorityElement(A){
	return A[lengthOf(A)]
}

...