All Posts

Learnings from Advent Of Code Day 1 as a Rust Newbie

In this post, I talk about some of the things I learned doing Day 1 of the Advent Of Code challenge in Rust, as a Rust newbie!

Continue reading →

Virtualizing Memory

In the last article, we asked ourselves how the operating system gives each process the illusion that it has its own address space despite only having one hardware RAM. This is one of the most important and most complicated virtualization techniques that the operating system performs.

Continue reading →

The LANd of Computer Networking

To understand how your laptop at home talks to Google’s servers in a galaxy far far away, you first need to understand how your laptop at home (or in a data center) talks to another computer located in the same physical location. To do that, all the computers must be connected in some way so that they can transfer signals to each other.

Continue reading →

Virtualizing the CPU

Have you ever wondered how your 6-core MacBook is able to run more than 6 programs at once? Each core is executing one instruction at a time, it’s bizarre to me that it’s able to run more than 6 applications. That’s the magic of the operating system.The most fundamental piece of hardware in a computer is its CPU. The CPU (central processing unit) executes instructions given to it and performs logic computations very quickly. In this article, we’ll talk about how the operating system makes it seem like all the programs on your computer have exclusive access to the CPU resource, when in reality, it’s shared across all of them.

Continue reading →

History of Operating Systems

The first operating system was almost like a computer at a modern day library. Nobody owns it, and if you wanted to use it, you may need to book some time out with a librarian. You may have an hour to use the computer, but you’ll spend at least 10 - 15 minutes getting set up: downloading applications you need, loading files, logging in to websites. It may not seem like much but the overhead definitely adds up. Operating systems in the 1950s were very similar, you would have to book some time out with a human operator and they would schedule a slot for you to run your job. It would take you a while to set up your program, but once you had, you were free to run it for the remainder of your slot.

Continue reading →

Going faster in Linux with BPF

I ran into an article in the Linux Weekly newsletter that talked about BPF and got curious what it was. BPF (also known as Berkeley Packet Filtering) is a technology that serves as a “faster” alternative to interacting with kernel-space from user-space. Woah, that’s nuts; I didn’t even know such a thing existed!

Continue reading →

How does event-driven programming even work?

I’ve always wondered how event-driven programming worked – it is very different from the programming paradigms I was taught in school. I was confused by the asynchronous nature of callbacks and promises. It was also interesting to me how something like setTimeout or setInterval was implemented! It seemed non-trivial for this to be implemented in another language like C/C++ without constantly checking a timer in several areas of your code.

Continue reading →

My first day checking out Rust

This weekend I decided I would learn a bit of Rust and try to understand the hype around it! Like learning most programming languages, I started out writing a "Hello World!" program.

Continue reading →

Introduction to Computer Networking (Part 1)

The computer networking stack consists of 7 layers, each of the articles in the series is going to talk about one of these layers. The 7 layers are known as the OSI (Open Systems Interconnection) model. We will start from the “highest” layer which is known as the Application Layer.

Continue reading →

Building a Single Threaded Web Server in Golang

HTTP web servers are everywhere. They run everything from our search engines to our social media websites. Have you ever wondered how an HTTP web server works? This post dives a bit deeper into how to build your own web server.

Continue reading →