Reproduced from http://www.stonesteps.ca/faq.html
Q:What is preemptive threading model and how will it affect the
performance?�
A:All incoming application requests are handled in the application server by
worker threads, which receive requests from the Witango client, retrieve the
requested application file, process queries associated with the application
actions, generate the result HTML out of actions' HTML fragments and send
the results back to the client. The way threads interactbetween each other,
the server core and the operating system is called threading model. There
are two basic kinds of threading models: cooperative and preemptive.�
In cooperative threading model, only one thread is active at any given time.
After working for some short period of time (typically 300 ms), the active
thread voluntarily pauses and allows another worker thread to process
another request. In preemptive threading model, the operating system
controls the scheduling of all worker threads and allows each one of them to
become active for even a shorter period of time (typically 30-60 ms), after
which another thread is made active and so on. The cooperative threading
model has many inherent disadvantages: synchronization delay when threads
have to be interfaced with the preemptive outside world (e.g. DBMS servers),
inability to take advantage of multiple processors (CPUs) and susceptibility
to the potential danger of the active thread not yielding properly and
therefore blocking other worker threads and their requests.
Tango 2000 uses mixed threading model with the server core and all worker
threads running in the cooperative mode and some of the external operations,
such as launching command line applications of an External Action, executed
preemptively. Every time a preemptive task has finished, the cooperative
worker thread that launched it has to synchronize with the rest of the
worker threads before it can continue its life cycle.
The Witango server is a fully preemptive server and is free of the
disadvantages of cooperative threading described above, which means that
those application files that interact with other services (i.e. running
command line applications, SQL queries, etc), will run faster as long as the
external services do not share the CPU with the application server (e.g.
DBMS is located on another machine). For example, an application file that
reads/writes large files with a File Action will run faster on a preemptive
application server because the disk controller uses Direct Memory Access
(DMA) mechanism to transfer disk data into memory and while one worker
thread is waiting for the File Action to complete, all other worker threads
are processing other queries.�
On 12/11/02 10:05 AM, "Chuck Lockwood" <[EMAIL PROTECTED]> wrote:
> The threading model has been updated in v5. "Witango App Server5 now runs in
> full pre-emptive multitasking mode."
>
> What does this mean exactly, in processing terms? v4 processes multiple
> requests and seems to interact with external systems (databases, mail
> servers) concurrently.
>
> So what's the big deal?
>
> Chuck Lockwood
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> LockData Technologies, Inc.
> 309 Main Avenue, Hawley, Pa 18428
> 570-226-7340 ~ Fax: 570-226-7341
> [EMAIL PROTECTED] ~ www.lockdata.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body