Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.ysu.edu!usenet.ins.cwru.edu!agate!howland.reston.ans.net!newsfeed.internetmci.com!in1.uu.net!news.artisoft.com!usenet From: Terry Lambert <terry@lambert.org> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Symmetric Multi-Processing Date: Mon, 29 Apr 1996 13:41:02 -0700 Organization: Me Lines: 51 Message-ID: <3185295E.41F1F0E0@lambert.org> References: <3180D16D.41C6@wcom.com> <31827FD0.FF6D5DF@FreeBSD.org> <31829E21.46253B04@lambert.org> <4m01n3$t88@nntpd.lkg.dec.com> NNTP-Posting-Host: hecate.artisoft.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.01 (X11; I; Linux 1.1.76 i486) Michael C. Cambria wrote: ] From a user point of view, how does FreeBSD provide SMP from ] _an_ application (or does it)? I'm interested in pthreads. ] I'll settle for Draft 4, but obvioulsy like the actual ] standard interface. In general, any SMP in an OS is visible to applications only if: 1) The applications are multithreaded 2) The OS supports kernel multithreading 3) The threads implementation is kernel-threads-aware So FreeBSD (and Linux) do not currently support SMP scalability at the application level, only on a per process basis. That is, multiple processes can run on seperate CPU's. Note that there are some *significant* disadvantages in terms of quantum utilization in the Solaris/SVR4 thread model; the single overriding advantage is SMP scalability. Depending on how the application makes its calls, this break-point over LWP (or pthreads) may not come until the 4 or 8 processor level for any given multithreaded applications. The best implementation model is a hybrid user/kernel cooperative scheduler utilizing async I/O to fully consume the process quantum on an N:M, N>M mapping of user to kernel threads. I have only seen this model implemented in the lab. ] If pthreads is available, and makes use of SMP, in my case, ] I'll start my work RSN and wait for the SMP to meet ] everyones "production quality". I don't even have an SMP ] machine at my complete disposal yet. Will the SMP code (and ] of course, pthreads) run on a single CPU FreeBSD system? The pthreads implementation does *not* make use of SMP because it is a user-space threading system. The SMP code will only detect one processor on a single processor system when it does the APIC probe, so it will run. It would be more efficient to replace the mutexes with semaphores at compile time for a strictly UP system (even though the multithreading, when complete, will more than make up for the cache fluch overhead of the mutex memory that semaphores don't have). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.