[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Dual Processors ?



PureBytes Links

Trading Reference Links

At 09:00 AM 3/30/99 -0500, Cab Vinton wrote:
>> When running a multithreaded application under WindowsNT ...
>
>Could someone provide a bare-bolts summary of multithreading? EG:

This definition comes from Microsoft Developer Network:

A thread is basically a path of execution through a program. It is also the 
smallest unit of execution that Win32 schedules. A thread consists of a 
stack, the state of the CPU registers, and an entry in the execution list 
of the system scheduler. Each thread shares all of the process's resources.
A process consists of one or more threads and the code, data, and other 
resources of a program in memory. Typical program resources are open files, 
semaphores, and dynamically allocated memory. A program executes when the 
system scheduler gives one of its threads execution control. The scheduler 
determines which threads should run and when they should run. Threads of 
lower priority may have to wait while higher priority threads complete 
their tasks. On multiprocessor machines, the scheduler can move individual 
threads to different processors to "balance" the CPU load.
Each thread in a process operates independently. Unless you make them 
visible to each other, the threads execute individually and are unaware of 
the other threads in a process. Threads sharing common resources, however, 
must coordinate their work by using semaphores or another method of 
interprocess communication.


>What's a multithreaded application?


An application DESIGNED with multiple-threads which can run independently.


>Are all apps multithreaded?


No.


>Are any common apps optimized for dual processors?


One of the best known multi-threaded applications is Adobe Photoshop. Since 
it is multi-threaded, performance improves with multiple processors.


>Do dual processors make sense for TS4, MS Excel, Word, Netscape, etc?


Most definitely. First of all, multiple processes present multiple threads 
for execution, even if they're not individually designed as multi-thread 
application. Thus, if you're running, say, TS4, Excel and a browser at the 
same time, multiple processors will be kept balanced. You will see a very 
definite improvement in performance.

If you never run multiple applications, and the only application you run is 
single-threaded, then multiple processors will not give you much of a boost 
(there still may be operating system services that can be scheduled to an 
alternate processor).

Also consider the following. With ActiveX as an interface (as in the 
forthcoming TradeLab), multiple Processes can be run for the purpose of 
achieving a coordinated goal. Thus, if a trading program interfaces thru 
ActiveX to a Neural Network running as a separate process, they can run 
simultaneously (even if each of those processes taken individually is 
single-threaded).

Allan

"Precision is not truth" - Henri Matisse