Thursday, March 31, 2005

Hansleman's List: Threads vs. Processes

More from Scott Hansleman's list of what great developers should know: Describe the difference between a Thread and a Process? Processes are a single instance of an application. Threads are units of execution within that process. A process has one primary thread, but more may be created by developers. Both processes and threads have assignable priority levels. Windows CE is limited to 256 processes. I couldn't find a trustable source for XP/2003 limits, but I believe it's 64K. The Process class can be used to programatically get information about current processes on a system. Multi-threading brings a host of issues into play, no matter the environment or platform. Synchronization, variable storage and sharing, locking, resource handling, and several other matters need to be addressed. Check out Multithreaded Programming with Visual Basic .NET in Visual Studio Technical Articlesand Threading Tutorial (for C#) in the C# Programmer's Reference Manual. There's also a good discussion of Thread Pooling in the .NET Framework Developer's Guide.

No comments:

Subscribe (RSS)

The Leadership Journey