Patent ID: 7944829

Claim:
A method for managing resources in a network device, comprising: allocating a portion of shared storage to each of a plurality of data flows based on a current number of data flows sharing the shared storage; reserving a portion of the shared storage as a reserved buffer for a certain one of the plurality of data flows, the reserved buffer being maintained separately from the shared storage, wherein the shared storage is also used as overflow space for the reserved buffer when the reserved buffer is fully occupied; obtaining a plurality of contemporaneously calculated probability metrics indicating whether an arriving data unit associated with the certain one of the plurality of data flows can be stored in the network device, wherein the plurality of probability metrics includes: a global fair share (GFS) probability based on factors including the size of the allocated portions of shared storage and the current number of data flows; and a probability based on the occupancy of the reserved buffer, and discarding selected data units based on the plurality of contemporaneously calculated probability metrics and other factors including configuration of the network device.