1

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.

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
Redeil
  • 13
  • 3

1 Answers1

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,319
  • 5
  • 23
  • 24
Christopher_G_Lewis
  • 3,647
  • 21
  • 27