Inside a Computer: Random-Access Memory (RAM)

When you have something “open” on your computer, whether it is a document, web browser, or a game, it has to be held somewhere. Everything on your computer is likely stored on hard drives (HDD), so why can’t the open programs just be held there? Well, the problem with HDD is they are slow, relative to other technologies, so if the HDD held the program, it would run too slow to be useful. That’s why we have RAM.

RAM is random-access, which means it can read or write data, wherever it may be, in the same about of time. HDDs, on the other hand, read data sequential, taking time to find the data you need. This makes RAM much better for programs that are currently open, needing to read and write quickly and frequently. When a program is opened, the data associated with the program is read from your HDD and written to RAM. It stays in RAM until you close the program. When you save your work, the data in RAM is written to your HDD. Then, when the program is closed, its data is cleared from RAM.

RAM is constructed in what are called dimms. Think of them as sticks of RAM. Most dimms are one of these sizes: 1, 2, 4, 8, or 16 Gbs, although other sizes do exist. RAM dimms connect into the computer’s motherboard. Motherboards vary in the number of dimm slots they have, from 1 to as many as 6.

RAM is also volatile. That means that when RAM loses power, it loses all the data it was storing. That’s why when you have a program open, and turn the computer off, when you turn it back on, its not open anymore. RAM is also much more expensive and has much less space than a HDD.

In addition to RAM, your computer also has something called “virtual memory”. Virtual memory is a way of extending the amount of RAM you have by telling your computer a part of your HDD is RAM. Now, this lets you have more RAM, using what’s called a paging file, by swapping data in RAM with data in the paging file when RAM is being used to capacity, but, because the HDD is considerably slower than RAM, this will have a noticeable impact on the response time of the program you are using.

Overall, RAM’s purpose is to store data that is being used currently in a faster space than your long term storage medium. Without it, working with data would be an incredibly slow process. Well, technically, without any RAM, your computer would detect no RAM, and refuse to turn on. So, it is also important in that regard.

Inside a Computer: The Kernel

The kernel is a critical program for any computer to operate. It makes up the core framework of a computer’s operating system (OS). The kernel has unlimited access to everything in the computer, which it needs to manage the computer effectively. After the bootloader, it is the first program to to run when you turn your computer on. After loading, the kernel handles the loading of the rest of the OS, as well as many other key aspects of your computer’s operation.

The kernel handles input/output (I/O) requests between hardware and software. Hardware, like your computer’s hard drive, and software, like Microsoft Word, cannot communicate directly with one another. So, when you type a document in Word and want to save it, something has to tell the hard drive that Word would like to save something to it. That is what the kernel’s job is. The kernel acts as a bridge between computer software and computer hardware.

The kernel handles requests made to the central processing unit (CPU). All of your programs need to be processed in order to do what you need them to do. The kernel decides which programs get to be processed and when, so that processing can be a smooth transition from one program to the next.

The kernel also manages random access memory (RAM). Your computer has a limited amount of RAM, and all your programs need some RAM when they are open and running. The kernel decides which programs get which sections of RAM, and also handles problems if your computer runs out of available RAM.

The kernel also handles everything that is connected to your computer, like your keyboard, mouse, flash drives, speakers, etc. The kernel makes sure all these devices have the resources they need to function, and allow them to communicate with the various programs on your computer.

Everything the kernel does, it does in a protected part of the computer, called kernel space. You, as the user, do everything you can do in a part called user space. These two spaces never interact directly, which prevents users from making mistakes which could damage the kernel. This is also why a program can crash without the entire computer crashing.

The kernel is the core of any computer system. It is the bridge between the physical world of hardware and the virtual world of software. It handles every request to a computer, from typing to saving to listening to music. The kernel is the core.