A data block ( loan-translated from the English data block ) is a limited number of bits or bytes that is fixed on a case-by-case basis and is treated as a transport unit. The block structure and the block elements correspond to the relevant communication protocols .
Hard drives and floppy disks
Data blocks occur on hard disks and floppy disks on different levels of abstraction. On the one hand, the communication between the operating system and the device controller (built into contemporary hard drives) and access to the data carrier by the device controller takes place in blocks. (The sizes of the blocks for communication and access are usually the same, except for so-called 512e hard disks .) On the other hand, the data is organized by the operating system (more precisely: by the file system driver), also in blocks. In order to distinguish the two things, especially in the Microsoft operating system environment , the sector for the former and cluster (allocation unit) for the latter is sometimes used . A cluster practically always comprises one or more (usually a power of two) sectors, for example eight. It should be noted that the word sector is actually used imprecisely here, as it is traditionally used in analogy to the term circular sector . It actually stands for all data blocks in the corresponding circular sector, whereby a certain data block is only specified together with the head and cylinder number ( CHS addressing ).
A data block (called block or sector for short ) is the smallest unit of a hard disk or floppy disk that can be read or written in one access. Data blocks are traditionally 512 bytes in size, which corresponds to the cluster size of the original Unix file system; Since around 2010 there have been an increasing number of hard drives with 4096-byte data blocks, which corresponds to the minimum cluster size of modern operating systems. (For details on this and problems with the conversion, see the Advanced Format section in the Hard Disk Drive article .) Each data block on a data carrier can be uniquely addressed using various methods - such as LBA (addressing using consecutively numbered blocks) and CHS addressing (addressing using Cylinder, head and sector number) - there. The more modern LBA process is no longer based on the hard disk geometry; This is so complex with contemporary hard drives that it cannot be mapped via CHS anyway. For this reason, the hard disk controller also converts the address during CHS addressing and provides the host (computer with operating system) with a fictitious geometry that fits within the framework of the restrictions due to CHS addressing.
File systems usually no longer organize data on the lowest level of the data blocks, but on the next higher level, that of the cluster (term under Windows ; term under Linux : blocks). In contrast to the previously common geometry-based addressing , this method is also called block-based addressing .
The block size for audio CDs is 2352 bytes, corresponding to 1/75 s of audio data. For data storage on CD-ROM (mode 1), for example , 2048 bytes of user data with additional error correction and synchronization data are stored in a 2352-byte block. This achieves a practicable block size of 2 KiB while at the same time reducing the bit error rate by about ten thousand times the value for audio CDs.
In computer networks, blocks of data are referred to as data packets . In most network protocols , the packet length is variable, but there are often minimum or maximum lengths for the packets. For example, an Ethernet packet must be at least 72 bytes in size. If less data is to be sent, the packet is artificially enlarged by means of padding data (e.g. zeros), which are ignored by the recipient.
The SCSI protocol uses data blocks to send commands. In addition to SCSI drives, it also occurs on drives with removable media (CD and DVD drives) in the computer. There, data packets are referenced as packets that are 10, 12 or 16 bytes in size by command.