I see in Windows Task Manager -> Performance tab under system block, I see Process, threads and handle statistics.
Can some body tell me what are handles(with technical information including development point of view)?
Thread handle is used by the operating system that identifies processes and threads, users can use the handle to identify processes and threads and operate on them. The thread ID is used by the operating system to identify processes and threads.
In computer programming, a handle is an abstract reference to a resource that is used when application software references blocks of memory or objects that are managed by another system like a database or an operating system.
A process handle is an integer value that identifies a process to Windows. The Win32 API calls them a HANDLE; handles to windows are called HWND and handles to modules HMODULE. Threads inside processes have a thread handle, and files and other resources (such as registry keys) have handles also.
A thread is the basic unit to which the operating system allocates processor time. A thread can execute any part of the process code, including parts currently being executed by another thread. A job object allows groups of processes to be managed as a unit.
A thread is part of the process, running within its own execution space and there can be multiple threads in one process. with the help of it os can do multiple tasks in parallel(depends upon the number of processors of the machine.
A handle is a generic OS term that can be a ticket to an operating system object. Each handle is unique and identifies each object. A thread is an OS object and each one you create, you get back a handle for it.
Under Windows, the thread handle is different from the thread ID, in the same way that a file handle is different from a file name.
The thread handle is a token which allows you to do something with the thread (typically wait for it or kill it). Win32 has these tokens for lots of objects, and calls them HANDLE in general.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With