Subject RE: [IBO] Big Batch...
Author Kaputnik
Hi Paul,

it is not that easy.
Most, if not all OS'es do spread processes over several procesors, but not
threads. Why not?
Well, threads are part of a process, and can therefore use the same merory.
If you have to threads working on one memory-part, the threads are
serialized on one machine, so nothing can be broken. On a SMP-machine, two
threads on two CPU's could access the same memory adress at the same time,
doing terrible things.
You CAN spread threads over several processors, but you have to explicitly
allow the OS via special flags (other sort of thread in fact) that these
threads are not only thread-save, but also SMP-save. So, no matter how many
threads IB might spin off, the OS will HAVE to use only one processor for
the complete app including its threads.

I hope, this clears things up a bit.

CU, Kaputnik
(Nick Josipovic)

nick@... <mailto:nick@...>
kap@... <mailto:kap@...>
superior Client/Server programming: <>
a nice tool for Interbase: <>

> -----Original Message-----
> From: Paul Schmidt [mailto:paul@...]
> Sent: Monday, March 19, 2001 10:45 PM
> To: Svein Erling Tysvær;
> Subject: Re: [IBO] Big Batch...
> Svein:
> On 19 Mar 2001, at 16:25, Svein Erling Tysvær wrote:
> To:
> From: Svein Erling Tysvær
> <svein.erling.tysvaer@...>
> Date sent: Mon, 19 Mar 2001 16:25:44 +0100
> Send reply to:
> Subject: Re: [IBO] Big Batch...
> > Basically, the problem is that IB starts processing on one processor,
> > then something (don't know if it's IB or the operating system)
> > discovers that the other processor is free, moves the processing over
> > there, discovers that the other processor now becomes free, moves back
> > - and continues to move rather than execute the request. I think there
> > is a tool called IB_Affinity that helps IB use only one processor.
> > This is a problem only in Windows environments if I remember
> > correctly.
> Sounds like a broken task switcher, the task switcher should simply
> delegate threads to processor time slices. Now it is possible for a
> thread to run on processor A one time, and processor B the next time,
> depending on the OS thread count, and the thread priority.....
> Paul
> Paul Schmidt,
> Tricat Technologies
> Email: paul@...
> Website:
> Your use of Yahoo! Groups is subject to