Hands-on to Operating Systems

Sunanda Karunajeewa
3 min readNov 18, 2021

Operating System

Operating system (OS) is the program that, after being initially loaded into the computer by a boot program, manages all of the other application programs in a computer. The application programs make use of the operating system by making requests for services through a defined application program interface (API). In addition, users can interact directly with the operating system through a user interface, such as a command-line interface (CLI) or a graphical UI (GUI).

Boot Process

The boot process is a series of internal processes a computer system goes through before it’s ready to use. The boot process is controlled by the computer’s BIOS (basic input-output system)which usually starts in reading Only Memory ROM. The bootstrap loader from ROM then loads the operating system.

Boot Loader

A bootloader, also known as a boot program or bootstrap loader, is special operating system software that loads into the working memory of a computer after start-up. For this purpose, immediately after a device starts, a bootloader is generally launched by a bootable medium like a hard drive, a CD/DVD, or a USB stick. The boot medium receives information from the computer’s firmware (e.g. BIOS) about where the bootloader is. The whole process is also described as “booting”.

When you press the start button on a computer, the very first thing you see on the screen is information about the hardware installed. The software responsible for this notification is the device firmware mentioned above, which is usually implemented by manufacturers in flash memory on the computer’s motherboard. With most desktop PCs and notebooks, this will be the BIOS (Basic Input/Output System) or the more modern UEFI (Unified Extensible Firmware Interface). Both applications collect the most diverse hardware data and create a complete list of all of the device’s available drives.

When this process is complete, the firmware goes through the data carriers found in sequence, checking for a bootloader by means of a special signature the so-called boot signature (or ‘boot record’). The search always starts on the removable media (CD/DVD, USB stick, external hard drive, etc.), followed by the hard-coded drives. With the latter, the bootloader and its signature are generally in the master boot record (MBR), which also contains the data carrier’s partition tables. When a bootloader is found, it is loaded and the system start is initiated. If the search is unsuccessful, the firmware will return an error message.

Josh

JOSH is an interrupt-driven real-mode operating system. This initial idea and implementation were done by Dr. Mohan Raj Dhanagopal. His tutorial was very helpful to understand its process.

The boot loader used here(‘ultimate boot loader’) is created by Mattew Vea.

Create Simple Operating System

This OS gives the user the information of the hardware. I have created the kernel.asm using the basic functions and operations using the JOSH OS tutorial. And I have changed relevant assembly codes to display hardware information. I have used the same bootload which I have in reference material, to change to boot the operating system. After any changes did just need to compile this program then it will rearrange and be ready for execution. The boot.asm contains bios program and source kernel.asm is the main starting program after boot.asm finishes kernel.asm will run.

You can see my source code for the operating system from here.

--

--

Sunanda Karunajeewa

Software Engineering Undergraduate at University of Kelaniya