Month: October 2007

  • Better Holidays

    I’m sure that many other people have noticed that stores are offering a lot more items with a Halloween theme these days, and that there are already Christmas themed items available on shelves. The Christmas stuff in particular seems a bit nuts, since it started appearing more than two months before Christmas. However, I am…

  • Gcc vs. Users

    Development of the gcc compiler faces recurring tension between people who want gcc to generate better code and people who want gcc to support their style of programming. The languages which gcc supports all have standards which are intended to provide an interface between the programmer and the compiler. The programmer can assume that the…

  • Social Networking

    Web sites like Facebook, MySpace, LinkedIn, Orkut are billed as community sites. You can connect to your friends, and find out what they are up to. It’s a good way to keep track of what people you know are doing. I have a page on three of these sites. Since I am not a very…

  • Single Threaded Memory Model

    One more round on the parallel programming theme. There has been some recent discussion on the gcc and LKML mailing lists about an interesting case. static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static int acquires_count = 0; int trylock() { int res; res = pthread_mutex_trylock(&mutex); if (res == 0) ++acquires_count; return res; } On x86 processors, current…

  • Gold Workqueues

    The gold linker is multi-threaded. I’ll sketch the implementation I chose. I wanted to avoid using lots of fine-grained mutexes, because they are both error-prone and expensive. Instead, I used a workqueue system. This requires breaking up the job into, essentially, a state machine. The whole link is defined as a series of relatively independent…