What is the most frequently used piece of software on your computer? Here’s one program that holds one of the highest place in my list of most frequently used programs. I am talking about… bash. In case you don’t know, this is the program behind large portion of the Linux command line. It is the [...]
Update 06/16/2009: On several occasions, commentators to this article pointed out that this post is somewhat incomplete. Therefore, before I continue, I would like to make some things clear. Before considering the code below, please note that spinlocks are totally useless on uni-processor computers. This is due to a nature of spinlocks, which I will [...]
This question is especially relevant after yesterday’s fiasco. I ran into an article whose name is exactly Is desktop Linux too fragmented to succeed? The article argues that the fragmentation is what keeping Linux Desktop from beating Mac OS and even Windows. It is because the effort to create Linux desktop is scattered across multiple [...]
Once every year or so, I get so frustrated with Windows Desktop that I decide to install Linux. I am a big fun of Ubuntu Linux. I use it for many things, this includes a server platform for this web-site. So most natural choice for me was to try Ubuntu 9.04, the latest version. I [...]
I can’t beleive all the things that you can do with Python. Obviously, whatever you can do with Python, you can do with a whole bunch of programming languages out there. What I am really impressed with, is the ease. Few weeks ago I was looking for a way to programatically send myself SMS on [...]
Recently I ran into this problem. How do you capture SIGSEGV with a signal handler and still generate a core file? The problem is that once you have your own signal handler for SIGSEGV, Linux will not call default signal handler which generates the core file. So, once you got SIGSEGV, consider all that useful [...]
Posted on November 9, 2008, 9:23 am, by Alexander Sandler, under
Short articles.
Continuing my previous post, I would like to talk about relatively new feature in glibc and pthreads in particular. I am talking about spinlocks.
Posted on October 23, 2008, 5:16 pm, by Alexander Sandler, under
Short articles.
Recently I ran into few pieces of code here and there that assumed that int is an atomic type. I.e. when you modify value of the variable from two or more different threads at the same time, all of the changes you’ve made to the value will remain intact. But really, can you modify variables [...]
Posted on May 11, 2008, 11:03 pm, by Alexander Sandler, under
Short articles.
I mentioned this several times in my articles and included a link to wikipedia’s definition of CIDR notation. However only now I saw how complex the wiki’s definition is. From the other hand, I guess any formal definition of the subject would be complex and hard to understand. So I took the liberty to describe [...]
From some reason this topic never got enough attention in libc. POSIX threads library does addresses this issue, however what starts in POSIX library stays in POSIX library. pthread_self() and friends will get you an identifier that is unique accross your program, but not accross your system. Although thread is a system object, the system [...]
Tags:
call,
getpid,
gettid,
identifier,
linux,
pid,
posix,
pthread,
syscall,
system,
thread,
tid 11 Comments |
Read the rest of this entry »