Group

A group is a partition in a file consisting of one or more linked frames used for storing and retrieving items.

When a file is created it is given a modulo that specifies how many one-frame groups are initially allocated for this file as the primary space. The group number is calculated by hashing the item-ID with the modulo creating an integer remainder in the range zero to modulo minus one. The group number is added to the file’s base giving the frame number of the group where the item is stored.

The hashed to group is sequentially searched to locate a specific item. By choosing the modulo appropriately, items can usually be located in a single disk access regardless of the number of items in the file. Overflow frames are automatically linked to a group to expand its storage capacity dynamically. Also, these frames become released back to the overflow pool as the group contracts in size.

WARNING

Files can become badly allocated with a group having many linked frames (even hundreds). In these cases the file should be reallocated (have its modulo increased), so that if possible, most groups are single frames.

See Also

create-file Command

File

Frame

group Command

Hashing

Linked Overflow

Modulo

Overflow Table

reallocation