On Sunday, February 03, 2013 11:45:06, Sean Dague wrote: > On 02/03/2013 09:00 AM, Chris Knadle wrote: ... > > The next logical question you're likely to have is "How can I tell if a > > program has been designed to be multi-threaded?" Thankfully I think > > there's an answer for that. On Linux systems multi-threading is > > generally done via the 'pthread' library -- but the point is that it > > includes a /library./ You can use 'ldd' to look for what libraries the > > program has been built against, > > > > and in the case of the GIMP: > > $ ldd /usr/bin/gimp | fgrep thread > > > > libgthread-2.0.so.0 => > > /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 > > (0x00007ffb02ae7000) > > > > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > > (0x00007ffb023ca000) > > > > ... that looks like a program designed to be multi-threaded. > > Just because you use pthreads, doesn't mean the program will really take > advantage of multiple cores well.
Yes that's another matter. The program needs to be written in a way to take advantage of spreading the load across threads, and that's difficult. Just to give everyone the basic idea: normally a program has parts that are a very linear set of logical steps need to taken, and that's a type of "load" that's difficult to break up into pices so that they can be done separately. It also makes debugging the program more difficult because figuring out what went wrong requires finding which thread had the problem, and what that thread was doing at the time. > Concurrent programming is it's own big complicated beast, maybe an > interesting future talk? > > -Sean I'd certainly want to see that talk. -- Chris -- Chris Knadle [email protected] _______________________________________________ Mid-Hudson Valley Linux Users Group http://mhvlug.org http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug Upcoming Meetings (6pm - 8pm) Vassar College Feb 6 - Raspberry Pi Mar 6 - 10th Anniversary Meeting - Linux where you least expect it Apr 3 - Typography: Physical Art to Digital Art
