Orthogonality and its importance in software development

I’ve been lately reading The Pragmatic Programmer by Andrew Hunt & David Thomas. Been onto a chapter about decoupling requirement in the development of software, I thought of putting few lines on the weblog. Orthogonality is derived originally from Geometry where it is meant to illustrate two lines which meet at right angles and hence [...]

failed to retrieve keys – Automatix !

After installing Automatix on the Ubuntu, when I started it , it sleeps for some time (seemingly) and then says – failed to retrieve keys.
Looking at the `ps -aef’ output I could find that it has been trying to get the keys with a timeout value and when the timeout occurs, it shows the error.
So [...]

atomicity and alignment of data in memory

A data item is aligned in memory when its address is a multiple of its size in bytes. For instance, the address of an aligned short integer must be a multiple of two while the address of an aligned integer must be a multiple of four.
Why is it important to know about alignment ?
Assembly language [...]

fork and vfork

quick question: what’s the difference between fork() and vfork() system calls ?
quick answer: vfork() system call creates a process that shares the memory address space of its parent.
details:
fork() is implemented by linux as a clone() system call whose flags parameter specifies both a SIGCHLD signal and all the clone flags cleared and whose child_stack parameter [...]

difference between jmp and far jmp

a quick question in interviews: what is the difference between jmp and far jmp ?
a quick answer: far jmp modified both CS and EIP while jmp modifies only EIP.

handling interrupts stackability

An interrupt is an asynchronous event caused by devices to the kernel which must be processed urgently and in system context. Since this is not handled in process context, this cannot access u area and other process specific data structures. Only penalty that the interrupted process makes is that interrupt handling uses the time slice [...]

UID, GID – real and effective – difference !

Reading the book by Uresh Vahalia, Unix Internals, I could understand exactly what is the concept behind real and effective UID and GID. I immediately thought of blogging it for reference.
The effective UID and effective GID affect file creation and access. During file creation, the kernel sets the owner attributes of the file to the [...]

setting DISPLAY on linux while ssh’ing

If you are also fed up of exporting DISPLAY manually everytime you need to use gvim or anything else requiring ‘X’ then you will get a relief reading this post. you can use -X option
ssh -X [IP | Host]
If you use ssh -X, ssh will tunnel your X connection for you and automatically set [...]

Sequence Points in C

From the confusions in Expressions in C, as to what is legal and defined, and what is not, I read following from the C FAQs.
A sequence point is a point in time at which the dust has settled and all side effects which have been seen so far are guaranteed to be complete. [...]

post/pre increment code – some digging !!

I came across the following C problem this morning. This problems are so similar in looks that i felt a deja vu. I used to think earlier that these problems are just a result of obscure thinking or for the satisfaction of an interviewer’s ego but now my view is different – they also prove [...]