Record Blocking Methods

Record Blocking in OS:

Records are the logical unit of a file whereas blocks are units of I/O with secondary storage. It performs for I/O and the records must organize as blocks. Blocking is a process of grouping similar records into blocks that the operating system component explores exhaustively. Block is the unit of I/O for secondary storage. Generally, the larger blocks reduce the I/O transfer time. Larger blocks require larger I/O buffers. In record blocking, the records are grouped into blocks by shared properties that are indicators of duplication.

Types of Record Blocking in OS:

Generally, there are three types of record-blocking methods.

1. Fixed blocking
2. Variable-length spanned blocking
3. Variable-length unspanned blocking

Fixed blocking:

In this method, record lengths are fixed. The prescribed number of records stored in a block. Internal fragmentation is stored in a block. Fixed blocking is common for sequential files with fixed-length records length records

Record Blocking Methods

Variable-length spanned blocking:

In this method, record sizes aren’t same, Variable-length records packing into blocks with no unused space. So, some records may divide into two blocks. In this type of situation, a pointer passes from one block to another block. So, the Pointers used to span block unused space. It is efficient in length and efficiency of storage. It doesn’t limit record size, but it is more complicated to implement. So, the files are more difficult to update

Record Blocking Methods

Variable-length unspanned blocking:

Here, records are variable in length, but the records span between blocks. In this method, the wasted area is a serious problem, because of the inability to use the remainder of a block, if the next record is larger than the remaining unused space. These blocking methods result in blocking results in wasted space and limit record size to the size of the block.

Variable-length unspanned blocking