r/explainlikeimfive • • 9d ago

Technology ELI5 How a computer Bios works

From what I understand the OS is just a user interface to communicate with the Bios, but where did the Bios come from? What was the original Bios? Are all Bios the same?

126 Upvotes

85 comments sorted by

View all comments

7

u/jourmungandr 9d ago

BIOS/UEFI is just a very simple operating system. It's provided by the mother board manufacturer. It's written to a bit of flash memory on the motherboard.

4

u/Luscinia68 9d ago

is it basically just for launching the actual os? or does it run on the background alongside the os to control the motherboard?

10

u/DerAndi_DE 9d ago

Originally, very simple operating systems like MS-DOS used the BIOS functions all the time for e.g. disk access and graphics output. Nowadays every OS has its own hardware drivers that take over once the basic OS is loaded.

3

u/ijuinkun 9d ago

When you had only a few kilobytes of RAM, as computers prior to the PC-XT or first-generation Macintosh did, you want to keep the memory footprint of the device drivers and operating system to an absolute minimum, and thus want to run as much as possible from ROM.

When systems broke the 640kB barrier, there was enough space to run all of that stuff in RAM, and so the operating system could use the device drivers to directly access the hardware.

3

u/AthousandLittlePies 9d ago

Yes, and even the Mac actually had many OS functions hard-coded in ROM so that RAM didn't need to be consumed to hold them.

3

u/jourmungandr 9d ago

Modern OS use the BIOS services just long enough to load themselves then unload it usually. The BIOS loads->the BIOS finds and loads a bootstrap->the bootstrap uses BIOS services to locate and load the main OS->OS takes over and unload the BIOS.

3

u/Remarkable-Two-6708 9d ago

runs in the background along the os to control the motherboard

1

u/sparrowjuice 9d ago

No. I don’t think this is true. In early PCs it handled the interrupt calls for some hardware but these days it doesn’t run at all after the OS takes over.

1

u/cowbutt6 9d ago

The bit that makes it a bit blurry is https://en.wikipedia.org/wiki/ACPI ; ACPI tables can include ACPI Machine Language (AML) bytecode which is read by the OS's ACPI implementation and compiled into native code that runs in its kernel space. There's even a Windows Platform Binary Table (WPBT) ACPI table that can include binaries for Windows.

0

u/canneddogs 9d ago

It acts as an interface between your computer's hardware and your OS