BASTXXXX - Pass control shared memory

SYNOPSIS

$PASSDIR/antenna/BASTXXXX

DESCRIPTION

The file BASTXXXX is a placeholder file associated with the shared memory that is defined below. The shared memory is allocated and cleared by the program passcontrol. If the this program is not executing, the shared memory will be released and no pass io action (read/write/seek) will be possible. The shared memory area is loaded from the file BAST, and is updated as passes are stored on the pass disk.

The are two sections to the shared memory. The first is the partition information associated with each disk partition, and the second is the bad sector table for each disk.

Disk partition structure

struct dual_port_disk_host
{
   long passnumber;  /* pass number associated with this partition. */
   long acc;         /* acc number associated with this partition. */
   long start_block; /* first block of the partition.
                        Absolute sector number on the disk. */
   long end_block;   /* Last block of the partition.
                        Absolute sector number on the disk. */
   long bad_sector_table; /* Index into 'disk_bad_sector' as the
                             disk unit associated with this
                             partition. Origin 0. */
   long state;       /* status of this partition. */
   long num_blks_io; /* number of blocks in one frame i/o.
                        =44 HRPT, =48 DMSP. */
   long num_bytes_blk; /* number of bytes in one sector of the
                          device. = 512 for pass disk. */
   long num_io;      /* last block of the partition actually written.
                        Absolute sector number on the disk. */
   long read_count;  /* number of opens to READ on this pass by
                        all users. == 0 when PASS_AVAIL or PASS_WRITE */
   char pass_host[MAX_HOST_NAME+1]; /* host associated with this partition. */
   char device[MAX_PASS_DEVICE+1]; /* device associated with this partition. */
};

The members of the structure are:

long passnumber - is the pass number (origin 0) associated with this disk partition. Loaded from BAST

long acc - is the antenna controller associated with this pass. Usually this value is 0. This value is loaded from the file BAST.

long start_block - is the first block of the disk that begins this TeraScan pass partition. This block may be at the start of a disk partition or may be within a disk partition. Origin 0. This value is loaded from the file BAST.

long end_block - is the ending block of the disk for this pass partition. Origin 0. This value is loaded from the file BAST.

long bad_sector_table - is the index into the bad sector table. Origin 0. This value is loaded from the file BAST.

long state - is the current state of this pass partition. The following states can be or'ed together:

#define PASS_READ 2
#define PASS_WRITE 4
#define PASS_LOCK 64
#define PASS_AVAIL 1
#define PASS_UNDEFINED -1
#define PASS_PARTITION 0

long num_blks_io - is the number of disk blocks in one frame as read from the frame synchronizer. This value depends on the type of telemetry data. For HRPT data, num_blks_io=44. For RTD, num_blks_io=48.

long num_bytes_blk - is the number of bytes in one sector of the disk. Usually this value is 512.

long num_io - is the last block of the pass partition actually written for this pass.

long read_count - is the number of users currently reading this pass. This value can be >=0. This value =0 when the pass is available (no data written to it) or when the pass state is PASS_WRITE (i.e. no user can read from the pass when it is being written).

char pass_host - name of the host associated with this pass partition. This value is loaded from the file BAST.

char device - is the name of the device associated with this pass partition. This value is loaded from the file BAST.

The structure is indexed (for example) as:

pass_disk_info[pass_number].next_block

The second section of the shared memory is the disk bad sector array. It is an integer array indexed as

disk_bad_sector[i*PASS_MAX_BAD_SECT+sector index]

This bad sector table contains a list of all bad sectors for each disk, in ascending order. The last entry in each disk's list is the maximum disk sector+1.

FILES

None.

SEE ALSO

BAST, SHMEM_ACC

NOTES

The following limits apply to the disk partitions:
#define PASS_MAX_PARTITIONS  40  /* Maximum number of partitions in tables */
#define PASS_MAX_LU          8   /* Maximum number of disks per ACC */
#define PASS_MAX_BAD_SECT    100 /* Maximum number of bad sectors per disk. */
#define MAX_BAST_REC         128 /* Maximum size of a bad record, bytes. */
#define MAX_HOST_NAME        11  /* Maximum num chars in a host name. */
#define MAX_PASS_DEVICE      31  /* Max num chars in a device path. */

Last Update: $Date: 1999/05/10 20:58:48 $