Windows 2000 Threads and SMP Management

Windows 2000 supports processes, jobs, threads and fibres. The process has virtual address spaces and their containers for resources. Threads are the unit of execution and it is scheduled by the operating system. Fibres are light-weight threads that are scheduled entirely in user-space. Jobs are collections of processes are 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:
Thread States in Windows 2000

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 running state only when the thread schedule for execution.
4. Waiting: A thread is waiting for an event or voluntarily waits for state only when thread schedule for execution.
5. Transition: A thread need a resource, then it enters into waiting for the state. If the resource isn’t available for a long time, then it enters into transition state. Whenever the resource is available then the thread moved to ready state from 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.