Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Various Process States

SOLVED
Go to solution
Sk Noorul Hassan
Regular Advisor

Various Process States

I want to know the difference between process states like LEF/CEF, PFW/COM & MWAIT/MUTEX. In what situation the process can go to MWAIT and MUTEX states.

If processes go to MUTEX state,how to shutdown these processes. As by sutting down application, the processes are not shutting down.So, by VMS shutdown can these processes be shutdown. Pls suggest...
5 REPLIES
comarow
Trusted Contributor

Re: Various Process States

If you add an email I'll send a white paper on processs states.
Volker Halle
Honored Contributor
Solution

Re: Various Process States

Hi,

LEF = Local Event Flag wait
CEF = Common Event Flag wait
It's just an application thing, whether it will use local or common event flags to wait for.

PFW = Page Fault Wait
Waiting for a page to be read in from disk. Wait state should be fairly short-lived, but you may see the process go into this state very often, if it's hard-paging a lot (watch Pagefaults counter)

COM = Computable
Process is ready to run, but (an)other (higher priority) process(es) currently own(s) the CPU(s)

MWAIT = Miscellaneous wait
Shown if the process is in RWxxx state. PCB$L_EFWM contains a RSN$_* wait state integer (small number < 21.)

[OpenVMS] Discussion Of Processes In The RWxxx Scheduling States
http://h18000.www1.hp.com/support/asktima/operating_systems/00914D17-7FE5D380-1C01E7.html

MUTEX = MUTEX wait
Some data structures within the OpenVMS operating system are protected by MUTEXes (Mutual Exclusion Semaphores). If a process is in MUTEX wait, the address of the mutex it's waiting for, is stored in PCB$L_EFWM. You need to find out, which OTHER process is holding (and not releasing) that MUTEX. Processes holding MUTEXes are at prio 16 and have PCB$L_MTXCNT > 0.

[OpenVMS] How to Troubleshoot a Process in MUTEX State:
http://h18000.www1.hp.com/support/asktima/operating_systems/0098351C-C6948BC0-1C0096.html

To look at PCB$L_EFWM and/or PCB$L_MTXCNT with SDA in the running system:

$ ANAL/SYS
SDA> SET PROC/IND=
SDA> SHOW PROC
... Event flag wait mask xxxxxxxx
...
... Mutex count n
...
SDA> READ SYSDEF ! VAX: SYS$SYSTEM:SYSDEF.STB
SDA> EXA PCB+PCB$L_EFWM
SDA> EXA PCB+PCB$L_MTXCNT

Shutting down processes in some of those MWAIT states may not be possible at all (except after detailled analysis and some kernel-mode hacking with DELTA). An OpenVMS reboot will always clear up those hangs ;-)

Volker.
John Gillings
Honored Contributor

Re: Various Process States

There's a special case where processes can be put into MUTEX state - depletion of a shared quota - either BYTLM or TQELM (or, at least in theory, both).

From SDA check out JIB+JIB$L_FLAGS

like this:

SDA> READ SYSDEF
SDA> SHOW PROCESS/INDEX=idx
SDA> EX JIB+JIB$L_FLAGS

A value of 2 indicates a TQELM has been depleted. To kill a process in that state, issue a STOP/ID against it. Next time a timer queue entry for any process in the job tree expires, the process will terminate. That may be a significant time, but you can be fairly sure it will happen eventually.

A value of 1 indicates BYTLM depletion. If there are no other processes in the job tree, the process is probably deadlocked against itself. Such a process is unlikely to recover. It IS possible to unblock a process in that state, but it requires a small kernel mode program to be written to boost BYTLM. Not something I'd post here...

Call your local customer support centre for assistance.

Alternatively use Availability Manager to boost quotas.
A crucible of informative mistakes
Ian Miller.
Honored Contributor

Re: Various Process States

Note in the case mentioned by John the process is not in a MUTEX state but in MWAIT but SHOW SYSTEM displays the wrong state. SDA SHOW SUM in recent versions of VMS does a better job.
Also in that case PCB$L_EFWM will contain the address of the JIB.
____________________
Purely Personal Opinion
Sk Noorul Hassan
Regular Advisor

Re: Various Process States

Camarow,
My email id noorulh@calro.cmc.net.in