1460726580-cf43a197-34b1-452b-815f-5ddf4cd48705

1. A method of communicating a media stream, the method comprising:
measuring port usage data related to each of a plurality of physical ports associated with a link aggregation group;
estimating a bandwidth requirement of a requested media stream;
adding the estimated bandwidth requirement of the requested media stream to a traffic load at each of the plurality of physical ports to produce an estimated total traffic load of each of the plurality of physical ports;
determining a media type associated with the requested media stream;
selecting a physical port that has an estimated total traffic load that is less than or equal to a pre-determined maximum;
when the media type comprises non-video data, sending the requested media stream to a destination device via the selected physical port, wherein the physical port is selected according to a fixed bandwidth allocation; and
when the media type comprises video data:
dropping an existing media stream from the selected physical port when the estimated traffic load of the selected physical port exceeds a usage maximum associated with the selected physical port and when the existing media stream can be dropped;
assigning the requested media stream to the selected physical port; and
sending the requested media stream to the destination device via the selected physical port.
2. The method of claim 1, wherein the non-video data comprises one of Internet data, audio data, and Voice over Internet Protocol data.
3. The method of claim 1, wherein the plurality of physical ports associated with the link aggregation group comprise a single logical port.
4. The method of claim 1, further comprising:
determining whether a quality of service associated with media streams already assigned to the selected physical port would be affected by sending the requested media stream to the destination device via the selected physical port; and
making an admission control decision with respect to the requested media stream based on the determination.
5. The method of claim 1, wherein selecting the physical port comprises:
determining the estimated total traffic load, wherein determining the estimated traffic load includes at least determining an average bit rate over a time interval for each media stream on each physical port associated with the link aggregation group; and
selecting the physical port according to the average bit rate determined in the time interval when the media type comprises video data.
6. The method of claim 1, wherein the requested media stream includes a guaranteed bandwidth requirement, the method further comprising comparing the guaranteed bandwidth requirement to an available bandwidth associated with the selected physical port to determine whether a quality of service would be affected.
7. The method of claim 6, wherein the method further comprises routing the requested media stream to a different physical port based on the determination.
8. The method of claim 1, wherein the requested media stream comprises one of a unicast media stream and a multicast media stream.
9. The method of claim 1, further comprising:
determining an average bit rate during a time period for a multicast media stream in an Internet Group Management Protocol group; and
estimating the total traffic load on a port based on the average bit rate and based on a number of join and leave requests associated with the group.
10. The method of claim 1, wherein the port usage data is measured in real-time.
11. The method of claim 1, wherein when the existing media stream cannot be dropped, the requested media stream is rejected.
12. A method of allocating media streams, the method comprising:
determining a media type associated with a requested media stream;
selecting a port from a plurality of ports associated with a link aggregation group of a network device; and
transmitting the requested media stream to a destination via the selected port;
wherein the selected port is determined by applying a first technique when the media type of the requested media stream comprises a Voice over Internet Protocol stream or a data stream; and
wherein the selected port is determined by applying a second technique when the media type of the requested media stream comprises a video stream, the second technique comprising:
estimating the bandwidth requirement of the requested media stream;
measuring a port usage at each port of the plurality of ports associated with the link aggregation group when the requested media stream comprises a video stream, the port usage comprising an aggregate bandwidth;
adding the estimated bandwidth requirement of the requested media stream to the port usage at each of the plurality of ports associated with the link aggregation group to produce an estimated total traffic load for each of the plurality of ports;
determining a usage maximum associated with the selected port;
determining whether the usage maximum is exceeded by adding the estimated bandwidth to the port usage at the selected port;
in response to determining that the usage maximum is exceeded, determining whether an existing media stream at the selected port can be dropped; and
in response to determining that the existing media stream at the selected port can be dropped, dropping the existing media stream from the selected port and assigning the requested media stream to the selected port.
13. The method of claim 12, wherein the first technique comprises a static port allocation algorithm.
14. The method of claim 12, further comprising:
rejecting the requested media stream when the port usage exceeds the usage maximum.
15. The method of claim 12, wherein the requested media stream comprises a multicast stream, the method further comprising estimating a bandwidth consumption for a multicast group associated with the multicast stream based on a mask, wherein the bandwidth consumption is the same for each address of the multicast group defined by the mask.
16. The method of claim 12, further comprising:
in response to determining that the existing media stream cannot be dropped by the selected port, determining a second usage maximum associated with a second port of the plurality of ports associated with the link aggregation group;
determining whether the second usage maximum is exceeded by adding the estimated bandwidth to a second port usage associated with the second port;
determining whether a second existing media stream at the second port can be dropped, wherein when the second existing media stream is dropped the second usage maximum is not exceeded at the second port; and
in response to determining that the second existing media stream can be dropped, dropping the second existing media stream from the second port and assigning the requested media stream to the second port.
17. A network device to allocate media streams, the network device comprising:
a plurality of ports comprising:
at least one port responsive to a content provider network;
at least one link aggregation group including multiple ports; and

