|
|
What makes the new 32-bit operating systems multithreaded ? By Jeff Prosise Multitasking and multithreading are two terms often used to describe 32-bit versions of Windows and OS/2. A multitasking operating system allows two or more applications to run concurrently by dividing processor time between them. Multithreading means that the operating system supports multiple concurrent threads of execution within a single application. Most of us understand well enough what multitasking is, but who among us could explain to a colleague the true meaning of multithreading? What, for example, does multiple concurrent threads of execution mean? What is a thread of execution? How does multithreading differ from multitasking, and how, if at all, are the two related? More important, what difference does multithreading make to an application? Do multithreaded Windows programs run better than single-threaded versions, or is multithreading something that only a techie could love? These are complex questions. Fortunately, the answers don't have to be complex. It's not necessary to be a Windows programmer to understand what threads of execution are and how they're used. In the pages that follow, we'll define the term thread and discuss how threading is implemented in Windows 95 and Windows NT. We'll examine how threads are used both by application programs and by the operating system itself. Finally, we'll look at two versions of an application program--one that's multithreaded and one that's not--to see firsthand how much or how little difference multiple threads of execution make. Published as Tutor in the 12/05/95 issue of PC Magazine. |
|
TOP |
Copyright (c) 1997 Ziff-Davis Inc. |