Windows 10 dos window running my own program runs with CPU 0%

regressist 0 Reputation points
2024-01-18T09:55:00.4966667+00:00

Hi all, I am running on a pc with Windows 10 a program written by me (no bug) which makes some computations very simple but very time consuming: it runs in a dos window and outputs some integer numbers in the window and sometimes in a file. I am running in parallel two instances of the program but all of a sudden after two weeks one seems frozen: the performance meter reports running but the cpu is at 0%. For both the priority is normal, I tried to change the priority of the second to high or even real time but nothing changes. Is it possible that the CPU is dying and keeps only the first process launched freezing the other? Any suggestion to unfreeze the process or at least an explanation of what is going on? Thanks in advance to whomever will reply

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2024-01-19T03:28:14.5166667+00:00

    Download and run Process Explorer. https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer Find one of your processes and select it. In the lower half of the window select Threads. Look at their state and CPU cycles. You can double click on a thread to look at it's call stack. Here I put Powershell in a computation loop. User's image

    If you wrote the code in C# or VB.Net, double click on the program and view the .Net performance. You may have a memory leak. User's image

    Compare the one that is running vs the one that is hung. Or restart one of them and monitor over time as it executes.


  2. Anonymous
    2024-01-22T02:01:49.6333333+00:00

    Hello, According to your description, I also suggest that check application event log, if we could find any event id 1001. It always means process hang or crash. If so, it may need to use WinDbg to analysis WER process dump. Check Resource Usage: Open the Task Manager and see how much CPU, memory, and disk usage the process is using. If it’s using a lot of resources, it might be causing your system to slow down. Check for Updates: Make sure your operating system and all drivers are up to date. Sometimes, outdated software can cause issues with running programs. Best Regards, Hania Lian

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.