A calculator and an operating system may seem to have little in common. One adds numbers; the other manages an entire computer. Yet both can…
You compile a C program and run it in two terminals. Both runs use the same executable file, but each has its own identity, its…
1. Four Names That Do Not Mean the Same Kind of Thing Windows, Mac, Unix, and Linux often appear together in discussions about operating systems.…
Linux and Windows both run programs, manage memory, read and write files, and let software use hardware. So what makes their kernels different? You may…
You open a browser, play a song, or type a message. The computer responds almost immediately. But what tells it how to do these things?…
1. If Apps Cannot Control Hardware, How Do They Open a File? Welcome back to Gate & Kernel, where we explore how computers work, from…
How does a CPU choose which value to send into a calculation? How can a digital circuit select one source of data from several available…
When you open a browser, play music, or run a C++ program, the CPU executes instructions for those applications. It also executes instructions for the…
When you write a program in C or C++, how does the processor know what to do? Your source code might describe a calculation, a…
When you open an application, play a video, or save a document, your computer must coordinate many different activities. Programs need processor time, memory, files,…
When you open a web browser, play a video, save a document, or run a game, many parts of the computer must work together. The…
A CPU can perform arithmetic, compare values, execute branches, and manipulate bits. But most useful programs need much more than registers and an ALU. They…
The XOR gate is one of the most important logic gates inside a computer. At first, XOR may look like just another Boolean operation, similar…
A NAND gate looks like a very small and simple digital circuit. It takes two binary inputs and produces one binary output. But this…
Machine learning is one of the most important technologies behind modern artificial intelligence. It is used in spam filters, recommendation systems, fraud detection, image recognition,…
In Part 1, we learned how virtual addresses are translated into physical addresses. In Part 2, we looked at page faults, demand paging, memory protection,…
How Virtual Memory Really Works, Part 2: Page Faults, Demand Paging, Memory Protection, Shared Memory, and Copy-on-Write In Part 1, we followed the path from…
When programmers first learn Python, Java, C++, JavaScript, or Rust, an interesting question eventually appears: What language are programming languages themselves written in? Is Python…
How Virtual Memory Works(1): Virtual Addresses, Pages, Page Tables, and the MMU Virtual memory is one of the most important ideas in modern computer systems.…
Every program eventually becomes a sequence of instructions that the CPU must execute. A line of C such as: c = a + b; looks…