Performance Testing, LoadRunner Tips&Tricks

This site is moving to a bigger space @ LoadRunner TnT

General: Understanding Processor - Thread State

As we know, a multiprogramming OS switches the processor back and forth between all the program threads that are executing. When the current thread blocks, usually due to I/O, the Windows Scheduler finds another thread that is ready to run and schedules it for execution. If no threads are ready to run, Windows schedules a thread associated with the System Idle process to run instead. When an I/O operation completes, a blocked thread becomes eligible to run again. This scheme means that threads alternate back and forth between the two states: a ready state, where a thread is eligible to execute instructions, and a blocked state. A blocked thread is waiting for some system event that signals that the transition from waiting to ready can occur.

Thread state Counter is an instantaneous counter that you will need to observe at very fine granularity to catch this behavior. The following tables described the thread states and reasons.

Values for Thread State Counter
Value: State
0: Initializing
1: Ready
2: Running
3: Standby
4: Terminated
5: Waiting
6: Transition
7: Unknown

Values for the Thread Wait Reason counter
Value: Reason
0 : Waiting for a component of the Windows NT Executive
1 : Waiting for a page to be freed
2 : Waiting for a page to be mapped or copied
3 : Waiting for space to be allocated in the page or nonpaged pool
4 : Waiting for an Execution Delay to be resolved
5 : Suspended
6 : Waiting for a user request
7 : Waiting for a component of the Windows NT Executive
8 : Waiting for a page to be freed
9 : Waiting for a page to be mapped or copied
10 : Waiting for space to be allocated in the page or nonpaged pool
11 : Waiting for Execution Delay to be resolved
12 : Suspended
13 : Waiting for a user request
14 : Waiting for an event pair high
15 : Waiting for an event pair low
16 : Waiting for an LPC Receive notice
17 : Waiting for an LPC Reply notice
18 : Waiting for virtual memory to be allocated
19 : Waiting for a page to be written to disk
20+ : Reserved
Related Topics

Labels: , ,


Bookmark this article now! AddThis Social Bookmark Button



technorati del.icio.us reddit digg

0 Responses to “General: Understanding Processor - Thread State”

Post a Comment


Powered by Google

Enter your email address:

Delivered by FeedBurner


Add to Technorati Favorites


XML

Powered by Blogger

make money online blogger templates

Powered by FeedBurner

Blog Directory

Top Blogs

Software Blogs -  Blog Catalog Blog Directory





© 2007 Performance Testing, LoadRunner Tips&Tricks | Blogger Templates by GeckoandFly.
No part of the content or the blog may be reproduced without prior written permission.
Learn how to make money online | First Aid and Health Information at Medical Health