processing logic and memory accessible to the processing logic, the memory to store a plurality of instructions executable by the processing logic to:
monitor total bandwidth consumption for each of the multiple ports of the at least one link aggregation group;
determine a media type associated with a requested media stream;
select a port from the link aggregation group by applying a first allocation when the media type comprises non-video data and by applying a second allocation when the media type comprises a video stream, wherein the second allocation comprises:
estimating a bandwidth requirement of the requested media stream;
adding the estimated bandwidth requirement of the requested media stream to the total bandwidth consumption at each of the multiple ports of the at least one link aggregation group, to produce an estimated total traffic load for each of the multiple ports; and
dropping an existing media stream from the selected port when the estimated traffic load of the selected port exceeds a usage maximum associated with the selected port and when the existing media stream can be dropped,
wherein the selected port is a least loaded port of a subset of ports in the link aggregation group that have an estimated total traffic load that is less than or equal to a pre-determined maximum; and

stream the requested media stream to the selected port.
18. The network device of claim 17, wherein the non-video data comprises Voice over Internet Protocol data, Internet data, or other data offered via a triple-play network.
19. The network device of claim 17, wherein the first allocation comprises a static bandwidth allocation.
20. The network device of claim 17, wherein the network device is a routing device of an Internet Protocol Television network.
21. The network device of claim 17, further comprising instructions executable by the processing logic to:
receive a request for a new stream;
measure the usage for each port of the link aggregation group; and
reject the request when the usage exceeds a maximum.
22. The network device of claim 17, further comprising instructions executable by the processing logic to:
monitor connections to each port of the link aggregation group; and
update the usage for the port when a connection is dropped.

The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.

1. A circuit for saving and restoring state in an intermittent power environment comprising:
a threshold register having a counter; and
a non-volatile storage, wherein a value of the threshold register is compared with a count register to determine when to save the state into non-volatile storage.
2. The circuit of claim 1, wherein the non-volatile storage is a pingpong non-volatile storage.
3. The circuit of claim 1, further comprising last and valid flags.
4. The circuit of claim 3, wherein the last and valid flags are configured to be utilized to determine a valid save state in the non-volatile storage.
5. The circuit of claim 3, wherein the last and valid flags are configured to flag a location in the non-volatile storage of a last valid saved state.
6. The circuit of claim 1, further comprising a determination component configured to determine when a value of the threshold has been equaled or exceeded.
7. The circuit of claim 6, wherein the determination component determines when a count of a power up cycle is equal to or has exceeded the threshold.
8. The circuit of claim 6, wherein the determination component is utilized to determine when to save context.
9. The circuit of claim 1, wherein the counter is configured to increment or decrement during a power cycle in order to adjust the threshold register.
10. The circuit of claim 1, wherein the threshold register is configured to learn a time duration of a power pulse in a low or no power environment, and set a saving checkpoint.
11. A method for predicting andor estimating a power cycle duration in order to save a state in non-volatile memory, comprising:
setting a threshold value;
determining that the threshold value has been equaled or exceeded; and
saving the state in the non-volatile memory at a first checkpoint based on the threshold value being equaled or exceeded.
12. The method of claim 11, wherein the setting includes incrementing a counter until there is a power loss.
13. The method of claim 11, wherein the setting includes decrementing a counter when the state is saved in a previous checkpoint with relation to the first checkpoint.
14. The method of claim 11, wherein the setting includes adjusting a checkpoint based on a current power cycle.
15. The method of claim 11, further comprising providing an indicator of a last and valid saved state.
16. The method of claim 15, further comprising uploading the state from the non-volatile memory in a subsequent power up cycle.
17. The method of claim 11, further comprising setting a flag that states that a failure has occurred recently, where recently is defined as a time period measured by current time and, after the current time has moved beyond a set time period the flag is reset.
18. A design structure embodied in a machine readable medium for designing, manufacturing, or testing an integrated circuit, the design structure comprising a threshold register having a counter, a count register, and a non-volatile storage for storing a state when a value of the count register equals or exceeds a value of the threshold register.
19. The design structure of claim 18, wherein the design structure comprises a netlist.
20. The design structure of claim 18, wherein the design structure resides on storage medium as a data format used for the exchange of layout data of integrated circuits.