hx(4)
NAME
hx − RX211/RX02 floppy disk
DESCRIPTION
Each hk file refers to an entire disk as a single sequentially-addressed file. The physical disk sector size is 128 bytes for single density and 256 bytes for double density, the logical block size is 512 bytes. Each diskette has 500 logical blocks, single density and 1001 logical blocks, double density. The minor device numbers have the following significance:
| NAME | MINOR DEVICE | UNIT | DENSITY | FORMAT |
| hx0 | 0 | 0 | single | interleaved |
| hx1 | 1 | 1 | single | interleaved |
| hx2 | 2 | 0 | double | interleaved |
| hx3 | 3 | 1 | double | interleaved |
| hx4 | 4 | 0 | single | physical |
| hx5 | 5 | 1 | single | physical |
| hx6 | 6 | 0 | double | physical |
| hx7 | 7 | 1 | double | physical |
| hx8 | 8 | 0 | single | extended |
| hx9 | 9 | 1 | single | extended |
Refer to the ULTRIX-11 System Management Guide, Section 1.4 for more information about logical disk names and Appendix D for disk sizes.
The hx files discussed above access the disk via the system’s normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ’raw’ interface which provides for direct transmission between the disk and the user’s read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw HX files begin with rhx and end with a number which selects the same disk as the corresponding hx file.
In raw I/O the buffer must begin on a word boundary, and counts should be a multiple of 512 bytes (a disk block). Likewise seek calls should specify a multiple of 512 bytes.
A logical 512 byte block is made up of four physical sectors on the single density devices, and two physical sectors on the double density devices. The four ’physical’ device names are a straight mapping from the logical block number to the physical sectors, thus logical block 0 maps to track 0, sectors 1-2 for double density, and track 0, sectors 1-4 for single density. This is not very efficient, since the controller spends most of it’s time waiting for the disk to get into position. The four ’interleaved’ devices map logical blocks to every other sector in the track. In addition, there is a six sector slew between tracks. Thus, logical block 0 would be track 1, sectors 1, 3, 5 and 7 for single density, and sectors 1 and 3 for double density. Note that the ’interleaved’ devices start with track 1, go to track 76, and then to track 0, where as the ’physical’ devices start with track 0.
There are a total of 2002 sectors on a floppy, which for single density is a total of 500.5 512 byte blocks. The ’interleaved’ devices ignore the last half block (track 0, sectors 24 and 26). This last half block can be accessed by using the ’extended’ devices, which have a size of 501 blocks. When writing block 501, only the first 256 bytes will be written, the rest is discarded. When reading block 501, the last 256 bytes are guaranteed to be nulls. These devices are intended for floppy image copies only, and should NOT be used for normal filesystems.
RESTRICTIONS
In raw I/O read and write truncate file offsets to 512-byte block boundaries, and write writes data on the tail of incomplete blocks. Thus, in programs that are likely to access raw devices, read, write, and lseek should always deal in 512-byte multiples.
FILES
/dev/hx#, /dev/rhx#
SEE ALSO
rx2fmt(8)
ULTRIX-11 System Management Guide
ULTRIX-11 Software Technical Description