Introduction Welcome to a new operating systems post. Today, we are going to clarify the difference between swapping and paging. The goal is to focus on the main difference between the two and see why is it sometimes confusing. Let us give it a try… Modern operating systems support multitasking and virtual memory. I recommend
Introduction In computer systems, competition on limited resources such as CPU, drives, printers, database records, etc. requires proper synchronization otherwise, undesired effects may arise. In today’s operating systems post, we are going to talk about deadlocks and starvation when a process or thread hangs up but never stop or finish the intended task. The primary
Introduction If you search for the phrase “Process vs Thread” I bet you, most of the articles you may find follow a typical structure. You will probably find a list of points in a tabular or bullet format contrasting process vs thread. Some articles are excellent but many lack a proper context. In this post,
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
Introduction Welcome to a new code snippet in Python. Today, we are going to clarify the difference between items() and iteritems() methods when using a Python dictionary. Let us first quickly refresh our memory about lists, tuples and dictionaries in Python: A list is an array data structure that can be edited A tuple is
Introduction In today’s Python code snippet, we are going to talk about deleting, removing and popping list elements: remove method: takes a value as input, searches for it, removes the first match. If the item is not found it errors out del function: removes an item at a specific index, can delete all elements or
Question Python list data structure has append() and extend() methods. Both methods add new items to the list. What is the difference between the two? Append vs extend list in Python Append: adds a new item to the end of the list. The item can be an object of any type. It could be a
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
Introduction Concurrency and parallelism are often used interchangeably in computing, however they do not necessarily mean the same thing. If you Google concurrency vs parallelism, you will find different articles explain it differently. I think part of the confusion comes from the way people define these terms. In this post, I am not going to
Set vs list in Python A better way to understand the key difference between sets and lists in Python is to understand the definition regardless of language or syntax. Generally speaking, a set is a mathematical concept which refers to a collection of distinct objects (in math they are called elements). Distinct means there are