Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and I
noticed that I don't get any speedup from using threads and I suspect that it
has something to do STL map. Can anybody throw some light on this issue ?
csv 6 2485 cs********@yaho o.com (Chaman Singh) wrote in
news:de******** *************** ***@posting.goo gle.com: Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and I noticed that I don't get any speedup from using threads and I suspect that it has something to do STL map. Can anybody throw some light on this issue ?
Not really. Threading is off-topic in comp.lang.c++. You need to talk to
your compiler vendor (and/or the vendor of your STL implementation. . they
may not be the same people) as to how they handle threading within their
STL implementation. cs********@yaho o.com (Chaman Singh) wrote in
news:de******** *************** ***@posting.goo gle.com: Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and I noticed that I don't get any speedup from using threads and I suspect that it has something to do STL map. Can anybody throw some light on this issue ?
Not really. Threading is off-topic in comp.lang.c++. You need to talk to
your compiler vendor (and/or the vendor of your STL implementation. . they
may not be the same people) as to how they handle threading within their
STL implementation.
On 8 Apr 2004 08:53:12 -0700, cs********@yaho o.com (Chaman Singh)
wrote: Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and I noticed that I don't get any speedup from using threads and I suspect that it has something to do STL map. Can anybody throw some light on this issue ?
Have you profiled the code to find out where the bottlenecks are? It
might be something to do with map (it might be making many memory
allocations, with a global, mutexed memory allocator). It might be
something else.
Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
On 8 Apr 2004 08:53:12 -0700, cs********@yaho o.com (Chaman Singh)
wrote: Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and I noticed that I don't get any speedup from using threads and I suspect that it has something to do STL map. Can anybody throw some light on this issue ?
Have you profiled the code to find out where the bottlenecks are? It
might be something to do with map (it might be making many memory
allocations, with a global, mutexed memory allocator). It might be
something else.
Tom
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
"Chaman Singh" <cs********@yah oo.com> wrote in message
news:de******** *************** ***@posting.goo gle.com... Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and
I noticed that I don't get any speedup from using threads and I suspect that
it has something to do STL map. Can anybody throw some light on this issue ?
csv
Get a good book on writing programs with POSIX threads.
Threads cannot be efficiently bolted on to a prog in general.
Without more info it is impossible to say whether the map is a problem.
The map is unlikely to be thread safe anyway.
"Chaman Singh" <cs********@yah oo.com> wrote in message
news:de******** *************** ***@posting.goo gle.com... Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and
I noticed that I don't get any speedup from using threads and I suspect that
it has something to do STL map. Can anybody throw some light on this issue ?
csv
Get a good book on writing programs with POSIX threads.
Threads cannot be efficiently bolted on to a prog in general.
Without more info it is impossible to say whether the map is a problem.
The map is unlikely to be thread safe anyway. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dima |
last post by:
This is my simple code
#!/usr/local/bin/perl
use threads;
use threads::shared;
use POSIX::RT::Semaphore;
$sem = POSIX::RT::Semaphore->init(0, 0);
my $pid = fork;
|
by: Evan David Light |
last post by:
After agonizing over this problem for a few days, I've decided to seek
help. No, not the variety that involes a jacket that zips up the back
but this august body of intrepid individuals.
I've discovered the following:
- My compile line should resemble:
CC -D_PTHREADS -D_POSIX_C_SOURCE=199506L -LANG:std -n32 -mips3 -c
<src> -o <obj>
- My link line should resemble:
CC -LANG:std -n32 -mips3 <objs> -o <executable> -lpthread
|
by: Chaman Singh |
last post by:
Hello,
I wanted to use Threads on Sun 4 node SMP. In my program I use STL map and I
noticed that I don't get any speedup from using threads and I suspect that it
has something to do STL map. Can anybody throw some light on this issue ?
csv
|
by: Christian Buckl |
last post by:
Hi,
I try to implement my own thread class based on POSIX threads. I want my
class to manage everything (creation of threads, exception handling...).
This includes also some functions that need to be called within the threads
context (like setting the cancelability state and type). That´s why I am
using a function that initializes the thread and then calls the original
thread function.
The problem is, that I can't manage to implement the...
|
by: raxitsheth |
last post by:
Hello All...
I am using Posix Thread.
class Parent
{
public: virtual void* func(void *)=0;
| |
by: FiLH |
last post by:
Hello,
I would like to know if posix semaphores are inter processes or just
semaphores for threads inside the same process.
I have not seen it defined in the posix specification I have found, but
I have maybe missed something.
Thanks in advance.
|
by: dariophoenix |
last post by:
Hi,
I am trying to encapsulate Linux sockets and POSIX threads in C++ classes (I work in Knoppix, using KDevelop). Since sockets and threads are new to me, I searched for example code and found the following:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <netdb.h>
|
by: Boltar |
last post by:
Hi
I'm writing a threading class using posix threads on unix with each
thread being run by an object instance. One thing I'm not sure about
is , if I do the following:
myclass::~myclass()
{
:
: do stuff
|
by: JackC |
last post by:
Hi,
I am trying to get posix threads working from within an object, heres
some code:
int NConnection::TheadControl()
{
int thread_id;
pthread_t new_connection;
pthread_create(&new_connection, NULL, PriC, (void *)thread_id);
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |