Folks using Java for systems engineering might already be familiar with GC (Garbage Collection) and how GC logs can be important for debugging performance and related issues. GC activity can severely impact the dynamics of system built in Java. If it's a distributed system, then impact could be worse since there are several moving components... Continue Reading →
Volatile vs Synchronized
In this post, I will talk about usage of volatile fields in Java and how volatile is different from synchronized. Both volatile and synchronized are used in multi-threaded programs to get some degree of thread safety depending on the operations performed by different threads. Consider the following piece of code class VolatileDemo { private int... Continue Reading →