Today I saw that one process (.NET Runtime Service - mscorsvw.exe) changes its PID really often. When Task Manager refreshes the PID of that process, it is always different. Is that normal? An antivirus program didn't find anything.
Asked
Active
Viewed 1,986 times
1
-
Maybe it is a child process? http://stackoverflow.com/questions/36112927/program-that-changes-pid-every-n-seconds – J E Carter II Sep 07 '16 at 20:28
1 Answers
2
This is an optimization service and starts and stops periodically. When it's active, it's running NGen.exe to optimize .NET assemblies on your machine. It typically only runs in the background, which is probably what is causing the PID to be refreshed every few seconds. It runs off a queue of assemblies that need NGen and therefore is much more active after new installs and after a .NET framework update.
You can run
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe queue status
or
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe queue status
to see what NGen has queued up.
See Wondering why mscorsvw.exe has high CPU usage? You can speed it up.

Peter Mortensen
- 2,318
- 5
- 23
- 24

Christopher_G_Lewis
- 3,685
- 22
- 27