Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.os.linux.development.apps Subject: Re: Application process starts multiple times Date: Fri, 15 Jul 2011 14:25:31 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 50 Message-ID: References: <87d3hb4p2j.fsf@araminta.anjou.terraraq.org.uk> NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1310739931 18578 64.122.56.22 (15 Jul 2011 14:25:31 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Fri, 15 Jul 2011 14:25:31 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:179 On 2011-07-15, Richard Kettlewell wrote: > "elonica.pl" writes: >> I'm porting C++ application from ARM to MIPS platform. It works now, >> but I'm facing some strange timing problems. I've seen now that My app >> process is called multiply time. Here is "top" output: >> >> Mem: 24592K used, 102084K free, 0K shrd, 0K buff, 16864K cached >> CPU: 0% usr 99% sys 0% nice 0% idle 0% io 0% irq 0% softirq >> Load average: 4.02 2.17 0.95 >> PID PPID USER STAT VSZ %MEM %CPU COMMAND >> 1888 1875 admin R 12096 10% 98% ./my_app.exe >> 1897 1875 admin R 12096 10% 1% ./my_app.exe >> 1894 1893 admin R 1768 1% 0% top >> 1877 1875 admin S 12096 10% 0% ./my_app.exe >> 1923 1875 admin S 12096 10% 0% ./my_app.exe >> 1874 1187 admin S 12096 10% 0% ./my_app.exe >> 1876 1875 admin R 12096 10% 0% ./my_app.exe >> 1926 1875 admin S 12096 10% 0% ./my_app.exe >> 1921 1875 admin S 12096 10% 0% ./my_app.exe >> 1922 1875 admin S 12096 10% 0% ./my_app.exe >> 1925 1875 admin S 12096 10% 0% ./my_app.exe >> 1884 1875 admin S 12096 10% 0% ./my_app.exe >> 1920 1875 admin S 12096 10% 0% ./my_app.exe >> 1890 1875 admin R 12096 10% 0% ./my_app.exe >> 1891 1875 admin S 12096 10% 0% ./my_app.exe >> 1875 1874 admin S 12096 10% 0% ./my_app.exe >> 1889 1875 admin R 12096 10% 0% ./my_app.exe >> 1924 1875 admin S 12096 10% 0% ./my_app.exe >> 1896 1875 admin S 12096 10% 0% ./my_app.exe >> 1892 1875 admin S 12096 10% 0% ./my_app.exe >> >> I don't see something like this when I compile it for x86, nor ARM. >> On MIPS I use uClibc instead of glibc. >> >> Does someone know the reason, or can give some hints ? > > At a guess, your process is multithreaded and the version of ps you have > on your MIPS platform doesn't know how to tell the difference between > threads and processes. Indeed. Until recently uClibc didn't support NPTL and used the older LinuxThreads library. One side effect of this is that each thread shows up in the output of programs like "ps" and "top". [There's also an extra "manager" thread that's part of the overhead of linuxthreads.] -- Grant Edwards grant.b.edwards Yow! Hello, GORRY-O!! at I'm a GENIUS from HARVARD!! gmail.com