01/24/83 rdisk_ The rdisk_ I/O module supports I/O from/to disk packs. Sequential and indexed file types are supported. This I/O module is a very elementary, physical-device-oriented I/O facility, providing the basic user-level interface to a disk device. All operations are performed through calls to various I/O interfacer (IOI) mechanisms and resource control package (RCP) entries. Detailed information can be found in the Multics Subroutines and I/O Modules (AG93). Entries in this module are not called directly by users; rather, the module is accessed through the I/O system. For a general description of the I/O system and a discussion of files, see the Programmer's Reference Manual. All errors encountered by rdisk_ are reported via the sub_err_ subroutine with the "flags" variable set to ACTION_DEFAULT_RESTART. The "info_ptr" variable passed to sub_err_ is set to null. Syntax for Attach Description: rdisk_ device_id pack_id {-control_args} Arguments: device_id is a character string identifying the type number of the required disk device. The supported disk devices are listed in the table below, along with the character string to use for device_id: device_id Device Type --------- ----------- d181 DSU181 d190 DSU190 d191 or d400 DSU190/MSU0400 with the high-efficiency format (40 sectors/track) d451 MSU0451 d500 MSU0500 d501 MSU0501 pack_id is a character string identifying the disk pack to be mounted. Control arguments: -size N indicates that the value of N is to override the value of the buff_len parameter as a record size limit for the read_record operation. (See "Notes" below.) -sys indicates that the attachment is being made by a system process and that a disk drive reserved for system functions is to be assigned. -write indicates that the disk pack may be written on. If omitted, the operator is instructed to mount the pack with the PROTECT button pressed so that writing is inhibited. Notes: The attachment causes the specified disk pack to be mounted on a drive of the specified type. Opening: The following opening modes are supported: sequential_input sequential_output sequential_update direct_input direct_update Notice that if the opening mode is of the output or update type, the attach description must include the -write control argument so that the operator does not press the PROTECT button when the pack is mounted. Position Operation: This operation is supported for only the sequential_input and sequential_update opening modes. The type and quantity values are interpreted as follows: TYPE QUANTITY ACTION ---- -------- ------ -1 -- position to the beginning of the disk pack. +1 -- position to the end of the disk pack. 0 N skip N sectors (forward if N > 0; backward if N < 0). 2 N position to sector N. Read Record Operation: If the amount of data to be read does not terminate on a sector boundary, the excess portion of the last sector is discarded. A code of 0 is returned in this case. (See "Notes" below.) This operation is not supported for the sequential_output opening mode. Rewrite Record Operation: If the amount of data to be written does not terminate on a sector boundary, the remaining portion of the last sector is filled with spaces in sequential modes and binary zeros in direct modes. A code of 0 is returned in this case. (See "Notes" below.) This operation is supported for only the update opening modes. Seek Key Operation: This operation returns a status code of 0 for any key that is a valid sector number. The record length returned is always 256 (current physical sector size in characters) for any valid key. The specified key must be a character string that could have been produced by editing through a PL/I picture of "(8)9". (See "Notes" below.) This operation is supported for only the direct opening modes. List of Control Orders: The following orders are supported when the I/O switch is open, except for getbounds, which is supported while the switch is attached. changepack causes the current pack to be dismounted and another pack to be mounted in its place. The info_ptr should point to a varying character string (maximum of 32 characters) containing the identifier of the pack to be mounted. This operation is not allowed for MSU0500 or MSU0501 devices. device_info causes information pertaining to the attached disk device to be returned to the user. See the section "device_info_table Structure" below for the structure to which the info_ptr should point. format_trk causes a format track command to be issued to the track that was indicated by a preceding seek_key operation. This operation is not allowed for MUS0500 or MSU0501 devices. The info_ptr should point to a user supplied structure of the form described under "format_trk_info Structure" below. rd_trk_header causes a read track header command to be issued to the track that was indicated by a preceding seek_key operation. This operation is not allowed for MUS0500 or MSU0501 devices. The raw track header information is passed to the user in a structure (pointed to by info_ptr) of the form described under "trk_header_info Structure" below. tsize causes the value of the record size override setting to be reset. The info_ptr should point to an aligned fixed binary(35) quantity containing the new override value. device_info_table Structure: dcl 1 device_info_table aligned, 2 subsystem_name char (4), 2 device_name char (8), 2 sect_per_dev fixed bin (35), 2 cyl_per_dev fixed bin, 2 sect_per_cyl fixed bin, 2 sect_per_track fixed bin, 2 num_label_sect fixed bin, 2 num_alt_sect fixed bin, 2 sect_size fixed bin (12); where: subsystem_name is the name of the disk subsystem in use (i.e., D191). device_name is the name of the disk device in use (i.e., dska_04). sect_per_dev is the total number of non-T&D sectors on the disk pack. cyl_per_dev is the total number of non-T&D cylinders on the disk pack. sect_per_cyl is the number of data sectors on each cylinder of a disk pack. sect_per_track is the number of data sectors on each track. num_label_sect is the number of data sectors to reserve for label information. num_alt_sect is the number of data sectors to reserve for alternate track area. sect_size is the number of 36-bit words in each data sector. format_trk_info Structure: dcl 1 format_trk_info aligned, (2 hz bit (2), 2 ti bit (2), 2 adcyl fixed bin (16), 2 adhd fixed bin (16)) unaligned; where: hz is a bit pattern indicating the state of the header bypass switch. The hz bits are defined as follows: h z bit pattern meaning. 0 0 format home address and all data records. 0 1 verify home address and record one, format home address and all data records. 1 0 skip home address, format all data records. 1 1 verify home address and data record one, skip home address and format all data records. ti is a bit pattern indicating the state of the track indicator bits. The ti bits are defined as follows: t i bit pattern meaning. 0 0 format track good. 0 1 format track alternate. 1 0 format track defective with alternate track assigned. 1 1 format track defective with no alternate track assigned. adcyl, adhd are the alternate or defective cylinder and head numbers used when the track indicator bits equal "01"b or "10"b. These two fields are defined as follows: 1. If the track indicator bits are set to "01"b (alternate track), then adcyl and adhd should be equal to the defective pcylinder and head number for which the alternate track is being formatted. 2. If the track indicator bits are set to "10"b (defective with alternate assigned), then adcyl and adhd should be equal to the cylinder and head number of the alternate track. getbounds causes the lowest and highest sector numbers accessible by the caller under the current modes to be returned. The info_ptr should point to a structure of the following form: dcl 1 bounds, 2 low fixed bin(35), 2 high fixed bin(35); trk_header_info Structure: dcl 1 trk_header_info aligned, (2 ha_cyl bit (16), 2 ha_head bit (16), 2 pad1 bit (2), 2 ha_ti bit (2), 2 pad2 bit (10), 2 rcd_0_ti bit (2), 2 rcd_0_cyl bit (16), 2 rcd_0_head bit (16), 2 rcd_0_rn bit (8), 2 pad3 bit (24), 2 rcd_0_data (8), bit (8), 2 pad4 bit (4)) unaligned; where: ha_cyl is the cylinder number read from the track home address. ha_head is the head number read from the track home address. ha_ti is the track indicator bits (defined above in the format_trk order) read from the track home address. rcd_0_ti is the track indicator bits read from record zero. If the ha_ti bits indicate "10"b, then rcd_0_ti should equal "01"b for alternate track. If ha_ti indicates "01"b, then rcd_0_ti should equal "10"b for defective track. Otherwise rcd_0_ti will equal ha_ti. rcd_0_cy, rcd_0_head are the cylinder and head number read from record zero. If ha_ti indicates "10"b, then rcd_0_cyl and rcd_0_head equal the cylinder and head number of the alternate track. If ha_ti indicates "01"b, then rcd_0_cyl and rcd_0_head contain the cylinder and head number of the defective track. Otherwise, rcd_0_cyl and rcd_0_head equal ha_cyl and ha_head. rcd_0_rn is the record number for record zero (normally equal to zero). rcd_0_data is the eight data bytes in record zero (not a normal data record) and is normally equal to zero. padn are unused bits that are returned as "0"b. Modes Operation: The modes operation is supported when the I/O switch is attached. The recognized modes are listed below. Each mode has a complement indicated by the circumflex character (^) that turns the mode off. List of modes: label, ^label specifies that a system-defined number of sectors at the beginning of the pack are reserved for a pack label, and that a seek_key or position operation is to treat any key or position within this area as an invalid key. (The default is on.) raw, ^raw specifies that the entire disk pack is available to the user, including the T&D cylinder (the last cylinder on the disk pack). (The default is off.) alttrk, ^alttrk specifies that the pack has been formatted with the assignment of alternate tracks, so that a system-defined number of sectors at the end of the pack are reserved for an alternate track area. Therefore, a seek_key or position operation is to treat any key within that area as an invalid key. (The default is off.) This mode cannot be enabled for a MSU0500 or MSU0501 disk. wrtcmp, ^wrtcmp specifies that the write-and-compare instruction, rather than the write instruction, is used for the rewrite_record operation. This causes all data written to be read back and compared to the data as it was prior to being written. This mode should be used with discretion, since it doubles the data transfer time of every write. (The default is off.) Write Record Operation: If the amount of data to be written does not terminate on a sector boundary, the remaining portion of the last sector is filled with spaces. A code of 0 is returned in this case. (See "Notes" below.) This operation is supported for only the sequential_output opening mode. A series of writes will write successive records. Closing: The closing has no effect on the physical device. For the sequential_output opening mode, the effect is as if an end-of-file flag is placed just beyond the end of the available disk area. Detaching: The detachment causes the disk pack to be detached from the users process. Syntax of Control Operations From Command Level: io_call control switch order_arg Arguments: switch is the name of the I/O switch. order_arg must be one of the following: changepack newpack where newpack is the name of the new pack to be mounted. setsize newsize where newsize is the new record size in words. getbounds ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved