Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cied(7)

cimd(7)

cird(7)

,sd(7)

da(7)

nvrd(7)

vdm*(7)

intro(7)



rdsk(7)                        DG/UX R4.11MU05                       rdsk(7)


NAME
       rdsk - character special disk interface

DESCRIPTION
       This character special device provides direct access to a virtual or
       physical disk in a slightly different manner from dsk(7).  In this
       case, the disk should be considered to be an array of 512-byte disk
       blocks numbered from 0 to N-1, where N is the number of blocks in the
       disk.

       The rdsk device is typically implemented so that requests for large
       amounts of data (say, an entire track of the disk) can be serviced
       with far fewer explicit requests to the physical disk than can the
       dsk device.  Efficiency  improves because of restrictions in the way
       rdsk may be used, as described below.

       The open system call performs device-specific operations to
       initialize the disk.  Except for errors that may be reported because
       of controller or unit failures, user-visible functionality is the
       same as for an ordinary disk file.

       For the close system call, user-visible functionality is the same as
       for an ordinary disk file.

       The read system call must begin and end on a 512-byte boundary; i.e.,
       the starting address and the length of the read must be multiples of
       512.  Reads on other boundaries and of other sizes will return the
       error EINVAL.  Reading data that has "never been written" returns
       whatever happens to be there, in contrast to an ordinary disk file
       which returns zero.  A read request that extends past the end of the
       disk will only have the bytes up to the end of the disk transferred
       and the number of remaining bytes not transferred will be returned.
       If the request starts past the end of the disk, ENXIO will be
       returned and no data will be transferred.

       The write system call must begin and end on a 512-byte boundary;
       i.e., the starting address and the length of the write must be
       multiples of 512.  Writes on other boundaries and of other sizes will
       return the error EINVAL.  A write request that extends past the end
       of the disk will only have the bytes up to the end of the disk
       transferred and the number of remaining bytes not transferred will be
       returned.  If the request starts past the end of the disk, ENXIO will
       be returned and no data will be transferred.

       The DSKIOCGET ioctl command returns information about the
       characteristics of a disk.  The command and structure for this ioctl
       are defined in <sys/ioctl.h>.

       A pointer to the structure dskget is the parameter that is passed on
       the system call.

       struct dskget
            {
            unsigned long  total_sectors;
            unsigned short bytes_per_sector;
            unsigned short controller_id;
            };

       The total_sectors field is the number of sectors available on the
       disk.   The sectors have addresses 0 through "total_sectors" - 1.
       This value does not include sectors that are normally inaccessible
       because they are used for controller remapping, for diagnostic
       tracks, or for controller firmware.  Some of the sector blocks may be
       not be useable because of media flaws.  The bytes_per_sector field
       indicates the size, in bytes, of each sector.  The controller_id
       field is a controller unique identifier reported by the disk
       controller.   A returned value of 0 indicates that the controller
       does not report an id.

       The DSKIOCUSAGE ioctl command returns usage information about the
       disk. The command and structure for this ioctl are defined in
       <sys/ioctl.h>.

       A pointer to the structure dskusage is the parameter that is passed
       on the system call.

       struct dskusage
            {
            unsigned long  read_block_count;
            unsigned long  write_block_count;
            unsigned long  read_request_count;
            unsigned long  write_request_count;
            struct timeval busy_time;
            struct timeval response_time;
            };

       The read_block_count field is the number of 512-byte blocks that have
       been read from the disk unit.  The write_block_count is the number of
       512-byte blocks that have been written to the disk unit. The
       read_request_count is the total number of read requests that have
       been handled.  The write_request_count is the total number of write
       requests that have been handled.  The busy_time file is the total
       amount of time since system boot time that the disk unit has been
       busy working on requests.  The response_time field is the total
       amount of time since system boot time that requests to the unit have
       spent waiting to be completed.  This includes time spent on various
       queues.

       Select always returns READY for both read and write operations.

FILES
       /dev/rdsk/*              Virtual disk device names for character
                                special access
       /dev/rpdsk/*             Physical disk device names for character
                                special access
       /usr/include/sys/ioctl.h Ioctl definitions

SEE ALSO
       cied(7), cimd(7), cird(7) ,sd(7), da(7), nvrd(7), vdm*(7), intro(7).


Licensed material--property of copyright holder(s)

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