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

  1. Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!yvax.byu.edu!heinrich
  2. From: heinrich@yvax.byu.edu
  3. Newsgroups: comp.os.vms
  4. Subject: Software for resolving RWAST states available
  5. Message-ID: <1992Jul28.200343.855@yvax.byu.edu>
  6. Date: 28 Jul 92 20:03:43 -0700
  7. Organization: Brigham Young University
  8. Lines: 106
  9.  
  10. FREE_RSN - A utility program to get a process out of RWAST state. 
  11.  
  12. In response to some traffic I saw here recently about processes
  13. stuck in an RWAST state, I am making available a utility I wrote a
  14. couple of years ago called FREE_RSN.  FREE_RSN attempts to resolve a
  15. resource shortage that may be causing a process to remain in RWAST
  16. state.  This utility will examine a process, specified by the PID
  17. entered at execution time, and try to determine what resource the
  18. process is waiting on.  If the process is RWAST'd due to a depleted
  19. process QUOTA, FREE_RSN will bump the quota in an effort to allow the
  20. process to continue.  If the resource is a MUTEX, FREE_RSN will report
  21. the address of the MUTEX.
  22.  
  23.  
  24. FREE_RSN serves two purposes.  First, it attempts to get a process
  25. out of a RWAST state, and avoid a possible reboot, if the resource
  26. is a quota-related problem.  Secondly, for processes that are not 
  27. waiting on a quota that it can bump, FREE_RSN will provide additional
  28. information so that the system manager can take other actions to
  29. possibly resolve the RWAST state.  
  30.  
  31.  
  32. FREE_RSN specifically looks for five cases of insufficient quota:
  33. BYTLM, DIOLM, BIOLM, ASTLM, and TQLM.  If FREE_RSN detects any of
  34. these five quotas as being the problem, it will increment the 
  35. appropriate fields in the JIB, PCB, and/or PHD and attempt to
  36. reschedule the process.  NOTE:  If FREE_RSN detects that a quota
  37. shortage is causing the process to be in a RWAST state, and after
  38. running FREE_RSN the process is still in RWAST state, you may have
  39. to re-execute FREE_RSN.
  40.  
  41.  
  42.  
  43. *********************************************************************
  44. DISCLAIMER:
  45.  
  46. FREE_RSN is coded in Macro-32, executes in KERNEL mode, and calls
  47. undocumented VMS scheduling routines.  As with any privileged code 
  48. utility, there is always a chance of a system crash.  Although I
  49. and other people have used this program several times and have not
  50. experienced any crashes, FREE_RSN was written as a hack, not as a
  51. PRODUCTION QUALITY utility, and may not be 100% bug free.
  52.  
  53. As FREE_RSN is being made available free of cost, neither the author
  54. nor The LOKI Group, Inc., are responsible for any loss or damage 
  55. that might result from use of the FREE_RSN utility.
  56.  
  57. **********************************************************************
  58.  
  59.  
  60. Hunter Goatley, that great believer in "shareware", (and all around
  61. nice-guy), has agreed to make FREE_RSN available from his file server.
  62.  
  63.  
  64. To get FREE_RSN via anonymous ftp from ftp.spc.edu, you'll need the
  65. following files:
  66.  
  67.         [.MACRO32]LZDCMP.EXE
  68.         [.MACRO32.SAVESETS]FREE_RSN.BCK_Z
  69.  
  70. To get it via e-mail, send the following command in the body of a mail
  71. message to FILESERV@WKUVX1.BITNET:
  72.  
  73. SEND FREE_RSN
  74.  
  75.  
  76.  
  77. Brief Overview of RWAST state:
  78.  
  79. A wait state is a VMS scheduling state, actually a queue, that a 
  80. process is put into while it is waiting for the occurrence of an
  81. event or the availability of a system resource.  The MWAIT state
  82. is used when a process must wait for a depleted system resource, 
  83. job quota, or locked mutex.  A process that is in MWAIT state has 
  84. its PCB inserted on the MWAIT queue, located at SCH$GQ_MWAIT.  (There
  85. is no distinction made between resident and outswapped processes in
  86. the MWAIT queue).  The PCB field PCB$L_EFWM contains the entity that
  87. the process is waiting for.  If the process is waiting on a MUTEX,
  88. then PCB$L_EFWM contains the address of the mutex.  If the process
  89. is waiting for a pooled job quota, then PCB$L_EFWM contains the
  90. address of the JIB for the process.  If the process is waiting on
  91. a system resource, then PCB$L_EFWM contains the symbolic value of
  92. the resource being waited on, defined in the $RSNDEF macro in LIB.MLB.
  93. The system global longword, SCH$GL_RESMASK, has a bit set for each
  94. system resource that a process in the MWAIT queue is waiting on.
  95. The process exits the MWAIT state and becomes computable when an
  96. executive routine declares the resource it was waiting on to be
  97. available.
  98.  
  99. A process is placed in the RWAST scheduling state when it is waiting
  100. on a resource that is expected to be satisfied by the queuing or 
  101. delivery of an AST to the process.  Unlike the other wait states,
  102. there is no one specific resource that corresponds to the RSN$_ASTWAIT
  103. symbolic name.  
  104.  
  105.  
  106. Note that FREE_RSN does not deal with ALL MWAIT cases, only those that
  107. can be resolved by adjusting process specific parameters.
  108.  
  109.  
  110. *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  111. Ed Heinrich
  112. The LOKI Group, Inc.
  113. HEINRICH@yvax.byu.EDU
  114. *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
  115.  
  116.