---------------
Christof Meerwald@blog.www

home
> blog
>> 475

translate to German (by SYSTRAN)

Weblog RDF feed, Atom feed

[previous] / [up] [overview] [down] / [next]

Tue Aug 29 17:23:57 2006 GMT: Notting Hill Carnival

Tue Aug 22 17:08:17 2006 GMT: e-mail Address Change

Sat Aug 19 12:10:18 2006 GMT: mcabber 0.8.0

This week mcabber 0.8.0 has been released. The reason why I mention this release is because I have contributed some fixes to significantly reduce CPU usage. In previous versions, there was a pretty tight busy-waiting loop that was responsible for up to around 2000 context switches per second. This has been replaced by a proper select loop.

Tue Aug 08 17:07:30 2006 GMT: Linux threading models compared: LinuxThreads and NPTL

Vikram Shukla has published an article on IBM's developerWorks site comparing Linux threading models. Yet, in my opinion this article is misleading and contains a few errors. To start with, it actually compares threading libraries (i.e implementations) and not threading models (as both libraries implement a 1:1 threading model based on the clone system call which basically is a generalisation of the fork system call).

Vikram is right in claiming that Linux initially didn't have any thread support, but the clone system call was specifically introduced to allow the implementation of threading libraries. Although the POSIX threading API was implemented in user-space, scheduling was done by the kernel (as all threads were proper kernel threads). The article further points out the limitations of LinuxThreads that lead to the development of NPTL, but it misses a few important points here. In essence, the kernel support for threading in NPTL is merely an evolution of the early clone-based threading support, i.e. clonehas been extended and a few system calls have been added to move parts of the threading library from user-space into the kernel.

The author also seems to have found the silve bullet for thread safety: "You should also keep in mind that while building your library with LinuxThreads, use the -D_REENTRANT compile-time flag. This makes the library thread safe." Well, for some definition of "thread safe" this might be true, but, of course, for most definitions of "thread safe" it isn't, -D_REENTRANT will only ensure that the multi-threaded C-library is being used (although the preferred flag on Linux is -pthread).

Finally, the last paragraph really looks quite strange and statements like these shouldn't be included in any technical article: "NPTL, being an SMP-oriented design, has drawbacks too. I have seen cases on recent Red Hat kernels where a simple threading application runs fine on a single-processor machine but hangs on SMP. I believe there is still more work to be done on Linux to truly make it scalable to satisfy higher-end applications." This is really just FUD at its worst.

Tue Aug 01 17:16:14 2006 GMT: Llandudno

Having walked in Snowdonia for most of my one week vacation in Wales, I spent the weekend in Llandudno before returning to Swindon. I have just uploaded the last few pictures to my photo album.

Fri Jul 28 23:18:39 2006 GMT: Snowdonia Vacation

I have been on vacation in Snowdonia National Park (North Wales) this week, check out my digital photo album.

Thu Jul 20 17:11:20 2006 GMT: Self-service Library

West Swindon Library has just installed some RFID-based self-service machines and it even appears to work. Unfortunately, I haven't been able to find any background information on the Web yet.

Sun Jul 16 12:42:53 2006 GMT: Croydon Summer Festival

Sun Jul 09 11:28:29 2006 GMT: rise against racism

Sat Jun 24 19:48:40 2006 GMT: edge.cmeerw.net (+JabRSS) back

Tue Jun 20 16:39:35 2006 GMT: Server Crash

Mon Jun 12 21:00:19 2006 GMT: Swansea

---------------

This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.

Revision: 1.14, cmeerw.org/blog/475.html
Last modified: Mon Sep 03 18:19:55 2018
Christof Meerwald <cmeerw@cmeerw.org>
XMPP: cmeerw@cmeerw.org