Re: WORKING_SET.COM gives all COM states when run at high priority

From: AEF (spamsink2001_at_yahoo.com)
Date: 06/30/05


Date: 29 Jun 2005 21:19:08 -0700


David B Sneddon - bigpond wrote:
> AEF mentioned in passing:
> >
> > Jeff Chimene wrote:
> >
> >>AEF wrote:
> >>
> >>>Hello,
> >>>
> >>>WORKING_SET.COM, which is in SYS$EXAMPLES, lists all processes and
> >>>various working set statistics for each. I recently found out that when
> >>>you run it at high priority, most or all of the states show up as COM.
> >>>The state is determined by the function
> >>>
> >>> f$getjpi("","STATE")
> >>>
> >>>The higher the priority, the higher the percentage of states which are
> >>>reported as COM.
> >>>
> >>>Why should the result of this function be dependent on the priority at
> >>>which it is run?
> >>
> >>Because your process running working_set.com is using all the CPU? All
> >>other processes are forced to non-CUR states, e.g. COM
> >>
> >>For extra credit, code up a real-time CPU-burner that also
> >>allocates/frees a few mebibytes of VM. Fire off a few of those and watch
> >>with working_set.com
> >>
> >>Cheers,
> >>jec
> >
> >
> > Thanks for your rapid response! But some of my processes are idle
> > terminal sessions. Why are they waiting for the CPU?
>
> Does $GETJPI not operate within the context of the process
> you want the information about? In which case that process
> would need to "run" to return the information...

I don't see how this can be. If $getjpi ran in the target process's
context, wouldn't its result go into a symbol in that target process
and screw it up? Also, if the target process needs to run $getjpi than
I'd expect to see processes all show up as CUR, since they are running
as you say.



Relevant Pages

  • Re: WORKING_SET.COM gives all COM states when run at high priority
    ... If $getjpi ran in the target process's ... > context, wouldn't its result go into a symbol in that target process ... if the target process needs to run $getjpi than ... It wont be CUR because you are the process that has commanded the operation ...
    (comp.os.vms)
  • Re: WORKING_SET.COM gives all COM states when run at high priority
    ... if the target process needs to run $getjpi ... The getjpi does a kernel AST into the target process and runs within that ... the target process context, not the inquirers. ...
    (comp.os.vms)
  • Re: Injected DLL causes process termination - occasionally
    ... I would recommend debugging the child process in order to get a better feel for why your attempt is failing. ... // Allocate memory in the target process ... pWriteBuffer = VirtualAllocEx(pi.hProcess, pWriteBuffer, ... // Change the execution context of the the primary thread of the ...
    (microsoft.public.win32.programmer.kernel)
  • Injected DLL causes process termination - occasionally
    ... My injected code is indeed called, ... // Allocate memory in the target process ... pWriteBuffer = VirtualAllocEx(pi.hProcess, pWriteBuffer, ... // Change the execution context of the the primary thread of the ...
    (microsoft.public.win32.programmer.kernel)