How to keep background processes from slowing down my program

Micah Altman micah at flobb4.csd.sgi.com
Tue Mar 5 12:13:59 AEST 1991


In <1991Feb28.204654.26010 at athena.mit.edu> mmachlis at athena.mit.edu (Matthew A Machlis) writes:


>I am working on a realtime graphics simulation for which it is critical that
>every loop through the program take the same amount of time to run.  I
>realize that the drawing routines will take variable amounts of time to
>execute depending on what exactly is being drawn on the screen, and can
>account for this by forcing the program to pause a bit if the loop runs
>faster than usual.  However, in timing the program I have noticed that 
>occasionally a loop will take much longer (up to 2-3 times as long) as the
>average loop time.  All I can think of is that some background process is
>interrupting my program to do something and taking up this extra time.  Is

This is definitely a possibility. Other possibilities include:

	+ you are accessing a memory location not loaded, and need to read
	a page in from disk
	+ you are occassionally running into overflow/underflow, which
	generates hidden traps and slows down things a lot
	+ you are trapped in some kernel/networking service ( another process
	but not necessarily a background process )
	
>there any way I can stop this from happening?  I can use "nice," but only

	See Using Real Time Programming, which is in the current
	IRIS-4D Programmer's Guide for complete details and a sample
	realtime  program


>the super-user can execute programs with higher priority than usual, and
>running my program as the super-user all the time is not an option.  Is 
>there any way to boot up the machine such that it doesn't run all of the
>background filekeeping tasks?

There are some daemons you can turn off, especially if you aren't planning
to do networking and disk i/o but unfortunately you can't turn off everything.

The only way to run in true realtime is to be able to do some configuration
of the machine and processes running as superuser, and to be running on
a multiprocessor machine.



--
	"Entia non sunt multiplicanda sine necessitate." - William of Ockham
	Micah Altman, "Computational Juggler"	   	   micah at csd.sgi.com
	Phone (415) 335-1866				   FAX (415) 965-2309
	Disclaimer: 	Everything in this document is a lie.	



More information about the Comp.sys.sgi mailing list