Unified working storage management
First Claim
1. A process for controlling memory in a data processing system of the type including one or more processing units and a memory, said data processing system executing a plurality of tasks with each task issuing one or more requests for memory of a specified size, wherein a portion of said memory is designated working storage, wherein the data processing system maintains a plurality of queues, each queue containing an ordered list of addresses of working storage blocks of a specified size, and wherein the data processing system maintains an ordered free storage list containing the addresses of all working storage blocks not in the plurality of queues and ordered by said addresses, the process comprising the steps of:
- allocating a working storage block to one of said plurality of tasks in response to a request for memory of a specified size, said allocating step determining a working storage block address of a working storage block of at least said specified size;
determining periodically a spill address for each of said plurality of queues as a function of the amount of storage addressed by said queue, said spill address representing a limiting address controlling placement of deallocated working storage blocks in one of said plurality of queues or in said free storage list;
deallocating an allocated working storage block having an address and size when no longer required by said one of said plurality of tasks;
testing each of said plurality of queues and selecting one of said plurality of queues having a size larger than the size of said deallocated working storage block;
inserting the address of said deallocated working storage block in the selected one of said plurality of queues, when said working storage block is deallocated as long as the address of said working storage block is between the beginning of working storage and said spill address and said size of said working storage block is less than or equal to the largest size block specified for any queue; and
inserting said address as an address entry in said free storage list otherwise.
1 Assignment
0 Petitions
Accused Products
Abstract
A process of efficiently managing working storage that unifies the use of queues of fixed size free storage blocks and a global list of blocks of random size. The process implements continuous garbage collection that continually purges unused storage blocks from the fixed size queues to ensure maximum free storage availability. Data processing system throughput is enhanced by reducing the processor overhead required to allocate and return free storage blocks and by reducing the overhead required to manage temporary extensions of working storage.
75 Citations
13 Claims
-
1. A process for controlling memory in a data processing system of the type including one or more processing units and a memory, said data processing system executing a plurality of tasks with each task issuing one or more requests for memory of a specified size, wherein a portion of said memory is designated working storage, wherein the data processing system maintains a plurality of queues, each queue containing an ordered list of addresses of working storage blocks of a specified size, and wherein the data processing system maintains an ordered free storage list containing the addresses of all working storage blocks not in the plurality of queues and ordered by said addresses, the process comprising the steps of:
-
allocating a working storage block to one of said plurality of tasks in response to a request for memory of a specified size, said allocating step determining a working storage block address of a working storage block of at least said specified size; determining periodically a spill address for each of said plurality of queues as a function of the amount of storage addressed by said queue, said spill address representing a limiting address controlling placement of deallocated working storage blocks in one of said plurality of queues or in said free storage list; deallocating an allocated working storage block having an address and size when no longer required by said one of said plurality of tasks; testing each of said plurality of queues and selecting one of said plurality of queues having a size larger than the size of said deallocated working storage block; inserting the address of said deallocated working storage block in the selected one of said plurality of queues, when said working storage block is deallocated as long as the address of said working storage block is between the beginning of working storage and said spill address and said size of said working storage block is less than or equal to the largest size block specified for any queue; and inserting said address as an address entry in said free storage list otherwise. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A process for controlling the allocation and deallocation of memory space in a data processing system of the type including one or more processing units and a memory, said data processing system executing a plurality of tasks with each task requiring allocation of a portion of said memory to said task by issuing one or more requests for allocation of a storage block,
said process comprising the steps of: -
designating a block of memory of predetermined size as free storage, said free storage block having a beginning address and capable of being divided into a plurality of storage blocks each having an address; establishing a free storage list containing the addresses of all unallocated storage blocks in said free storage; establishing a plurality of queues, each queue designated to contain entries of available storage blocks of a different fixed size and each having a spill address; performing the following steps for each request for allocation of a storage block of a requested size by one of said tasks; determining whether an available storage block exists in a fixed size queue containing blocks of storage of the nearest larger size than said requested size; if said queue is empty and said free storage is at least as large as said requested size, allocating storage of said requested size from said free storage; if said free storage is not as large as said requested size, obtaining extended storage and allocating storage of said requested size from said extended free storage; resetting said spill address for said fixed size queue of the nearest larger size as the address of said allocated storage, if said storage is the only one of said size allocated;
otherwise resetting said spill address as the address of storage just allocated or the old spill address, whichever is further from beginning address of free storage;performing the following steps for each deallocation of a storage block of a size given; inserting said storage block into said free storage list if the size of said storage block is greater than the size of the largest size fixed size queue; rounding said given size to the nearest larger fixed size queue; inserting said storage block into said fixed size queue, as the first element in said queue if the address of said storage is between said beginning address of free storage and said spill address;
otherwise inserting said storage into said free storage list;modifying periodically each of said spill addresses of said fixed size queues by determining the total amount of storage contained in all storage blocks in said queue, and adjusting said spill address closer to said beginning address of free storage by said total amount; returning storage from said fixed size queue to said free storage list if the address of said first block of storage in said queue is not between the beginning address of free storage and said adjusted spill address. - View Dependent Claims (12, 13)
-
Specification