I was analyzing (with Procmon) a very simple program in two different VPS that Im renting. The program is a minimal C++ program:
int main() {
return 0;
}
I compiled the previous code with g++ (tdm64-1) 5.1.0 in both machines. I just compiled the code as g++ Test.cpp -o Test.exe
. After that I ran the Test.exe
file in both servers and filter with Procmon. The first VPS shows the creation of a single thread (procmon csv), but the second one creates two threads instead (procmon csv). Im wondering why is this happening and how can I ensure that "single thread programs" creates only one thread in the second server. Maybe Im missing something here. Im going to describe the properties of every VPS:
First VPS
OS: Windows Server 2012 R2
Processor: Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz 2.40 GHz, 2 cores, 2 logical processors
Installed memory (RAM): 6.0 GB
System type: 64-bit Operating System, x64-based processor
Second VPS
OS: Windows Server 2016
Processor: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz 2.20 GHz, 6 cores, 6 logical processors
Installed memory (RAM): 24.0 GB
System type: 64-bit Operating System, x64-based processor
In order to analyze a bit further I changed my code a little bit as follow:
int main() {
while (true);
return 0;
}
I ran the previous code and used Process Explorer to saw it behaviour and a second thread was created and removed 30 seconds after the program was running.