Skip to main content
added 388 characters in body
Source Link
sawdust
  • 17.9k
  • 2
  • 37
  • 49

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).

Some operating systems, e.g. *nixes, tend to hide the underlying physical block structure when using files. Other OSes may offer filesystems that expose the hardware characteristics more, such as files types that are allocated of one contiguous blocksectors, or linked blockssectors or by a table of blockssectors, and syscalls such as readblk() as well as read() (for a record). The packing of fixed-length records for random access varies for each type of file typeis more crucial is such an environment.

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).

Some operating systems, e.g. *nixes, tend to hide the underlying physical block structure when using files. Other OSes may offer filesystems that expose the hardware characteristics more, such as files types that are allocated of one contiguous block, or linked blocks or by a table of blocks. The packing of fixed-length records for random access varies for each type of file type.

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).

Some operating systems, e.g. *nixes, tend to hide the underlying physical block structure when using files. Other OSes may offer filesystems that expose the hardware characteristics more, such as files types that are allocated of contiguous sectors, or linked sectors or by a table of sectors, and syscalls such as readblk() as well as read() (for a record). The packing of fixed-length records for random access is more crucial is such an environment.

added 388 characters in body
Source Link
sawdust
  • 17.9k
  • 2
  • 37
  • 49

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).

Some operating systems, e.g. *nixes, tend to hide the underlying physical block structure when using files. Other OSes may offer filesystems that expose the hardware characteristics more, such as files types that are allocated of one contiguous block, or linked blocks or by a table of blocks. The packing of fixed-length records for random access varies for each type of file type.

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).

Some operating systems, e.g. *nixes, tend to hide the underlying physical block structure when using files. Other OSes may offer filesystems that expose the hardware characteristics more, such as files types that are allocated of one contiguous block, or linked blocks or by a table of blocks. The packing of fixed-length records for random access varies for each type of file type.

Source Link
sawdust
  • 17.9k
  • 2
  • 37
  • 49

What is meant by Packing a number of logical records into physical blocks mean here?

First you have to understand what a "logical record" is.
It can be variable length, such as text in sentences.
Of it can be fixed length, such as a data structure.

Packing determines how to organize data in the form of these logical records into "physical" containers, i.e. the disk blocks.
For records composed of text, the the read and write accesses are typically sequential (i.e. you start from the beginning and work your way to the "end"). So these records would be packed without any regard to block boundaries.
For records composed of (binary) data, the packing could be an issue, especially when the data records will be accessed randomly (e.g. a database lookup) rather than sequentially (like a tape).

Back in the days of punched cards (with 80 characters per card). I have seen a lame program that stored one 80-byte record per 512-byte sector in order to simplify the record-to-sector mapping for random access. For that size of logical record, the maximum number of records that can be packed (of fitted) into one 512-byte block is six, with 32 unused bytes per sector.
For optimal (random) access time (and at the expense of not minimizing storage space) a logical record should not span disk blocks (so that the random access can be satisfied by reading or writing just one block).