Popular understanding of what is the boot program when the computer installs the system

        The computers we use now have an operating system that helps with task scheduling and allows the computer to execute the instructions we give you in an orderly manner. However, when the operating system has not been installed, the RAM of the computer is still blank. Have you ever wondered how it completes the task of installing the operating system for itself? Read on and you'll know the answer in no time.

        What do boots have to do with computers? Well, there's an old saying about "pull yourself up by your own boots". It's a joke that literally refers to the straps that are sewn into many boots to help you pull the boots over your feet. The joke is that if you wear a pair of these boots and want to get up off the ground, instead of climbing a ladder or a rope, you just have to pull hard on the boot to get yourself off the ground. Of course, this is only used in the comics, but the phrase means doing something without an obvious way, or doing something without the usual tools, or without help accomplish something alone.

        In computing, there is a problem akin to needing to get off the ground without the tools available to do it. When a computer is running, memory is filled with programs that are doing some task, and when a computer operator enters a command to start another program, the operating system locates that program on disk, loads it into memory, and jumps to to the first instruction of the program. Now the program is running.

        But how do you get the operating system into memory when you first turn on your computer? It requires a program running in memory to tell the disk drive to send some instruction code, the program needs to write the code into memory at the appropriate location, and then jump to its first instruction to make the new program run. But when you turn on your computer, every byte in memory is zero. There are no instructions in memory at all. This is the impossible case where you need a program in memory to get a program in memory, but there's nothing there. So in order for a computer to start working in the first place, the computer has to do something impossible. It must pull itself up by its own strength!

        Long ago, in the early days of computing, there were switches and buttons on the front of the machine, and the operator could put bytes of data directly into registers, and from there into RAM. You can manually enter a short program this way and start running it. This program, called a "bootloader," will be the smallest program you can write that will instruct the computer to read bytes from a peripheral, store them in RAM, and then jump to the first instruction. When the bootloader executes, it loads a much larger program into memory, such as the start of the operating system, before the computer becomes usable.

        These days, it's much easier to load the first program into a computer, in fact, it executes automatically as soon as the computer starts up. But the process still happens, the first step is called "launch" and it just means that the first program is loaded into memory and starts executing.

        The most common solution to this problem has three parts. First, the IAR is designed so that when the power is first turned on, its last bit will be zero and its remaining bits will be one, rather than all bits being zero. So for our little computer, the first instruction to be fetched will be at address 1111110. Second, similar to the last 32 bytes of RAM (235-256) will be ROM, hardwired with a simple program that accesses the disk drive, selects head 0, track 0, sector 0, sets the sector Read into RAM, then jump to its first byte. The third part, preferably a program on the first sector of the disk. By the way, this sector is called "Boot Record"

        The word "boot" has become a verb in computer conversation. This means loading a program into RAM without a program. Sometimes people use it to mean loading any program into RAM, but its original meaning only applies to loading the first program into empty RAM.

Guess you like

Origin blog.csdn.net/u010420283/article/details/128028220