How do I slow down a process?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do I slow down a process?
# 15  
Old 11-06-2011
Smilie I feel dumb. No, I did not. Fixing.
# 16  
Old 11-06-2011
This User Gave Thanks to Corona688 For This Post:
# 17  
Old 11-07-2011
Thanks. It compiles fine, and works for the test program and a lot of other simple stuff, but then when I go to actually test it:

Code:
GThread-CRITICAL **: g_cond_timed_wait_posix_impl: assertion `end_time.tv_nsec < G_NSEC_PER_SEC' failed

I couldn't find exactly what G_NSEC_PER_SEC does but I'm guessing it's the number of some smaller units in a second, which is no longer true. I looked it up on google code and found it in a couple places, the most interesting one being a method in "glib-1.3.2/gthread/gthread-posix.c" called "g_cond_timed_wait_posix_impl", plus the method has the word assert in it as well.

So I copy pasted the entire function, added "glib-2.0/glib.h" to the includes, and removed the assert part, but then when I compile:
Code:
/usr/include/glib-2.0/glib.h:32:26: fatal error: glib/galloca.h: No such file or directory

where do I get the file or am I doing something wrong? I've attached my modifications.

Last edited by Nathan1; 11-08-2011 at 01:02 AM..
# 18  
Old 11-08-2011
Adding more functions into it isn't going to help. It's not the lack of a function that's causing it to crash.

It's not even a crash -- it's a failed assertion. They check to make sure the clock isn't going backwards or anything stupid, and it is.

Each and every system call that involves timers in any way may need overloading and that's going to be hell. Some of them might not even be possible, particularly the ones in pthreads, which tend to involve a lot of ASM trickery, have multiple independent timers, multiple kinds of timers some of extremely high resolution, all of which have to be handled in a thread-safe manner.

Last edited by Corona688; 11-08-2011 at 02:39 AM..
# 19  
Old 11-08-2011
Rather than modifying userspace libraries, a better approach might be to modify the kernel's notion of time, i.e. HZ, jiffies, etc.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Improve script - slow process with big files

Gents, Please can u help me to improve this script to be more faster, it works perfectly but for big files take a lot time to end the job.. I see the problem is in the step (while) and in this part the script takes a lot time.. Please if you can find a best way to do will be great. ... (13 Replies)
Discussion started by: jiam912
13 Replies

2. Solaris

Defunct process are generated after JNLP connection with a slave and the machine gets very slow

Hi everyone, I'm working on continous integration with Jenkins. I’m facing an issue while connecting a slave (solaris sparc 8) with Jenkins ver. 1.532.2 This slave is connected via the option “Launch slave via execution of command on the Master”. Connection is established with: -... (1 Reply)
Discussion started by: javaPIC
1 Replies

3. AIX

AIX 7.1 on Power 750 is very slow with no high memory or process consumption

Hi, This thread has been posted before on linuxquestions.org, but no answer, maybe because this is unix question and not linux. I'm posting the same thread here, hope I can get an answer from someone in the meantime, I wish I could post of emergency thread but it needs bits which I don't have :... (6 Replies)
Discussion started by: aLuViAn
6 Replies

4. Shell Programming and Scripting

Why is SED so slow?

I have many files which contain about two million lines. Now I want to use sed to delete the 9th line and add a new line behind the 8th line. I use the command as follows: for((i=1;i<100;i++)); do echo $i; sed -i '9d' $i.dat; sed -i '8a this is a new line' $i.dat; done But it is... (3 Replies)
Discussion started by: wxuyec
3 Replies

5. Shell Programming and Scripting

My attempt is FAR too slow

I have numerous (hundreds) of data files with various values in each file. The values are 1 per line, and identified by the fieldname in the 1st field in the line, which is delimited from the actual field value by a colon. So an example from one of the files looks like this: NAME: Bob Jones... (2 Replies)
Discussion started by: Finja
2 Replies

6. Solaris

Certain zones are slow

only the Tomcat serving ones. An oracle zone on the same global zone responds instantaneously. Running netstat results in a long wait. Cannot deploy builds with Jenkins to these web servers. Thoughts? (2 Replies)
Discussion started by: LittleLebowski
2 Replies

7. UNIX for Dummies Questions & Answers

Slow printing / CUPS - process "parallel" high cpu

Hello. I have a slackware system running cups with an HP laserJet 2100 connected via parallel port in ECP mode. Print jobs are working. Very slowly. 15K test print out of cups takes about 2 minutes to complete. When the printout is on the way to the printer, the process "parallel" uses... (0 Replies)
Discussion started by: agentrnge
0 Replies

8. HP-UX

Server become too slow

Hi, Since last week our server become too slow when we try to run application on it. When we run top command, it show as below: So it's nothing to do with heavy utilization, right? Can you give some opinion on what actually had happended? Thank you very much... :b: (4 Replies)
Discussion started by: yeazas
4 Replies

9. Post Here to Contact Site Administrators and Moderators

Slow

The site has gone slow for quite some time... Can you do somethin abt it (2 Replies)
Discussion started by: DPAI
2 Replies
Login or Register to Ask a Question