7

Is there a difference between a thread and a process?

I am trying to understand the calculations of the system data listed in the performance tab.

Handles: 48097 Threads: 1602 Processes: 99 Up Time: 17:23:02:02 Commit (GB): 3/15

  • Yes. What did your research tell you? Did you search for "what is the difference between a thread and a process"? – DavidPostill Apr 15 '16 at 13:50
  • My research is part of asking questions. Hope that's not too confusing – JohnNg Apr 15 '16 at 15:42
  • 1
    It is very confusing. Please read How do I ask a good question? it says "Have you thoroughly searched for an answer before asking your question? Sharing your research helps everyone. Tell us what you found and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and above all, it helps you get a more specific and relevant answer!" – DavidPostill Apr 15 '16 at 15:45
13

Since the StackOverflow answer is so abstract, and OS agnostic as to be useless to the ops specific question, I am posting a Windows specific answer.

A Process is a isolated memory structure which supports an application in OS hardware and software. A Windows Process contains 1 or more Threads. https://en.wikipedia.org/wiki/Process_%28computing%29

A Thread is a stream of sequential machine-code instructions that the processor executes. With the exception of Interrupts, Any time the CPU runs an Instruction on behalf of an application, it does so because a thread contained it. Threads within a process may access the processes memory (to the extent that the specific operation on the memory element is "thread-safe" and doesn't present unreconciled concurrency issues when more than one thread is run simultaneously). An Application may speed its operation by using multiple threads, each performing an isolated task by running their stream of instructions through a different CPU Execution unit (CPU/core/virtual core) simultaneously. https://en.wikipedia.org/wiki/Thread_%28computing%29

A Handle is a logical association with a shared resource like a file, Window, memory location, etc. When a thread opens a file, it establishes a "handle" to the file, and internally it acts like a "name" for that instance of the file. Handles are used to link to transitory or environmental resources outside the processes memory structure. A handle leak is a type of software issue that can in extreme cases, destabilize a system. It is caused by a program requesting a handle to a resource, and failing to deallocate it when the program is done with the resource. Based on your number however, I see nothing wrong there. https://en.wikipedia.org/wiki/Handle_%28computing%29

  • Thanks Frank, this was very simple and helpful. I am trying to understand the breakdown in the calculations so this will push me in the right direction. – JohnNg Apr 15 '16 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.