[Info-vax] QIO Writes to a mailbox

George Cornelius cornelius at eisner.decus.org
Sat Nov 5 05:19:18 EDT 2011


JF Mezei wrote:
> But when QIO executes, doesn't it invoke some driver code to "queue" the
> IO, and isn't it possible that for a write to memory device, that drive
> code might actually do the write to the mailbox device ?

Yes.  But you have already given a scenario where that will not work, and
it's bad form in general to rely on a 'start i/o' to actually do the i/o.
There's a discipline to using $QIO and $QIOW and it is best to follow it
in all cases instead of trying to shortcut it because you have inside
information on how a specific driver might work. Write your code as if
you are demonstrating to others how things should be done, not as a way
to demonstrate how much inside information you have.

> And if a mailbox is full, I know that QIOW will cause process to hang on
> a RWMBX, but would a QIO also result in this ?

I don't believe the process hangs if you do a $QIO, but I am not sure.

I also do not know for sure, if you leave out the IO$M_NOW modifier,
whether VMS even bothers to copy your data to nonpaged pool instead
of waiting for a rendezvous - the point where the driver can
simultaneously map both buffers and perform a direct buffer to
buffer move operation.  This adds complexity and was probably
long ago deemed not worth the effort, especially in environments
where paging and swapping were occurring.

George



More information about the Info-vax mailing list