Consultor Eletrônico



Kbase 19021: What is the RM Chain?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/01/2010
Status: Verified

GOAL:

What is the RM Chain?

GOAL:

How space is allocated for records?

GOAL:

How is space allocation handled within the database engine?

GOAL:

How does Progress allocate space for records in the database?

GOAL:

What is the RM (Record Manager) Chain?

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

The Progress Database manager maintains a list of blocks in the database which have free space in them, and are therefore eligible for record additions. This list is called the RM Chain. It is important to note that this list does not contain ALL blocks in the database; only those with space available for additions or updates.

How space is allocated for records?

To find space to store a record, or a record fragment, the database manager first looks at the RM chain to see if an existing record block with unused space is available. If the block at the head of the RM chain contains enough space to store the fragment while still leaving expansion space, and the block has unused record slots, then that block is used. The record is copied to the block and the amount of unused space in the block is updated.

If the block at the head of the RM chain cannot be used to store the record, and it has less unused space than the free space constant, or if all 32 record slots have been used, it is removed from the RM Chain. Otherwise, it is moved to the tail end of the chain. In either case, the next block on the front of the RM Chain is considered and the process is repeated until sufficient space has been found or the search limits have been reached.

To limit the search time, no more than 100 blocks on the RM Chain will be examined and removed from the chain at a time. No more than three blocks at a time will be examined and moved to the tail end. If either of these limits is exceeded during a search for space, the search for reusable space is abandoned and a free block is used.

If no existing record block can be used, an unused block is allocated. The block is formatted as an RM block, and the record is stored in it.

If the block is already on the RM chain, but now has less free space than the free space constant, or all the record slots are filled, then the block should be removed from the RM Chain. But, since the RM Chain is linked only in for forward direction, it can only be removed if it is the first block on the chain. If it is not the first block, it will be left in the chain. It will be removed later while searching for record space, if it should become the first block on the chain during the search.