home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / vms / 19496 < prev    next >
Encoding:
Text File  |  1992-12-20  |  2.0 KB  |  44 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!munnari.oz.au!sol.deakin.OZ.AU!news.cs.uow.edu.au!cssc-syd.tansu.com.au!boar!brianm
  3. From: brianm@boar.tansu.com.au (Brian Martin)
  4. Subject: Re: $QIO: What happens within?
  5. Message-ID: <1992Dec18.023236.11252@cssc-syd.tansu.com.au>
  6. Sender: news@cssc-syd.tansu.com.au
  7. Nntp-Posting-Host: boar.cssc-syd.tansu.com.au
  8. Reply-To: brianm@boar.tansu.com.au
  9. Organization: AOTC - CSSC
  10. References: <9212151432.AB02522@uu3.psi.com>
  11. Date: Fri, 18 Dec 1992 02:32:36 GMT
  12. Lines: 30
  13.  
  14. re: $QIO: What happens within?
  15.  
  16. I am unsure who posted the original question, I've seen only Jerry Leichter's
  17. reply, which I generally agree with.
  18. Without wishing to contradict, I hope the following is useful ...
  19.  
  20. QIO's can be done in many ways, depending on the IO driver. In the case of mailboxes 
  21. (MBX) especially, you should read both SYS$QIO() in System Services manl,
  22. and also Mailbox Driver support in I/O Users Manual.
  23. Note that physical/logical/virtual i/o are treated the same by VMS MBX driver.
  24. Note the special optimisation in the driver, which is that when you QIO write to
  25. a MBX, if a pending read is already outstanding, then the data is copied directly
  26. to the pending reads buffer (normally in another tasks address space) without
  27. ever going through the (system allocated) buffers which store the MBX proper.
  28. How literally this is true I do not know, but it seems borne out in practice,
  29. and is explained (very badly) in the I/O users manual, and again in incredible detail
  30. in the "VMS Internals" book (author ?).
  31. If there is no pending read, then the data is actually copied into the MBX buffer,
  32. and at a later time copied from there into the readers specified buffer.
  33.  
  34. When using QIO (not QIOW) the only safe way is to use either globals or malloc'd
  35. space, for the read/write buffers, the lengths, and the IOSB blocks if used.
  36. Finally check the status of the original QIO, the status of the IOSB on completion,
  37. & the length actually read/written in the IOSB against what you requested.
  38.  
  39. Hope that helps.
  40. Brian Martin
  41. brianm@cssc-syd.tansu.com.au
  42.  
  43.  
  44.