General discussion

Locked

NT

By Tonyhey ·
What is meant by multi threaded applications?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

NT

by Bill_H In reply to NT

The following is an excerpt from the December 1996 Microsoft Systems Journal:

...A common definition of a thread is the basic entity to which the operating system allocates CPU time. You can also think of a thread in application terms. Every application has at least one thread-the primary thread that begins with the program's first executed instruction. In addition, the program can create secondary threads, which can be thought of as independent agents with instructions like "gather this data from the Internet and let me know when you're finished" or "monitor disk usage on the file server and alert me if it exceeds 90 percent busy."


So a thread, then, is an executing stream of code within an application that runs concurrently withthe application's other threads, and shares an address space with them, along with access to the application's variables, file handles, device contexts, objects, and other resources. Threads are different from processes, which typically don't share resources or an address space and communicate only through the mechanisms that the operating system provides for interprocess communication, such as pipes, queues, COM, and DDE. Threads often use simpler, less resource-intensive forms of communication like semaphores, mutexes, and events.

(Continued in comment below...)

Collapse -

NT

by Bill_H In reply to NT

Consider an application that monitors the performance and available capacity of a network file server. When the server is heavily loaded, it may take several minutes to get utilization measurements from a critical disk drive. A single-threaded application loop that checks the usage of network links, disk drives, CPU, and memory in sequence would be unable to display any data for minutes at a time. A multithreaded application, on the other hand, with one thread dispatched to measure each device and another thread to display the results, would be able to work around the overloaded drive and promptly update the figures for any devices that were able to report their status in a timely fashion. The result is that the total elapsed time until a set of tasks is accomplished can be the maximum of the individual task times rather than their sum, which can result in significant performance improvements. In cases like this, where partial results are meaningful and complete results may be difficult to obtain, multithreading can mean the difference between a useful application and a useless one...

The full text of this article is available at:

http://msdn.microsoft.com/library/periodic/period96/S39CD.htm

You may also wish to view theMSDN article "More First Aid for the Thread Impaired: Cool Ways to Take Advantage of Multithreading ", which is located at"

http://msdn.microsoft.com/library/periodic/period97/multithreading0797.htm

(If the URL above does not work, locate and remove any spaces inserted by the TechRepublic system.)

Hope this helps...

Collapse -

NT

by Tonyhey In reply to NT

Poster rated this answer

Collapse -

NT

by Tonyhey In reply to NT

This question was closed by the author

Back to Windows Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums