Claims
- 1. A method of managing resource usage by one or more resource entities, wherein each resource entity is configured to consume one or more resources, the method comprising:
determining whether a resource has reached a critical level; when it is determined that a resource has reached a critical level, selecting a first resource entity based on one or more criteria; and when it is determined that a resource has reached a critical level, requesting the selected resource entity to change its resource consumption state to a more restrictive state.
- 2. A method as recited in claim 1, wherein the one or more criteria include a priority value for each resource entity and wherein the selected resource entity has a relatively lower priority than other one or more resource entities that are not selected.
- 3. A method as recited in claim 1, wherein the one or more criteria include a current resource consumption state of each resource entity and wherein the selected resource entity has a relatively less restrictive current resource consumption state than one or more other resource entities that are not selected.
- 4. A method as recited in claim 1, further comprising:
when the selected resource entity does not change its resource consumption state when requested to do so, determining whether to request the selected resource entity a second time to change its resource consumption state to the previously requested more restrictive state; and when it is determined to request the selected resource entity a second time, requesting the selected resource entity a second time to change its resource consumption state to the previously requested more restrictive state.
- 5. A method as recited in claim 4, further comprising terminating the selected resource entity when it is determined not to request the selected resource entity a second time.
- 6. A method as recited in claim 5, wherein determining whether to request the selected resource entity a second time is based on whether the selected resource entity has failed to change its resource consumption when requested to do so within a predetermined time limit.
- 7. A method as recited in claim 5, wherein determining whether to request the selected resource entity a second time is based on whether a resource is still at a critical level.
- 8. A method as recited in claim 5, wherein determining whether to request the selected resource entity a second time is based on whether a second resource entity may be selected and requested to change its resource consumption to a more restrictive state.
- 9. A method as recited in claim 5, wherein determining whether to request the selected resource entity a second time is based on whether the selected resource entity has indicated a reduction in resource usage.
- 10. A method as recited in claim 1, wherein the selected resource entity may have or be requested to have a resource consumption state selected from a group consisting of a NORMAL state, a FAVOR_SPACE state, an ESSENTIAL_ONLY state, a TERMINATE_GRACEFULLY state, and a TERMINATE_ABRUPTLY state.
- 11. A method as recited in claim 1, wherein the resource is selected from a group consisting of a Java heap, a plurality of file descriptors, video RAM, a native heap, a hardware resource, and persistent storage.
- 12. A method as recited in claim 1, wherein the resource entity is contained within an entity selected from a group consisting of an application, an applet, and an Xlet.
- 13. A method as recited in claim 1, wherein requesting the selected resource entity to change its resource consumption state to a more restrictive state is performed through a ResourceNotificationList to which a plurality of resource entities are registered.
- 14. A method as recited in claim 13, further comprising obtaining the selected resource entity's current resource consumption state through the ResourceNotificationList prior to requesting the selected resource entity to change its resource consumption state to a more restrictive state.
- 15. A method as recited in claim 1, further comprising:
when the selected resource entity changes to the requested state, determining again whether any resource is still at a critical level; when it is determined that a resource is at a critical level, selecting a second resource entity based on one or more criteria; and when it is determined that a resource is at a critical level, requesting the second selected resource entity to change its resource consumption state to a more restrictive state.
- 16. A method as recited in claim 15, wherein the first selected resource entity equals the second selected resource entity.
- 17. A method as recited in claim 16, further comprising telling the second selected resource entity to return to its least restrictive resource consumption state when it is determined that no resources have reached a critical level.
- 18. A method as recited in claim 1, further comprising forwarding the request to a second resource entity whose resource usage is managed by an application associated with the first resource entity.
- 19. A computer readable medium containing instructions for managing resource usage by one or more resource entities, wherein each resource entity is configured to consume one or more resources, the computer readable medium comprising:
computer code for determining whether a resource has reached a critical level;
computer code for selecting a first resource entity based on one or more criteria when it is determined that a resource has reached a critical level; computer code for requesting the selected resource entity to change its resource consumption state to a more restrictive state when it is determined that a resource has reached a critical level.
- 20. A computer readable medium as recited in claim 19, wherein the one or more criteria include a priority value for each resource entity and wherein the selected resource entity has a relatively lower priority than other one or more resource entities that are not selected.
- 21. A computer readable medium as recited in claim 19, wherein the one or more criteria include a current resource consumption state of each resource entity and wherein the selected resource entity has a relatively less restrictive current resource consumption state than one or more other resource entities that are not selected.
- 22. A computer readable medium as recited in claim 19, further comprising:
computer code for determining whether to request the selected resource entity a second time to change its resource consumption state to the previously requested more restrictive state when the selected resource entity does not change its resource consumption state when requested to do so; and computer code for requesting the selected resource entity a second time to change its resource consumption state to the previously requested more restrictive state when it is determined to request the selected resource entity a second time.
- 23. A computer readable medium as recited in claim 22, further comprising computer code for terminating the selected resource entity when it is determined not to request the selected resource entity a second time.
- 24. A computer readable medium as recited in claim 23, wherein determining whether to request the selected resource entity a second time is based on whether the selected resource entity has failed to change its resource consumption when requested to do so within a predetermined time limit.
- 25. A computer readable medium as recited in claim 23, wherein determining whether to request the selected resource entity a second time is based on whether a resource is still at a critical level.
- 26. A computer readable medium as recited in claim 23, wherein determining whether to request the selected resource entity a second time is based on whether a second resource entity may be selected and requested to change its resource consumption to a more restrictive state.
- 27. A computer readable medium as recited in claim 23, wherein determining whether to request the selected resource entity a second time is based on whether the selected resource entity has indicated a reduction in resource usage.
- 28. A computer readable medium as recited in claim 19, wherein the selected resource entity may have or be requested to have a resource consumption state selected from a group consisting of a NORMAL state, a FAVOR_SPACE state, an ESSENTIAL_ONLY state, a TERMINATE_GRACEFULLY state, and a TERMINATE_ABRUPTLY state.
- 29. A computer readable medium as recited in claim 19, wherein the resource is selected from a group consisting of a Java heap, a plurality of file descriptors, video RAM, and a native heap.
- 30. A computer readable medium as recited in claim 19, wherein the resource entity is contained within an entity selected from a group consisting of an application, an applet, and an Xlet.
- 31. A computer readable medium as recited in claim 19, wherein requesting the selected resource entity to change its resource consumption state to a more restrictive state is performed through a ResourceNotificationList to which a plurality of resource entities are registered.
- 32. A computer readable medium as recited in claim 31, further comprising computer code for obtaining the selected resource entity's current resource consumption state through the ResourceNotificationList prior to requesting the selected resource entity to change its resource consumption state to a more restrictive state.
- 33. A computer readable medium as recited in claim 19, further comprising:
computer code for determining again whether any resource is still at a critical level when the selected resource entity changes to the requested state; computer code for selecting a second resource entity based on one or more criteria when it is determined that a resource is at a critical level; and computer code for requesting the second selected resource entity to change its resource consumption state to a more restrictive state when it is determined that a resource is at a critical level.
- 34. A computer readable medium as recited in claim 33, wherein the first selected resource entity equals the second selected resource entity.
- 35. A computer readable medium as recited in claim 34, further comprising computer code for telling the second selected resource entity to return to its least restrictive resource consumption state when it is determined that no resources have reached a critical level.
- 36. A computer readable medium as recited in claim 19, further comprising computer code for forwarding the request to a second resource entity whose resource usage is managed by an application associated with the first resource entity.
- 37. A computer system operable to manage resource usage by one or more resource entities, wherein each resource entity is configured to consume one or more resources, comprising:
a memory; and a processor coupled to the memory, wherein at least one of the memory and the processor are adapted to provide: select a first resource entity based on one or more criteria when it is determined that a resource has reached a critical level; request the selected resource entity to change its resource consumption state to a more restrictive state when it is determined that a resource has reached a critical level.
- 38. A computer system as recited in claim 37, wherein the one or more criteria include a priority value for each resource entity and wherein the selected resource entity has a relatively lower priority than other one or more resource entities that are not selected.
- 39. A computer system as recited in claim 37, wherein the one or more criteria include a current resource consumption state of each resource entity and wherein the selected resource entity has a relatively less restrictive current resource consumption state than one or more other resource entities that are not selected.
- 40. A computer system as recited in claim 37, further comprising:
when the selected resource entity does not change its resource consumption state when requested to do so, determining whether to request the selected resource entity a second time to change its resource consumption state to the previously requested more restrictive state; and when it is determined to request the selected resource entity a second time, requesting the selected resource entity a second time to change its resource consumption state to the previously requested more restrictive state.
- 41. A computer system as recited in claim 40, wherein when it is determined not to request the selected resource entity a second time, terminating the selected resource entity.
- 42. A computer system as recited in claim 41, wherein determining whether to request the selected resource entity a second time is based on whether the selected resource entity has failed to change its resource consumption when requested to do so within a predetermined time limit.
- 43. A computer system as recited in claim 41, wherein determining whether to request the selected resource entity a second time is based on whether a resource is still at a critical level.
- 44. A computer system as recited in claim 41, wherein determining whether to request the selected resource entity a second time is based on whether a second resource entity may be selected and requested to change its resource consumption to a more restrictive state.
- 45. A computer system as recited in claim 41, wherein determining whether to request the selected resource entity a second time is based on whether the selected resource entity has indicated a reduction in resource usage.
- 46. A computer system as recited in claim 37, further comprising:
when the selected resource entity changes to the requested state, determining again whether any resource is still at a critical level; when it is determined that a resource is at a critical level, selecting a second resource entity based on one or more criteria; and when it is determined that a resource is at a critical level, requesting the second selected resource entity to change its resource consumption state to a more restrictive state.
- 47. A computer system as recited in claim 46, wherein the first selected resource entity equals the second selected resource entity.
- 48. A computer system as recited in claim 47, further comprising telling the second selected resource entity to return to its least restrictive resource consumption state when it is determined that no resources have reached a critical level.
- 49. A computer system as recited in claim 37, further comprising forwarding the request to a second resource entity whose resource usage is managed by an application associated with the first resource entity.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application claims priority to U.S. Provisional Application No. 60/290,309 filed May 10, 2001 entitled “RESOURCE MANAGEMENT FOR RESOURCE CONSTRAINED DEVICES” by William F. Foote and Hideya Kawahara, which application is incorporated by reference in its entirety for all purposes.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60290309 |
May 2001 |
US |