Posts Tagged ‘CPU’

printf() vs stream IO in C++

Before joining Dell I was mostly working in kernel writing in C programming language. At Dell I still work on mostly low level stuff, but this time it is user-mode, so I am not tied up to C anymore. We’re writing in C++ and I am learning C++. One of the less appealing things for […]

Models for multithreaded applications

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).

Why interrupt affinity with multiple cores is not such a good thing

One of the features of x86 architecture is ability to spread interrupts evenly among multiple cores. Benefits of such configuration seems to be obvious. Interrupts consume CPU time and by spreading them on all cores we avoid bottle-necks. I’ve written an article explaining this mechanism in greater detail. Yet let me remind you how it […]

New article – C/C++ reference counting with atomic variables and gcc

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.

C/C++ reference counting with atomic variables and gcc

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 […]

pthread mutex vs pthread spinlock

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 […]

A new kind of virtualization

There are plenty of virtualization technologies. There are organizations like VMware, VirtualBox and XEN, whose virtualization allows one to run several virtual computers using one physical computer. I worked at a company called ScaleMP. ScaleMP’s technology, vSMP, turns multiple physical computers into one large computer. Today I was looking for something different. I was looking […]

How inheritance, encapsulation and polymorphism work in C++

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 Encapsulation How methods work How overloading works How mangling solves the problem Structure and size of the object How inheritance […]

New article – 32bit vs 64bit computers, the QA

This article describes the difference between the two. Does getting 64-bit support really worth the time and the effort and perhaps the the money? Find out here.

32bit vs 64bit computers, the QA

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 Encapsulation How methods work How overloading works How mangling solves the problem Structure and size of the object How inheritance […]