The first program that is executed when the computer is switched on is called

When you turn on the power to a computer, the first program that runs is usually a set of instructions kept in the computer's firmware called the boot ROM. For a typical PC, this can be the basic input output system (BIOS), or on newer machines, the unified extensible firmware interface (UEFI). This code examines the system hardware to make sure everything is functioning properly and in the case of UEFI, that the boot software is legitimate and secure. Once the test has successfully completed, the firmware continues the boot process.

The bootstrap loader, or boot loader, is a small program that has a single function: It loads the operating system into memory and allows it to begin operation. In the most basic form, the bootstrap loader sets up the small driver programs that interface with and control the various hardware subsystems of the computer. It sets up the divisions of memory that hold the operating system, user information and applications. It establishes the data structures that hold the myriad signals, flags and semaphores that are used to communicate within and between the subsystems and applications of the computer. Then it turns control of the computer over to the operating system.

Advertisement

The operating system's tasks, in the most general sense, fall into several categories:

  • Processor management
  • Memory management
  • Device management
  • Storage management
  • Application interface
  • User interface
  • System security management

These tasks define the core of nearly all operating systems. Next, let's look at the tools the operating system uses to perform each of these functions.

When the user starts a program, the operating system (OS) first transfers the bits of the program's software from its permanent location (hard drive, CD-ROM, etc.) to the main memory of the computer. The CPU cannot execute the program directly from the hard drive because the drive is much to slow to keep up with the CPU. Main memory is fast enough (with the addition of a cache) to keep up with the CPU. Thus, the OS first finds the desired program on the hard drive, loads the bits of the program into the main memory, and then starts feeding the CPU the bits out of main memory.

This loading process works fine for application programs, but how does the OS itself get loaded? When the computer is first turned on, the main memory does not contain any valid bits. The operating system itself must be loaded from the hard drive to the main memory. This seems like a catch-22! The solution is a progressive sequence of larger and larger booting programs that load the OS.

Startup Program

A very tiny startup program is stored in a special area of computer memory that retains its value even when the computer is turned off. This memory is often called "flash" or "BIOS" memory. The computer hardware is designed to automatically begin running the software instructions from this memory (and NOT from main memory, which will contain nonsense at this point). The tiny program contains just enough instructions to initialize the computer's hardware, display something on the monitor, and load a small number of bits from a specific location on the hard drive (the boot sector). While this tiny program is loading the boot sector bits into main memory, it displays a few informational messages on the computer monitor (or possibly via some other means of communication if the computer does not have a monitor).

The tiny startup program is specifically designed for the computer hardware it runs on. It is operating system neutral, in that it can start up any operating system that is compatible with the computer's hardware.

The Boot Program

The bits from the boot sector of the hard drive form a larger program that contains enough instructions to load the rest of the operating system. Once the tiny startup program discussed above has loaded in the boot sector, it immediately transfers the CPU to this new program. The boot program is usually operating system specific, in that it starts a specific operating system, although some operating systems provide a boot program, called a "boot loader" that allows the user to select from a number of operating systems available on the computer's hard drive. An example of a boot loader is the LILO program available in the Linux operating system.

Sometimes the boot program also displays a logo on the computer monitor to indicate the operating system is loading. Here are some examples of the operating system banner image displayed while the boot program loads the rest of the operating system from the hard drive.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education

What is process called when computer is switched on?

In computing, booting is the process of starting a computer as initiated via hardware such as a button or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so some process must load software into memory before it can be executed.

Which program is executed first during the boot process?

When you first turn on your computer, the BIOS first performs some integrity checks of the HDD or SSD. Then, the BIOS searches for, loads, and executes the boot loader program, which can be found in the Master Boot Record (MBR). The MBR is sometimes on a USB stick or CD-ROM such as with a live installation of Linux.