Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(4)

mkdev(1M)

mknod(1M)

DISC(4)

NAME

disc − direct disc access

HP-UX COMPATIBILITY

Level: HP-UX/RUN ONLY

Origin: HP

DESCRIPTION

This page describes the actions of the general HP-UX disc drivers when referring to a disc as either a blocked or unblocked (raw or character special) device. 

Block special files access discs via the system’s normal buffering mechanism.  Buffering is done in such a way that concurrent access through multiple opens or mounts of the same physical device do not get out of phase.  Block special files may be read and written without regard to physical disc records. Each I/O operation results in one or more logical block transactions. 

There is also a raw interface via a character special file which provides for direct transmission between the disc and the user’s read or write buffer.  A single read or write operation results in exactly one transaction.  Therefore raw I/O is considerably more efficient when many bytes are transmitted in a single operation because blocked disc access requires potentially several transactions and does not transmit directly to user space. 

In raw I/O, there may be implementation dependent restrictions on the alignment of the user buffer in memory.  Also, each transfer must occur on a sector boundary and must read a whole number of sectors.  The sector size is a hardware dependent value (1024 bytes is the generally preferred value). 

Each raw access is independent of other raw accesses and of block accesses to the same physical device.  Thus, transfers are not guaranteed to occur in any particular order. 

In both raw and blocked I/O, each operation is completed to the device before the call returns.  In addition, blocked I/O potentially does a one (or more) block read-ahead. 

The name of a raw device (its character special file name) is typically the same as the name of the corresponding blocked device (its block special file name) prefixed with an "r". 

SEE ALSO

intro(4), mkdev(1M), mknod(1M), and the HP-UX System Administrator Manual included with your system. 

WARNING

On some systems, having both a mounted file system and a block special file open on the same device is asking for trouble; this should be avoided if possible.  This is because it may be possible for some files to have private buffers in some systems. 

Like discs, the cartridge tape units in command set 80 disc drives are also accessed as blocked or raw devices.  However, using a cartridge tape as a file system will severely limit the life expectancy of the tape drive.  Tapes should only be used for system back-up and other needs where data must be stored on tape, such as for transport or other uses. 
 
 

Hewlett-Packard  —  last mod. May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026