Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.unix.wizards Subject: Stopped processes with negative priority Message-ID: <1991May16.062850.14385@Think.COM> Date: 16 May 91 06:28:50 GMT Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 24 Originator: barmar@gandalf.think.com From time to time I notice stopped processes with negative priority (perhaps always -5, in case this is significant) on our Sun-4's (running SunOS 4.1.1, but I think I remember seeing this in earlier SunOS releases as well). I generally notice it because any process with a negative priority is included in the load average, and the load sometimes gets pinned at 1.5-2 even though no processes are running hard. If I send the process a SIGCONT it immediately stops again, but this time with a positive priority, so the load goes down to a reasonable level. I suspect that the problem may be a kernel race condition. The processes in this state always seem to be full screen programs. I suspect what's happening is that the program catches SIGTSTP, resets tty modes, and then sends itself a SIGSTOP to stop itself for real. Maybe the process is being stopped before the kernel has restored the priority. Is this indicative of a real problem? Are these processes using any more system resources than ordinary stopped processes? If they're counted in the load average, then I assume this means that they're sitting on the active process queue, so are they increasing the scheduler overhead? -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar