On Thursday 15 February 2001 15:40, Jeffrey Krasky wrote:

> > Hi,
> is there a way in Linux to run a process and determine which other
> processes might have been going on during the execution of your process?  I
> would like to run my task in real-time and see how long it takes to run,
> and then run it in ordinary linux mode and see how long it takes to run.

Well, if you want to be entirely sure you're not being disturbed, just run 
your thread as SCHED_FIFO at top prio - that will freeze the entire user 
space until you release the CPU. (It's effective to the point that you'll 
have to press the reset button if your code doesn't feel like giving up!)


> Then I want to note the differences, but I would like to also be able to
> see, when running in ordinary linux mode, if anything else used any of the
> same CPUs as my task did.

Not possible in SCHED_FIFO mode - the timesharing is entirely bypassed, 
giving you full control over CPU utilization until you yield. However, note 
that the *kernel* still has higher priority than your thread, if it should 
feel like doing something.


Anyway, what are you looking for, really? There shouldn't be any differences 
in raw code execution speed, I think... (Unless you're going to compare 
kernel vs user space ways of doing various kinds of I/O and that kind of 
stuff, of course. :-)


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'

Reply via email to