As you know, I changed a couple of workplaces during my career. Long story short, one interesting thing that I noticed in different companies is various models for multi-threaded programs (mostly for large embedded systems).
Posted on May 27, 2009, 1:51 pm, by Alexander Sandler, under
News.
This article explains how to implement performance critical reference counting in C/C++ program, using atomic variables and gcc. Enjoy it. Read the article here.
Table of contents Introduction What reference counting needed for? This is how we will use atomic variables to count references to objects The naive approach The RCU approach Where atomic variables coming from? Conclusion IntroductionBACK TO TOC Lets say we have a data structure that manages objects and we would like to manipulate the data […]
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 article introduces signals in Linux to the reader. It explains the nature of signals, how to use them and gives few small use examples.
Table of contents Introduction What reference counting needed for? This is how we will use atomic variables to count references to objects The naive approach The RCU approach Where atomic variables coming from? Conclusion Introduction How atomic variables work Atomic variables size limitations Use cases The real thing… Time to see some action Precautions Conslusion […]
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 »