Date: Mon, 25 Nov 2002 12:04:29 -0600 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: freebsd-stable@FreeBSD.ORG Subject: Re: running many programs on multiprocessor system Message-ID: <3DE2662D.3070404@math.missouri.edu> In-Reply-To: <3DE149C7.2030607@math.missouri.edu> References: <3DE149C7.2030607@math.missouri.edu> <3DE14D21.8070905@math.missouri.edu> <3DE248AC.8C54C273@softweyr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Wes Peters wrote: > Stephen Montgomery-Smith wrote: > > >Stephen Montgomery-Smith wrote: > > > > > >>I have a dual Athlon MP 2100+. If I run three computationally intensive > >>programs, one program runs at 99% CPU usage, and the other two run at > >>50% CPU usage (this is according to top). > >> > >>It used to be that each of the three programs ran at 66% CPU. I liked > >>it better the old way. > >> > > > >I spent a couple of weeks thinking about this before posting. And then right > >after posting, I realise the difference between these programs and other > >programs I run - these programs were written in assembler. > > > >I have also noticed that threaded programs don't thread properly if one of the > >threads calls a subroutine that is written in assembler. > > > >Sorry about the noise - but if anyone can explain to me why this happens I would > >appreciate it. > OK, I started out thinking that this might be a bug in FreeBSD, now I think that it is a bug in my program. I wrote a very simple threaded program in which one of the threads is a very simple loop written in assembler (a single jmp instruction), and the other thread is something very easy also. The program threads properly. Furthermore, if I run 3 instances of this program (even the non-threaded version) each process takes 66% CPU time, as expected. The problem with the more compilated assembler code I was using (which is called from a C program) is that I didn't write it, and I barely understand assembler code. Anyway, I realise now that this is not a freebsd-stable question. Maybe sometime soon I will post the question afresh to freebsd-hackers. In the mean time, can anyone tell me or point to me documentation telling me any kind of rules that assembler functions called from C programs have to obey? (And maybe vice versa.) Thanks for all the offers of help. The programs are all running at the same nice level, so that is not the problem. Thanks, Stephen -- Stephen Montgomery-Smith stephen@math.missouri.edu http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DE2662D.3070404>