CPU time on multitask applications


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users CPU time on multitask applications
# 1  
Old 04-17-2008
CPU time on multitask applications

Hello all,

I'm using clock() function (from ctime) to realize how long it takes my threaded application to complete an algorithm. I would like to know how this function behaves in multicore boxes, that is: does it return the sum of the clock ticks of each processor the program was runned on ?
I'm asking this because I've splitted one single process into two threads, each of them performing half of the job, but I get that the execution time calculated through clock () is just the same that the one I get using the single-threaded version.

Thank you so much,
bye !
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies

2. AIX

AIX_timeout_thread using lot of cpu time

Hi, i am seeing some strange things on a lpar which we have at this moment. With nmon i see a process aix_timeout_thread which is using lots of cpu (70-80%, all cpu which is "free" is used). This is a kernel process (for as far i can find out) but i am wondering what is causing this to happen... (5 Replies)
Discussion started by: aixvinnie
5 Replies

3. UNIX for Advanced & Expert Users

Cpu time

Hi Experts, If a thread running on CPU needs some data from RAM (from near or far RAM) it requests the data (this moment of time is t0) and gets it in moment of time in t1, and continues his work. Between t0 and t1, while data is transferring from RAM, the thread is goes out from CPU? Is the... (2 Replies)
Discussion started by: sant
2 Replies

4. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

5. Solaris

process CPU time

We are using JAVA program and strange thing is it takes 100% CPU when not in use. The program function is to stream a file on output port (one direction). It checks one directory and when there is a file in it, starts. While it is streaming the CPU usage is normal, about 20%. But, if... (9 Replies)
Discussion started by: orange47
9 Replies

6. UNIX Desktop Questions & Answers

Killing a process if it is not using any cpu time

Hi i am a newbie thanks in advance i have a process which keeps on running but doesn't use any CPU time and doesn't do the functionality which it is suppose to do . If i kill the process and start the process again then the process kicks in and starts using CPU time and continues to do its... (3 Replies)
Discussion started by: nick1982
3 Replies

7. Shell Programming and Scripting

Why CPU time is longer than Elasped time?

I thought a program's elapsed time, some program language call it real time, should be the time of a program from start to finish. And it should be equal or longer than CPU time. This is true for the most of the cases. However, I do see some of my programs CPU time is longer than Elapsed time. ... (1 Reply)
Discussion started by: visio2000
1 Replies

8. HP-UX

how to calculate CPU time under HP-UX

Hi, I am loking for a c++ function that calculate CPU time under HP-UX Thank you (1 Reply)
Discussion started by: limame
1 Replies
Login or Register to Ask a Question
PMCTIME(3)						     Library Functions Manual							PMCTIME(3)

NAME
pmCtime - format the date and time for a reporting timezone C SYNOPSIS
#include <time.h> #include <pcp/pmapi.h> char *pmCtime(const time_t *clock, char *buf); cc ... -lpcp DESCRIPTION
pmCtime is very similar to ctime(3), except the timezone used is the current ``reporting timezone'' (rather than the default TZ environment variable scheme), and the result is returned into a caller-declared buffer (rather than a private buffer). Like ctime(3) the time to be converted is passed via clock, and the result in buf is fixed width fields in the format: Fri Sep 13 00:00:00 1986 The result buffer buf must be at least 26 bytes long, and no attempt is made to check this. pmCtime returns buf as the value of the func- tion. The default current reporting timezone is as defined by the TZ environment variable, so pmCtime and ctime(3) will initially produce similar encoding of the date and time. Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current reporting timezone that will effect pmCtime but not ctime(3). SEE ALSO
ctime(3), PMAPI(3), pmLocaltime(3), pmNewContextZone(3), pmNewZone(3) and pmUseZone(3). Performance Co-Pilot PCP PMCTIME(3)