Windows 2000 Threads and SMP Management
Windows 2000 supports processes, jobs, threads and fibres. The process has virtual address spaces and containers for resources. Threads are the unit of execution and it is scheduled by the operating system. Fibres are lightweight threads that are scheduled entirely in user space. Jobs are collections of processes a collection of threads and those threads are a collection of fibres.
Characteristics of Windows 2000 Process and Thread:
1. Processes are implemented as objects in windows 2000.
2. An executable process may contain one or more threads.
3. Both process and thread objects have built-in synchronization capabilities.
Thread States in Windows 2000:
A thread in windows 2000 is in one of the following 6 states:
1. Ready: The thread is ready to schedule for execution.
2. Standby: A standby thread has been selected to run next on a processor. If the standby thread priority is greater than the currently executing thread priority then executing thread should be preempted, otherwise, the standby thread has to wait.
3. Running: A thread shift from the standby state to the running state only when the thread is scheduled for execution.
4. Waiting: A thread is waiting for an event or voluntarily waits for state only when the thread scheduled for execution.
5. Transition: A thread needs a resource, then it enters into waiting for the state. If the resource isn’t available for a long time, then it enters into a transition state. Whenever the resource is available then the thread moved to the ready state from the transition state.
6. Terminated: Generally threads terminate with the following reasons:
i. Thread terminated by itself or another thread.
ii. Thread terminated when parent process terminates.