home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / vms / 12611 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  2.2 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!ucbvax!ko.hhs.dk!ARNE
  2. From: ARNE@ko.hhs.dk (Arne Vajhxj)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Tracing mailbox access
  5. Message-ID: <214F75A237DF607D4B@sb.hhs.dk>
  6. Date: 21 Jul 92 17:02:00 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 44
  11.  
  12. > >>Since it's been a little while since I went tracing through system tables, I'm
  13. > >>hoping someone has trod this path before me.
  14. > >
  15. > >No such hacking is needed.
  16. > >
  17. > >>What I have is a process which creates a mailbox with a read attention AST.
  18. > >>What I want to do is get the PID of the reader. Obviously, the information is
  19. > >>in VMS since analyze/sys can get it, but what's the best (or any) way to get
  20. > >>from a mailbox name to a pid of a referencing process? Or would I have to go
  21. > >>the other way and hunt for a process with an allocated channel?
  22. > >
  23. > >When you do a write to a mailbox, the PID of the reader is passed in the IOSB.
  24. > >When you read a message from a mailbox, the PID of the writer of the message
  25. > >is passed in the IOSB.  Exceptions for writes with IO$M_NOW, etc.  Details
  26. > >in the Grey Wall.
  27. > I think the intended question was actually  "How can I determine who queued the
  28. > read request that triggered the read attention AST BEFORE I write something to
  29. > the mailbox?"  That WOULD require some hacking.
  30.  
  31. Well I interpret the original question as: Process with PID xxxxxxxx create
  32. a mailbox MBAyyyy and queues a read attention AST to it - the question is
  33. how to "translate" from MBAyyyy to PID xxxxxxx for another user.
  34.  
  35. My suggestion would be something like:
  36.  
  37.   lock pages in memory
  38.   goto kernel mode
  39.   lock sched (or iosomething ?)
  40.   call ioc$searchdev to translate from device-name to ucb-address
  41.   the mb_r_ast field in the ucb contains an acb-address
  42.   the pid field in the acb contains what we want  
  43.   unlock sched (or iosomething ?)
  44.   return
  45.  
  46. But I have probably missed something ...
  47.  
  48.                                                           Arne Vajhxj
  49.  
  50. Arne Vajhxj                             local DECNET:  KO::ARNE
  51. Computer Department                     PSI:           PSI%238310013040::ARNE
  52. Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK
  53.  
  54.  
  55.