A computer-implemented method for memory management, the memory management including a page replacement process managed by a storage manager and a workload manager, the page replacement process swapping out a plurality of pages associated with processes to an auxiliary storage in order to provide free frames, wherein each page of the plurality of pages is associated with a frame of physical memory, the method comprising:
- before starting each process of a plurality of processes, assigning priority information to the process upon entry of the process into a computer system comprising the storage manager and the workload manager;
- storing the priority information of each process of the plurality of processes in a control block associated with the process;
- determining, by the storage manager, that the physical memory runs out of free frames;
- triggering, based on the determining that the physical memory runs out of free frames, by the storage manager, the workload manager, to provide priority information to the storage manager, wherein the triggering comprises transmitting, to the workload manager, a parameter list indicating a number of pages to be swapped to auxiliary storage to generate free frames;
- based on the triggering, selecting, by the workload manager, candidate processes, based on determining a priority of the candidate processes, and populating the candidate processes in the parameter list, the determining the priority of the candidate processes comprising:
- determining, by the workload manager, the priority information for each process of the plurality of processes by referencing the priority information stored in the control block associated with the process, the priority information for the process indicating a priority level indicating a business relevance of the process and an importance of the process for a given customer, wherein for each process of the plurality of processes, the priority level of the process is selected from the group consisting of a high priority level, a medium priority level, and a low priority level, wherein for each process of the plurality of processes, the priority level of the process is not related to a probability of future usage of a frame associated with the process;
- selecting, by the workload manager, the candidate processes, wherein the candidate processes comprise a portion of the plurality of processes of the low priority level and comprise a low priority workload;
- and
- updating, by the workload manager, the parameter list to comprise instructions to instruct the storage manager to free a certain portion of frames, the certain portion comprising more than one frame, wherein the certain portion of frames is associated with the candidate processes, wherein the instructions comprise an exact number of frames of the certain portion or a percentage of frames of the certain portion, and wherein the instructions direct the storage manager to spread page replacement over the candidate processes;
- transmitting, by the workload manager, the parameter list to the storage manager;
- based on receiving the parameter list provided by the workload manager, selecting, by the storage manager, a given plurality of pages utilized by the candidate processes to be swapped out to the auxiliary storage to free the exact number of frames of the certain portion or the percentage of frames of the certain portion, wherein a quantity of the exact number of frames of the certain portion or the percentage of frames of the certain portion is the number of pages in the parameter list, wherein the auxiliary storage comprises a hard disk, wherein the selecting reduces an overall throughput of the low priority workload;
- and
- swapping out, by the storage manager, processes of the low priority level comprising the selected given plurality of pages to the auxiliary storage, wherein processes of the medium priority level and processes of the high priority level are not affected by the swapping out.