home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / vmsnet / internal / 1114 < prev    next >
Encoding:
Internet Message Format  |  1992-07-24  |  3.3 KB

  1. Path: sparky!uunet!wupost!cs.utexas.edu!rutgers!dziuxsolim.rutgers.edu!zodiac.rutgers.edu!leichter
  2. From: leichter@zodiac.rutgers.edu
  3. Newsgroups: vmsnet.internals
  4. Subject: RE: VMS Memory Management/PGFLQUOTA question
  5. Message-ID: <1992Jul24.081332.1@zodiac.rutgers.edu>
  6. Date: 24 Jul 92 12:13:32 GMT
  7. References: <51000F6F_00057EE8.0095DF402228FBE0$6_1@UK.AC.KCL.PH.IPG> <1992Jul23.153406.1@amherst.edu>
  8. Sender: news@dziuxsolim.rutgers.edu
  9. Organization: Rutgers University Computing Services
  10. Lines: 53
  11. Nntp-Posting-Host: cancer.rutgers.edu
  12.  
  13. In article <1992Jul23.153406.1@amherst.edu>, jwmanly@amherst.edu writes:
  14. ||| address space for my exclusive use in an image.  We're talking a quarter of a
  15. ||| gigabyte or so here.
  16. || Why is it desired to greate a quarter-Gbyte address space that is reserved
  17. || against use by system routines, but not associated with backing store? The
  18. || only thing I can think of is come sort of very sparsely populated matrix,
  19. || but there are better ways to code these as linked lists...
  20. | You are basically correct.  It's not actually a matrix but it is a large
  21. | yet extremely sparse data structure.  If you like, though, you can think
  22. | of it as a huge matrix.  HOWEVER, I don't have control over how the matrix
  23. | cells are accessed.  Think of me as a lowly library routine responsible only
  24. | for creating this monstrosity.
  25. | The matrix has to look to the user as if it really is all there, but my  code
  26. | fields the access violations on non-existent pages (using a condition handler
  27. | in the secondary vector or something), do a $CRETVA on the pages as they are
  28. | accessed, and continue.
  29.  
  30. Well, the first thing to realize is that you can't really do what you want:
  31. The VAX architecture doesn't support sparse page tables.  A page table always
  32. runs contiguously from page 0 up to some page.  If you want a process to have
  33. "a quarter of a gigabyte or so" of VM, you'll have to VIRTUALPAGECNT that
  34. high.  That's probably beyond the supported value, and will certainly cause
  35. quite a hit on your system, as it will cause the size of all the balance sets
  36. to grow to cover it.  I hope you have a LOT of real memory.
  37.  
  38. Now, given that you accept this limitation, you have to look at just what you
  39. are trying to accomplish.  You want a region of addresses (which don't yet
  40. correspond to memory) from START to END which you know no one else will
  41. ever use.  The only way such memory might be used is if someone allocated it,
  42. either useing LIB$GET_VM or one of the VMS memory system services.  The
  43. former is easy to deal with:  If LIB$GET_VM needs more memory, it always
  44. allocates it at the end of P0, use $EXPREG.  Direct calls to $EXPREG, of
  45. course, also allocate at the end of P0, as do most other things that allocated
  46. VM.  (The only thing that DOESN'T is $CRETVA.  You can do absolutely nothing
  47. about that.)
  48.  
  49. So, we simply have to ensure that we've put END at the end of P0.  This is
  50. easy:
  51.  
  52.     Use $EXPREG to allocate one page.  Its beginning address is START.
  53.     Calculate END from START.
  54.     Use $CRETVA to allocate the single page containing START.  The
  55.         addresses between START and END will not be usable by
  56.         LIB$GET_VM, $EXPREG, and such, and will not correspond to
  57.         any real memory or backing store until you use $CRETVA to
  58.         allocate them.
  59.  
  60. Expect poor performance.  Neither the VAX architecture nor VMS are designed
  61. for this kind of application.
  62.                             -- Jerry
  63.