Results 1 to 10 of 12
Hi everybody,
I have a real big problem to solve...
Is possible, with RedHat enterprise 6.0, to run a C/C++ routine or program ensuring that no other processes (also kernel ...
- 11-30-2011 #1Just Joined!
- Join Date
- Nov 2011
- Posts
- 5
OS Inhibition
Hi everybody,
I have a real big problem to solve...
Is possible, with RedHat enterprise 6.0, to run a C/C++ routine or program ensuring that no other processes (also kernel processes) stop its execution?
p.s. I can't recompile the kernel for this purpose.
Please help me if you can!
- 11-30-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
You can trap pretty much every signal inside your prog (or script for that matter) except for the KILL sig, as far as I know. So I would think the answer is No. You could certainly have something else running (cronjob, daemon, etc.) that monitors a process name and restart it, if it is not found running. You could also monitor/control it via /etc/inittab, but the use of that file is disappearing in Linux. Probably a way to do that now w/systemd but I haven't taken the time to figure it out yet.
Why must the prog not be allowed to be terminated, btw? That might cause lock-ups upon reboot, come to think of it.
- 11-30-2011 #3Just Joined!
- Join Date
- Nov 2011
- Posts
- 5
Thanks for your reply! I need to be able to launch a C routine for test, and as you know, if some other instruction are executed, the test will fail also if no faults are present in the system (i.e. instruction cache test).
So I really need to be sure that no other processes are scheduled (and instruction executed) while the test is running...
- 11-30-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
This sounds a little different than your original post.
So there are other specific processes that might conflict with your test program? If they are running, should your program terminate them, or exit itself?
Or are you saying that multiple copies of the same program might be running and you wish to avoid that (i.e. check for an instance of self and exit, if running)?
Or is it something else?
- 11-30-2011 #5Just Joined!
- Join Date
- Nov 2011
- Posts
- 5
Hi, it is assumed that every other instruction executed could be loaded in cache, if executed. This kind of execution of other instructions during the execution of the test is deprecable... only one copy of the test is executed. I would launch the test and be sure that no other instructions are executed until the test finish...
- 11-30-2011 #6
- 11-30-2011 #7Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
- 12-01-2011 #8
- 12-01-2011 #9Just Joined!
- Join Date
- Nov 2011
- Posts
- 5
Hi,
Mudgen you're right!
This process could use exclusively the cpu, until he finished.
- 12-01-2011 #10Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Have you already played with nice? e.g. nice -20 yourprog nice 19 otherprogs
It's not exclusively giving yourprog CPU utilization, but it's a step in the right direction.


Reply With Quote
