Difference between isinstance and type in Python

Introduction Python programming language is a dynamically typed language. In other words, variable types are not explicitly declared as in statically typed languages (ex. C++). Instead, type checking is performed at runtime as opposed to compile time. The debate of which is better? a dynamically typed or statically typed language is not discussed in this

Difference between mutual exclusion and synchronization

Introduction Welcome to a new operating systems post. Today, we are going to clarify some terms frequently used in concurrency and operating systems design. You have probably heard of the following terms… Processes and threads Shared memory and resources Race conditions Mutual exclusion Critical section or critical region Synchronization primitives or constructs Locks and spin

Python for loop else clause

Introduction In this post, we are going to discuss a rarely used Python feature. We are familiar with the regular for and while loops but using an else clause after a loop is not common. We can live without this language feature however it can be used to write elegant code. Let us take an