Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* How to read/write VMS (RMS?) disk blocks asynchronously
@ 1992-08-11 14:30 Mark R. Ludwig
  1992-08-12  9:54 ` David Stine
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark R. Ludwig @ 1992-08-11 14:30 UTC (permalink / raw)


I'm looking for RTFM pointers.  

I currently have a Fortran application using $READ and $WRITE
(SYS$READ and SYS$WRITE, actually) to read and write file blocks.  The
higher-level application supports the idea that I/O may be
asynchronous for better throughput by overlapping computing with I/O.

I've read much of the RMS Reference, and concluded that the
asynchronous support there is quite limited, because it only allows
one operation at a time (on a FAB, or RAB, I forget exactly which).
For our application it is not feasible to have multiple FABs or RABs
for a single file.

I've also heard that it may be possible to use $QIO for I/O to and
from disk files, but it's not at all obvious from the various manuals
how one accomplishes this without requiring xxx_IO privileges and
different code for different disk drivers.  It's also unclear how RMS
fits into the $QIO picture, in terms of the usual information about
the file (modification dates, etc.).

If you can send information or point me to the manual sections which
discuss this stuff, I'd appreciate it very much.$$
-- 
INET: mrl@uai.com      BANG: uunet!uaisun4!mrl      ICBM: USA; Lower Left Coast
  "You can get a crowd to clap at a phone number, if the inflection is right."
   -- Dave Ross


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to read/write VMS (RMS?) disk blocks asynchronously
  1992-08-11 14:30 How to read/write VMS (RMS?) disk blocks asynchronously Mark R. Ludwig
@ 1992-08-12  9:54 ` David Stine
  1992-08-12 16:12 ` Terry Kennedy, Operations Mgr.
  1992-08-13  0:23 ` Blair Phillips - Digital
  2 siblings, 0 replies; 4+ messages in thread
From: David Stine @ 1992-08-12  9:54 UTC (permalink / raw)


In article <MRL.92Aug11103051@sun4.uai.com> mrl@uai.com (Mark R. Ludwig) writes:
>I'm looking for RTFM pointers.  
>
>[...]

>I've read much of the RMS Reference, and concluded that the
>asynchronous support there is quite limited, because it only allows
>one operation at a time (on a FAB, or RAB, I forget exactly which).
>For our application it is not feasible to have multiple FABs or RABs
>for a single file.

Isn't RMS a gas? ;-) 

>I've also heard that it may be possible to use $QIO for I/O to and
>from disk files, but it's not at all obvious from the various manuals
>how one accomplishes this without requiring xxx_IO privileges and
>different code for different disk drivers.  It's also unclear how RMS
>fits into the $QIO picture, in terms of the usual information about
>the file (modification dates, etc.).

Yes, this is possible. The facility you are looking for is called the XQP
(eXtended Qio Processor) and is documented in the "IO User's Manual", Volume
8. 

Basically, in making calls to the XQP, you must deal with the file at a
_block_ level. There is no concept of a "record" to the XQP. RMS calls the XQP
to perform file/directory/block IO stuff; RMS figures out how to make blocks
into records. The block numbers you call out for operations in the XQP are
"virtual" blocks; ie, you view the disk as one huge collection of randomly
accessable blocks; there are no gaps in the VBN's on the volume, regardless un
underlying physical structure or bad block replacements. The XQP, in turn,
will make calls to the disk driver(s) in order to access the correct
logical/physical blocks.

To use the XQP to just create/read/write/delete/enter files in the normal
fashion, you don't need any privs other than those you would need to access
the same file via RMS.  If you start trying to call out logical or physical
block numbers, then you would need LOG_IO or PHY_IO.

The XQP is not for the faint of heart to use. The documentation tends to make
asumptions about your knowledge of ODS-2 and ODS-1. But you _can_ get very
fast, async IO to/from files/disks/magtapes with the XQP. You might try
looking on the DECUS tapes for examples of how to use the XQP. Reading the XQP
fiche for answers is _not_ easy.

dsa


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to read/write VMS (RMS?) disk blocks asynchronously
  1992-08-11 14:30 How to read/write VMS (RMS?) disk blocks asynchronously Mark R. Ludwig
  1992-08-12  9:54 ` David Stine
@ 1992-08-12 16:12 ` Terry Kennedy, Operations Mgr.
  1992-08-13  0:23 ` Blair Phillips - Digital
  2 siblings, 0 replies; 4+ messages in thread
From: Terry Kennedy, Operations Mgr. @ 1992-08-12 16:12 UTC (permalink / raw)


In article <MRL.92Aug11103051@sun4.uai.com>, mrl@uai.com (Mark R. Ludwig) writes:
> I've read much of the RMS Reference, and concluded that the
> asynchronous support there is quite limited, because it only allows
> one operation at a time (on a FAB, or RAB, I forget exactly which).
> For our application it is not feasible to have multiple FABs or RABs
> for a single file.

  Look at the read-ahead and write-behind options and the multibuffer count.
In VAX C you can specify these options in the fopen() statement as rah=n,
wbh=n, mbf=n. These must exist in RMS, rather than being C-specific. Try
looking in the Master Index for these items.

	Terry Kennedy		Operations Manager, Academic Computing
	terry@spcvxa.bitnet	St. Peter's College, Jersey City, NJ USA
	terry@spcvxa.spc.edu	+1 201 915 9381


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to read/write VMS (RMS?) disk blocks asynchronously
  1992-08-11 14:30 How to read/write VMS (RMS?) disk blocks asynchronously Mark R. Ludwig
  1992-08-12  9:54 ` David Stine
  1992-08-12 16:12 ` Terry Kennedy, Operations Mgr.
@ 1992-08-13  0:23 ` Blair Phillips - Digital
  2 siblings, 0 replies; 4+ messages in thread
From: Blair Phillips - Digital @ 1992-08-13  0:23 UTC (permalink / raw)



In article <MRL.92Aug11103051@sun4.uai.com>, mrl@uai.com (Mark R. Ludwig) writes:
>
>I'm looking for RTFM pointers.  
>
>I currently have a Fortran application using $READ and $WRITE
>(SYS$READ and SYS$WRITE, actually) to read and write file blocks.  The
>higher-level application supports the idea that I/O may be
>asynchronous for better throughput by overlapping computing with I/O.
>
>I've read much of the RMS Reference, and concluded that the
>asynchronous support there is quite limited, because it only allows
>one operation at a time (on a FAB, or RAB, I forget exactly which).
>For our application it is not feasible to have multiple FABs or RABs
>for a single file.
>
The simplest way to do what you want is to open the file using RMS specifying
the User File Open option (UFO) in the FOP field of the FAB. The channel number
assigned is returned in the FAB$L_STV field, and you then use that to do
normal $QIO's on the file. As long as you stick to virtual i/o (i.e. block
specified within the file) no special privs. are needed.

There are a few caveats - look up the RMS manual for details.

--
----------
Blair Phillips					Blair.Phillips@cao.mts.dec.com
Digital Equipment Corp (Aust) P/L		Phone: (+61 6) 2754874
7-11 Barry Drive, Turner, ACT 2601 AUSTRALIA	FAX  : (+61 6) 2473654



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1992-08-13  0:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1992-08-11 14:30 How to read/write VMS (RMS?) disk blocks asynchronously Mark R. Ludwig
1992-08-12  9:54 ` David Stine
1992-08-12 16:12 ` Terry Kennedy, Operations Mgr.
1992-08-13  0:23 ` Blair Phillips - Digital

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox