In the previous post, I had given a brief description of Linear Hashing technique. In this post, I will talk about Extendible Hashing. Like Linear Hashing, Extendible Hashing is also a dynamic hashing scheme. First let's talk a little bit about static and dynamic hashing as I had skipped this part in my previous post.... Continue Reading →
Linear Hashing
In this blog post, I will give an introduction to a hashing methodology called Linear Hashing. Hash Table Detour A hash table is a well known in-memory structure that supports key-value access with lookup cost being amortized O(1). The hash table is just an array, and each location/index in the array stores a <KEY,VALUE> item.... Continue Reading →
Pointer World !!
In this post, I will just give a brief overview of using pointers in several ways in our C/C++ programs. Pointer is sort of a known concept. Hence, the post will be focusing on the usage in various scenarios like arrays, strings, structs, functions along with code examples. Pointer to Pointer Pointers and Arrays Array... Continue Reading →
Logical and Physical Addresses
In this post, I am going to talk about logical and physical addressing of main memory (DRAM) in computer systems. Logical addresses are also known as virtual addresses. In fact, I would refer to them logical aka virtual aka unreal addresses. Yes, as the name suggests, logical addresses are unreal addresses. These are not the... Continue Reading →
Leader Election and Log Replication in Raft – Part 2
In the last part of this post, I gave a general overview of Raft followed by Leader Election algorithm. We now need to discuss, how leader does the consistent replication of log onto the follower nodes, few more safety properties, and constraints on the election mechanism. Log Replication For now let's assume that client requests... Continue Reading →
Leader Election and Log Replication in Raft – Part 1
In this post, I will talk about two critical components of Raft consensus algorithm. My post will majorly focus on the explanation of these concepts as I interpreted from this extremely good paper on Raft. Of few papers I have read, it is one of the most well written paper on distributed systems and related... Continue Reading →
Difference between Page table and Inverted Page table
A page table is maintained by the operating system on a per process basis. Every process has its own page table, and that is why we do not need to store any process identifier(s) in the page table. Page table maps a given logical/virtual page number to actual physical frame/page address. The logical address for a... Continue Reading →
Fenwick Trees
In this post I will talk about Fenwick Trees aka Binary Indexed Trees. I got to use them recently while solving a problem in a coding challenge. Problem: Let's say we have an array of N positive integers. We need to be able to serve the following two operations efficiently: GetPrefixSum(i) - Gets the cumulative... Continue Reading →
Paging v/s Swapping
Swapping is the procedure of copying out the entire process(its address space) from main memory to some sort of secondary storage(typically hard disk or tape storage). Usually this is done as a result of CPU scheduling. Operating System typically maintains a read-to-run queue of processes. The queue comprises of information about processes that are ready... Continue Reading →