× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Fred,

There are no files or shared resources.  Each thread creates
a new socket connection to a server.  After each socked
ends, an entry to a HashTable is added with the time it took
to make and receive the request.

I'm getting very mixed results with response times with
threads vs. jobs.  They are way off of each other in some
case, and very close in others.

It's something like this:

do 50
  saveStartTime
  makeRequesttoServer("foo");
  saveEndTime
enddo

If inside the loop I create jobs vs. threads to make the
request, I'm getting mixed results, mainly on the first job
I run.

If the request forces a new server instance to start on the
remote side, I get very different results when using threads
vs. jobs for the request.  Threads actually produce better
response times from the server by 4x or more.

Brad

On Tue, 26 Feb 2002 10:59:36 -0600
 Fred Kulack <kulack@us.ibm.com> wrote:
>
> Sort of depends... The word 'application' in your
> question worries me
> (but only because it can mean so many different things).
> If you're thinking of running a whole application
> multiple times, then
> a new job is what you want.
> However, for smaller, encapsulated pieces of work, then a
> thread
> may fit your design.
>
> So the real question is:
>   Can your application stand in the same job as another
> instance
> of itself running without negatively effecting the shared
> resources
> that you get in a threaded environment?
> I.e. all open files would be shared, locks would be used
> to protect
> access in certain cases (many of which may be your
> responsibility),
> global and statidc storage would be shared, etc).
>
> Threads versus Jobs which are better depends entirely on
> the
> problem/solution and the code used to implement it.
>
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.