Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / July 2004

Tip: Looking for answers? Try searching our database.

Logical threads vs. physical threads

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bjoseluisb - 20 Jul 2004 11:40 GMT
Hi all,

I'm using ThreadPool.QueueUserWorkItem to handle work requests from a
Windows Service. I've been using the performance monitor to trace the
number of physical threads and the number of logical threads in the
LocksAndThreads counters. I'm seeing 28 physical threads, but only 1
thread associated to the service process.
Should I infer that the only physical thread is doing all the work for
the 28 logical threads?

Thank you in advance for your help
Richard Grimes [MVP] - 26 Jul 2004 21:58 GMT
> Hi all,
>
[quoted text clipped - 5 lines]
> Should I infer that the only physical thread is doing all the work for
> the 28 logical threads?

At the moment .NET threads map one to one with physical threads (this is an
implementation detail, it may change in future versions of the framework).
By default the ThreadPool has 25 .NET threads, ie 25 Win32 threads. In
addition there are threads being used by the garbage collector (there is a
finalization thread as well as a thread used to perform the GC) and there is
the main thread of your process. That comes to 28 physical/.NET threads :) I
guess the LocksAndThreads counter is only showing the worker threads (ie
your main thread) used by your process, but I don't know for sure.

Richard
Signature

my email evpuneqt@zicf.bet is encrypted with ROT13 (www.rot13.org)
sign up for my free .NET newsletter at
http://www.wd-mag.com/newsletters/


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.