home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / vmsnet / internal / 1714 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  2.6 KB

  1. Path: sparky!uunet!paladin.american.edu!gatech!uflorida!mailer.cc.fsu.edu!sun13!sun13.scri.fsu.edu!adk
  2. From: adk@sun13.SCRI.FSU.EDU (Tony Kennedy)
  3. Newsgroups: vmsnet.internals
  4. Subject: Re: Call for partly-baked ideas:  $QIO replacement?/extention
  5. Message-ID: <ADK.92Dec22012216@ds2.sun13.SCRI.FSU.EDU>
  6. Date: 22 Dec 92 06:22:16 GMT
  7. References: <1992Dec16.113301.977@cmkrnl.com> <1992Dec22.024303.1@cc.curtin.edu.au>
  8. Sender: news@sun13.scri.fsu.edu
  9. Organization: SCRI, Florida State University
  10. Lines: 40
  11. In-reply-to: zrepachol@cc.curtin.edu.au's message of 21 Dec 92 17:43:03 GMT
  12.  
  13. >> zrepachol  <zrepachol@cc.curtin.edu.au> writes:
  14.  
  15.    zrepachol> The change I would make is to buffer handling. On a read
  16.    zrepachol> the OS would do what ever needs to be done to dump the
  17.    zrepachol> data into mem, then fills in a pointer and size block
  18.    zrepachol> and maps the lot to your address space. By trapping the
  19.    zrepachol> page fault on a not yet mapped buffer pointer, the page
  20.    zrepachol> fault code can put the PC into a wait state till IO
  21.    zrepachol> completion clears the page fault condition. This would
  22.    zrepachol> enable atomic asyncronous IO from the user code view.
  23.  
  24. Just some random thoughts on this idea.
  25.  
  26. If I understand correctly you want to avoid having to explicitly check
  27. for an $QIO read completion (using event flags, ASTs, whatever) and
  28. just enter a PFW state if you try to read the data before it is ready.
  29.  
  30. You want to issue the $QIO, do something else for a while, and when
  31. you have nothing else useful to do try to read the data without having
  32. to do any special check. This allows more overlap of computation than
  33. a $QIOW.
  34.  
  35. I am not sure that a `low-level' system call needs to add the overhead
  36. of a PFW state instead of the usual LEF state for this purpose. At the
  37. (deterministic) place where you first try to read the data you just
  38. need to insert a $WAIT on the event flag. There is a trade-off between
  39. simplicity, efficiency, and flexibility here. $QIOW is even simpler
  40. than your scheme, but less efficient in overlapping IO and
  41. computation. The current $QIO is more flexible than your scheme, you
  42. can check whether the IO has completed without having to wait if it
  43. isn't, you can let it interrupt you when it is complete so you don't
  44. have to poll it, etc., and $WAITing on an event flag is probably
  45. cheaper than handling a page fault (albeit a soft one).
  46.  
  47. Finally, some of the functionality you want is provided by just
  48. mapping the file into virtual memory. In fact, by mapping in the file,
  49. and unmapping each page when you are done with it you have almost
  50. exactly what you are requesting, don't you?
  51.  
  52.     -Tony-
  53.