What Happens When Operating Systems?

What Happens When Operating Systems?

Have you ever wondered what happens when you turn on your computer and an operating system (OS) boots up? Do you know what’s happening behind the scenes? In this article, we’ll take a journey into the world of operating systems and explore what happens when they start up.

The Boot Process

When you turn on your computer, the power-on self-test (POST) begins, which checks the hardware components for any issues. Once the POST is complete, the BIOS (Basic Input/Output System) takes control and starts searching for a bootable device. This is typically a hard drive, solid-state drive, or USB drive.

The BIOS identifies the bootable device and loads the master boot record (MBR) into memory. The MBR contains the boot loader, which is responsible for loading the operating system into memory.

Loading the Boot Loader

The boot loader is a small program that resides on the bootable device. Its job is to load the operating system into memory. The boot loader searches for the operating system files on the device and loads them into memory.

Loading the Operating System

Once the boot loader has loaded the operating system files, it loads them into memory using a process called paging. Paging is a technique that loads a small piece of memory, called a page, from the hard drive or solid-state drive into main memory. This process is repeated for each page until the operating system is fully loaded.

Initializing System Resources

Once the operating system is loaded, it needs to initialize various system resources such as:

  • Memory Management Unit (MMU): manages the allocation and deallocation of memory pages.
  • Interrupt Handling: sets up interrupt handlers to handle hardware interrupts.
  • I/O Operations: sets up interfaces for input/output operations.

Starting System Services

After initializing system resources, the operating system starts various system services such as:

  • File System: sets up the file system and mounts disk volumes.
  • Network: sets up network interfaces and configures network settings.
  • Graphics: initializes the graphics card and sets up the display.

User-space Initialization

Finally, the operating system initializes user-space, which includes:

  • Login Manager: sets up the login screen and handles user authentication.
  • Desktop Environment: sets up the graphical user interface (GUI).
  • System Services: sets up various system services, such as printers and network shares.

Conclusion

In this article, we explored the process of what happens when an operating system boots up. From the BIOS to the operating system, we’ve seen how the various components work together to load the operating system into memory. We’ve also seen how the operating system initializes system resources and starts various system services.

Next time you turn on your computer, remember the behind-the-scenes action that’s happening to get your operating system up and running!