Patent ID: 8688872

Claim:
A method of managing a queue comprising: performing a look-ahead function of data stored in the queue, and including associating respective state variables to the data in the queue, the respective state variables having values representative of a number of times a given datum is present in the queue, performing the look-ahead function on the respective state variables, detecting writing and reading of data in the queue, incrementing the value of the respective associated state variable when a datum is written in the queue, and decreasing the value of the respective associated state variable when a datum is read from the queue, wherein performing the look-ahead function further includes detecting the presence of a given datum in the queue and checking whether among the state variables there exists a corresponding state variable having a non-nil value, and wherein performing the look-ahead function further comprises identifying a datum in the queue having one of a maximum and minimum value, and identifying the datum as corresponding to the state variable having a non-nil value occupying an end position in an ordered sequence.