Memory management in data processing systems
Memory management in a data processing system can learn one or more behaviors of software processes such as daemon software processes and application processes, and based on information learned about the behaviors, the memory management can adjust how it controls memory usage in the system. For example, a memory management system can learn how software processes react (e.g. how quickly they relaunch) to memory recovery methods, such as system initiated terminations of one or more software processes that are performed to reclaim memory to increase available volatile memory, and based on information about how they react, the memory recovery methods can operate differently depending upon how the software reacted previously.
1 . A machine implemented method comprising:
receiving a set of data for a plurality of software processes executing on a data processing system, the set of data indicating how the plurality of software processes behave in response to one or more memory management actions in a first set of actions that increase free available volatile memory in the data processing system, wherein the plurality of software processes store data in the volatile memory,
wherein the set of data indicating how the plurality of software processes behave in response to the one or more memory management actions is determined by:
performing the plurality of software processes; and
determining a sequence of events for each of the plurality of software processes;
selecting one or more memory management actions in a second set of actions derived from responses to the set of data; and
performing the selected one or more memory management actions in the second set of actions derived from responses to the set of data to maintain at least a persistent amount of free volatile memory.
2 . The method as in claim 1 , wherein the first set of actions include process terminations and wherein the second set of actions are different for different classes of software processes, the different classes of software processes based on the set of data.
3 . The method as in claim 2 , wherein the data processing system has a first mode for memory recovery through process terminations of low priority daemon software processes in a first set of priority levels and has a second mode for memory recovery through process terminations of daemon software processes in the first set of priority levels and also in a second set of priority levels, and wherein the data processing system switches to the second mode when the set of data indicates that insufficient memory will be recovered if the first mode for memory recovery is used.
4 . The method as in claim 3 , wherein the second set of actions includes delaying, for a period of time, enforcement of a memory limit reduction on a software process, where the period of time is based upon data indicating how the software process behaves in response to memory related process terminations that reclaim volatile memory.
5 . The method as in claim 1 , wherein the set of data comprises classes for different software processes.
6 . A non-transitory machine readable medium storing executable program instructions which when executed by a data processing system cause the data processing system to perform a method, the method comprising:
receiving a set of data for a plurality of software processes executing on the data processing system, the set of data indicating how the plurality of software processes behave in response to one or more memory management actions in a first set of actions that increase free available volatile memory in the data processing system, wherein the plurality of software processes store data in the volatile memory,
wherein the set of data indicating how the plurality of software processes behave in response to the one or more memory management actions is determined by:
performing the plurality of software processes; and
determining a sequence of events for each of the plurality of software processes;
selecting one or more memory management actions in a second set of actions derived from responses to the set of data; and
performing the selected one or more memory management actions in the second set of actions derived from responses to the set of data to maintain at least a persistent amount of free volatile memory.
7 . The medium as in claim 6 , wherein the first set of actions include process terminations and wherein the second set of actions are different for different classes of software processes, the different classes of software processes based on the set of data.
8 . The medium as in claim 7 , wherein the data processing system has a first mode for memory recovery through process terminations of low priority daemon software processes in a first set of priority levels and has a second mode for memory recovery through process terminations of daemon software processes in the first set of priority levels and also in a second set of priority levels, and wherein the data processing system switches to the second mode when the set of data indicates that insufficient memory will be recovered if the first mode for memory recovery is used.
9 . The medium as in claim 8 , wherein the second set of actions includes delaying, for a period of time, enforcement of a memory limit reduction on a software process, where the period of time is based upon data indicating how the software process behaves in response to memory related process terminations that reclaim volatile memory.
10 . The method as in claim 1 , wherein the method further comprises:
monitoring, by the data processing system, behavior of the plurality of software processes; and
performing, by the data processing system, the first set of actions.
11 . The method as in claim 10 , wherein the method further comprises:
performing, by the data processing system, the second set of actions to manage memory usage in the volatile memory.
12 . The method as in claim 11 , wherein the one or more memory management actions, including the first set of actions and the second set of actions, are performed by a memory management system that executes on the data processing system, and the memory management system learns how the plurality of software processes behave.
13 . The medium as in claim 6 , wherein the method further comprises:
monitoring, by the data processing system, behavior of the plurality of software processes; and
performing, by the data processing system, the first set of actions.
14 . The medium as in claim 13 , wherein the method further comprises:
performing, by the data processing system, the second set of actions to manage memory usage in the volatile memory.
15 . The medium as in claim 14 , wherein the one or more memory management actions, including the first set of actions and the second set of actions, are performed by a memory management system that executes on the data processing system, and the memory management system learns how the plurality of software processes behave.
16 . A data processing system comprising one or more processors, the one or more processors configured to perform a method comprising:
receiving a set of data for a plurality of software processes executing on the data processing system, the set of data indicating how the plurality of software processes behave in response to one or more memory management actions in a first set of actions that increase free available volatile memory in the data processing system, wherein the plurality of software processes store data in the volatile memory,
wherein the set of data indicating how the plurality of software processes behave in response to the one or more memory management actions is determined by:
performing the plurality of software processes; and
determining a sequence of events for each of the plurality of software processes;
selecting one or more memory management actions in a second set of actions derived from responses to the set of data; and
performing the selected one or more memory management actions in the second set of actions derived from responses to the set of data to maintain at least a persistent amount of free volatile memory.
17 . The system as in claim 16 , wherein the first set of actions include process terminations and wherein the second set of actions are different for different classes of software processes, the different classes of software processes based on the set of data.
18 . The system as in claim 17 , wherein the data processing system has a first mode for memory recovery through process terminations of low priority daemon software processes in a first set of priority levels and has a second mode for memory recovery through process terminations of daemon software processes in the first set of priority levels and also in a second set of priority levels, and wherein the data processing system switches to the second mode when the set of data indicates that insufficient memory will be recovered if the first mode for memory recovery is used.
19 . The system as in claim 18 , wherein the second set of actions includes delaying, for a period of time, enforcement of a memory limit reduction on a software process, where the period of time is based upon data indicating how the software process behaves in response to memory related process terminations that reclaim volatile memory.
20 . The system as in claim 16 , wherein the set of data comprises classes for different software processes.