home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12658 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.5 KB

  1. Path: sparky!uunet!ogicse!mintaka.lcs.mit.edu!zurich.ai.mit.edu!jinx
  2. From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
  3. Newsgroups: comp.sys.hp
  4. Subject: mmap on HP-UX 9.0 on s700
  5. Message-ID: <JINX.92Nov6221113@chamarti.ai.mit.edu>
  6. Date: 7 Nov 92 03:11:13 GMT
  7. Article-I.D.: chamarti.JINX.92Nov6221113
  8. Sender: news@mintaka.lcs.mit.edu
  9. Reply-To: jinx@zurich.ai.mit.edu
  10. Organization: M.I.T. Artificial Intelligence Lab.
  11. Lines: 43
  12.  
  13. I've been reading the documentation (LaserRom) for the mmap system
  14. call in HP-UX 9.0 and I have some questions about how it applies to
  15. the s700.
  16.  
  17. The documentation claims that mapped files shared among multiple
  18. processes must be mapped to the same virtual address in all the
  19. processes because of architectural restrictions.  It also claims that
  20. MAP_FIXED generally will fail even if it is a private (MAP_PRIVATE)
  21. mapping.
  22.  
  23. On reading the 1.1 architecture reference I found that there is a
  24. limited degree of virtual address aliasing allowed by the architecture
  25. (version 1.0 allowed none).  64-bit global Virtual addresses differing
  26. only in 12 specific bits space-identifier bits are allowed to be
  27. mapped to the same physical address.
  28.  
  29. Additionally, as far as I know, the current s700 hardware (models 705,
  30. 710, 720, 730, and 750, I don't know about the 74x) have direct-mapped
  31. caches which properly divide 256kbytes, thus the caches should be able
  32. to support aliasing of virtual addresses whose lower-order 18 bits
  33. match.
  34.  
  35. What I don't understand is why a stronger restriction is imposed on
  36. the use of MAP_FIXED in conjunction with MAP_SHARED.  The restriction
  37. specified for the s700 (and for the s800, but I can understand it in
  38. this case since there are machines based on version 1.0 of the
  39. architecture) should be weaker, namely that only certain addresses are
  40. valid for MAP_FIXED, but the restriction stated is that the addresses
  41. must be the same.
  42.  
  43. Can someone explain this to me?
  44.  
  45. Is there any range of addresses (e.g. between 0x40000000 and
  46. 0x80000000) for which MAP_FIXED in conjunction with MAP_PRIVATE will
  47. not fail?
  48.  
  49. I ask this because there is a GNU package (mmalloc) that uses mmap
  50. instead of sbrk to allocate memory.  It can be used to detach the
  51. memory segment for subsequent re-attachment, or for other purposes.
  52. However, there is an implicit assumption in the code that successive
  53. calls to mmap can allocate a contiguous range (the way that calls to
  54. sbrk do) by specifying the address for later calls, yet this is not
  55. (apparently) guaranteed to work on the s700 in HP-UX 9.0.
  56.