August 2000
Intermediate to advanced
800 pages
21h 5m
English
Whereas a process is the environment, a thread is the actual path of execution through the code. Threads are the entities that actually do work: They execute instructions. Each process can have one or more threads. If a process ever has zero threads, Windows 2000 terminates it. CreateProcess(), after building and initializing all the process data structures, makes a call toCreateThread() to build and (most likely) start the initial thread. After the process and initial thread are established, the thread is free to create more threads and even more processes.
Note
Lightweight threads, or fibers, are supported in Windows 2000. A fiber is just a thread that Windows 2000 doesn't schedule. The other threads in the process manually divvy up ...