Hi All,
thanks for reading this post.
just wanted to know about the ratio of threads and processors.
i am working on c++ on AIX5.2 platform.
my c++ program are multithreaded programs.
In a multithreaded application,should no of processors be equal to no
of threads ?
if we set the thread_scope to system( meaning 1 kernel thread to 1
user thread), does that mean that processors should be equal or more
than the threads?
suppose if we set,
rc = pthread_attr_setscope(&tattr,PTHREAD_SCOPE_SYSTEM) ;
And if i have 4 processors and 7 threads running simultaneously in my
applications.
will that work? or will it cause coredump ? will other threads wait for
CPU.
how is the ratio mapped?
how will the scheduler behave in this case?
please help me in resolving my issues.
thanks in advance to all the experts for their opinion.
Regards
Nagaraj Hayyal. 3 2110
On Mon, 07 Nov 2005 06:01:56 -0800, nrhayyal wrote: Hi All, thanks for reading this post. just wanted to know about the ratio of threads and processors. [..]
You're totally OT here, sorry. Try comp.programming.threads. Or the
newsgroup for your OS.
Just so you know, C++ does not care about processors and its execution
model _presumes_ no threading. At this point, anyway.
V
Hello,
On Mon, 7 Nov 2005 14:01:56 UTC, "nrhayyal" <na************@satyam.com> wrote: Hi All, thanks for reading this post. just wanted to know about the ratio of threads and processors. i am working on c++ on AIX5.2 platform. my c++ program are multithreaded programs.
In a multithreaded application,should no of processors be equal to no of threads ?
Not unless you have extremely compute intensive tasks that will never
block or wait on anything.
if we set the thread_scope to system( meaning 1 kernel thread to 1 user thread), does that mean that processors should be equal or more than the threads?
My last experience with AIX was 4.2. I can't help with this.
suppose if we set, rc = pthread_attr_setscope(&tattr,PTHREAD_SCOPE_SYSTEM) ;
And if i have 4 processors and 7 threads running simultaneously in my applications. will that work? or will it cause coredump ? will other threads wait for CPU.
Of course it could work.
It could coredump if you had incorrect programming.
Yes.
how is the ratio mapped?
Unknown. See your operating system's task sceduler documentation
and all of the parameters you have set for your system, and all
tasks in the system.
how will the scheduler behave in this case?
It is supposed to make the best effort with what hardwaare it has.
A single CPU can generally keep dozens, or more, extremely compute
intensive tasks working most of the time.
please help me in resolving my issues.
I have no idea what you are worried about. You seem to be
over optimizing the thread/process utilization of your system.
It is truely that busy?
thanks in advance to all the experts for their opinion.
Regards Nagaraj Hayyal.
David
Hello,
On Mon, 7 Nov 2005 14:01:56 UTC, "nrhayyal" <nagaraj_hayyal@satyam.com> wrote:
[color=blue]
> Hi All,
> thanks for reading this post.
> just wanted to know about the ratio of threads and processors.
> i am working on c++ on AIX5.2 platform.
> my c++ program are multithreaded programs.
>
>
> In a multithreaded application,should no of processors be equal to no
> of threads ?[/color]
Not unless you have extremely compute intensive tasks that will never
block or wait on anything.
[color=blue]
> if we set the thread_scope to system( meaning 1 kernel thread to 1
> user thread), does that mean that processors should be equal or more
> than the threads?[/color]
My last experience with AIX was 4.2. I can't help with this.
[color=blue]
> suppose if we set,
> rc = pthread_attr_setscope(&tattr,PTHREAD_SCOPE_SYSTEM) ;
>
>
> And if i have 4 processors and 7 threads running simultaneously in my
> applications.
> will that work? or will it cause coredump ? will other threads wait for
> CPU.[/color]
Of course it could work.
It could coredump if you had incorrect programming.
Yes.
[color=blue]
> how is the ratio mapped?[/color]
Unknown. See your operating system's task sceduler documentation
and all of the parameters you have set for your system, and all
tasks in the system.
[color=blue]
> how will the scheduler behave in this case?[/color]
It is supposed to make the best effort with what hardwaare it has.
A single CPU can generally keep dozens, or more, extremely compute
intensive tasks working most of the time.
[color=blue]
> please help me in resolving my issues.[/color]
I have no idea what you are worried about. You seem to be
over optimizing the thread/process utilization of your system.
It is truely that busy?
[color=blue]
> thanks in advance to all the experts for their opinion.
>
>
> Regards
> Nagaraj Hayyal.[/color]
David
thanks david,
this means its not the programming issue, instead its the OS issue which OS will Take care of that.
program can only instruct the OS, but cant force the OS on how to do the job.
i guess i am right in what i am saying.
........
Nagaraj
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Richard Wallace |
last post by:
Hello all,
I'm looking for some input on the best tools to use for profiling
multithreaded C++ code developed on GNU/Linux and compiled using
gcc-3.1. More specifically, the distro in use is RH...
|
by: Amit Dedhia |
last post by:
Hi
I am developing a Dot net application (involving image processing) on
a uni processor. It works well on my machine. I then take all my code
on a multi processor, build and run the application...
|
by: nagaraj_hayyal |
last post by:
Hi All,
thanks for reading this post.
just wanted to know about the ratio of threads and processors.
i am working on c++ on AIX5.2 platform.
my c++ program are multithreaded programs.
...
|
by: Pavils Jurjans |
last post by:
Hello,
I wanted to get some light in the subject. As I develop ASP.NET
applications, it's necessary to understand how exactly the server- communication happens. It seems like initially...
|
by: Chris Calzaretta |
last post by:
Hello
Working with system.threading.thread
Ok
I have an windows user control. It has 3 thread on it
thread 1 uploaded files types a
thread 2 upload files types b
thread 3 upload files types c...
| |
by: groups |
last post by:
Hi all,
I've recently ported a rather large C application to run multithreaded.
A few functions have seriously deteriorated in performance, in
particular when accessing a rather large global...
|
by: Stephen Carson |
last post by:
I'm trying to build a Web Service that will kick off threads as logging
requests come in. These threads will then log to the database. I have
been able to make a simple Web Service. I have been...
|
by: clqrq |
last post by:
i have just a little question:
guess i have a class with a static function and
i have different threads running. do i have to expect the problem that
2 treads try to acces CA::static() at the...
|
by: Dan Bass |
last post by:
Using:
.Net (happens to be VB but same with C#) 2.0
SQLXML4
SQL Server 2005
I've got a multithreaded .Net application that uses the SQLXmlBulkLoad call
and I'm not convinced the COM object is...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
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...
|
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 ...
|
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...
| | |