Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The BIOS software is built into the PC, and is the first code run by a PC when powered on ('boot firmware'). When the PC starts up, the first job for the BIOS is the power-on self-test, which initializes and identifies system devices such as the CPU, RAM, video display card, keyboard and mouse, hard disk drive, optical disc drive and other hardware. The BIOS then locates boot loader software held on a peripheral device (designated as a 'boot device'), such as a hard disk or a CD/DVD, and loads and executes that software, giving it control of the PC.[2] This process is known as booting, or booting up, which is short for bootstrapping.

Which requisites determine that a computer system must have a BIOS installed on it?

Why can't the Operational System actually do all of the BIOS work?

share|improve this question
34  
Why does a car engine need a starter? Shouldn't the engine be powerful enough to start itself? – Oliver Salzburg Feb 29 '12 at 13:42
4  
@OliverSalzburg this will be possible in the near future, gas engines without starters. With direct injection and computers its a snap. – Moab Feb 29 '12 at 16:44
2  
They already have self-starting engines, but they're mostly 12+ cylinder or rotary engines. Most engines can't self-start simply because they can't produce enough power in a single powerstroke to overcome its moment of inertia. Direct injection and better timing might help a little, but really you need lighter engines to increase the ratio between the energy generated in a powerstroke to moment of intertia created by the flywheel, crankshaft, gears, etc. – Lèse majesté Feb 29 '12 at 22:43
5  
Actually, a BIOS in the PC sense is NOT necessary. IBM System/360 and /370 computers (and maybe more recent versions) started up with a single hard-wired instruction that read a single record from a device selected by dials on the console. That record contained a bootstrap program (it had to fit in 80 bytes - one punched card) that loaded a more complex bootstrap program, which loaded the OS from disk. I guess the 'BIOS' was that single instruction hardwired to execute when you pressed the right button (called IPL or initial program load). – Ex Umbris Mar 1 '12 at 7:25
1  
You are confusing "computer" and "PC" in your question. That's why the answers are confusing and sometimes contradictory. – rds Mar 1 '12 at 11:16
show 2 more comments

8 Answers

up vote 37 down vote accepted

A BIOS is a hardware dependent piece of code stored on the motherboard itself. Every different motherboard needs a custom BIOS written for it, so it would be impossible to have a generic BIOS/OS all-in-one (although the BIOS is technically just stored code, so you could theoretically write an OS for one particular motherboard). As you mentioned, the purpose of the BIOS is to do the following:

When the PC starts up, the first job for the BIOS is the power-on self-test, which initializes and identifies system devices such as the CPU, RAM, video display card, keyboard and mouse, hard disk drive, optical disc drive and other hardware.

Note that you can still start a computer without any external storage - which is why the BIOS is a requirement for a computer. In other terms, the BIOS provides a common software interface to allow a stored computer program to communicate with various hardware devices connected to the motherboard.

For example, if I have two different motherboards with two different SATA controllers, the BIOS allows me to write a piece of code that can work with both, without my knowledge of how the motherboard actually sends commands to the SATA device. I just have to tell the computer "read sector X from this SATA device", and the BIOS is responsible for actually sending those commands to the hardware.

Where it actually gets the "read sector X" information from is a stored program contained within the BIOS, which usually directs the computer to start reading from a bootloader stored in a common location. These common locations are agreed upon by various software and hardware developers, and usually provided to the public to allow for more compatibility between systems.

Once a basic level of interfacing (again, logical interfacing through software) is established, the operating system itself builds a common interface with your various hardware devices (usually by using "device drivers"), and the operating system can then control the hardware.


Finally, it should be noted that the BIOS is also used to make modifications to the computer hardware configurations, and store them in the on-board EEPROM (so your computer remembers the changes next time you start it up). However, as I previously stated, once the operating system is loaded, it has full control of the computer.

This allows for motherboard manufacturers to develop software allowing you to make these changes from within your operating system, as opposed to having to reboot into the BIOS. Again, this is very hardware and software dependent, but goes to show that all computer interfacing is relative. The BIOS is exactly what it's name implies - a basic input/output system, to allow a common software interface for a more advanced program ("operating system") to take control of the machine.

share|improve this answer
Just another doubt... The BIOS keeps active while OS is running?? Or it is turned off afeter BIOS pass the "token to OS on OSLoader boot phase? – Diogo Feb 29 '12 at 13:39
2  
When you start the computer, the BIOS is running as machine code on the processor. You can think of it like that but it's not really "turned off" in a sense - it simply switches to run the OS. When you start the computer, the BIOS tells the computer to start executing the machine code stored at location X. Put in more common terms, the BIOS just initializes your hardware, and directs the computer where to continue running code from. – Breakthrough Feb 29 '12 at 13:47
12  
BIOS/OS all-in-one is NOT impossible. I don't know why everyone here keeps saying this. Having each part on separate devices/storage doesn't mean they're not part of the same logical entity. Computers before the IBM PC had all-in-one, that is, BIOS was manufactured and developed by the same one that developed the OS kernel. In fact OS updates sometimes included BIOS updates. – m0skit0 Feb 29 '12 at 15:01
The BIOS keeps active. It's in ROM, so you can't remove it anyway. Usually the BIOS functions are no longer used by the OS after boot, since they are too basic and slow compared to what a similar function in a modern OS can do. – Oliver Feb 29 '12 at 15:54
1  
@Oliver Actually, with ACPI, BIOS functions are routinely used after OS boot. – derobert Feb 29 '12 at 19:05
show 8 more comments

Your operating system is on your hard disk, if you turn on your computer it won't magically start reading from that hard disk. It is the BIOS that loads the boot loader from the hard disk, as well as do some testing and allowing you to configure certain settings of the BIOS.

Your OS can't do that because it is on the hard disk and not in your ROM.

Hence, you need a BIOS or a similar (but different) technology like EFI...

It is possible to put part of the OS on the ROM (responsible for loading the boot loader of the OS) by the manufacturer; however, this is not widely applicable and there is a BIOS or EFI available anyway.

share|improve this answer
1  
You're mixing two different concepts. BIOS is independent from OS, that is, BIOS could be part of the OS. For example if it's made by the same manufacturer and only works with that OS, like gaming console's bootstrappers. – m0skit0 Feb 29 '12 at 13:29
3  
"BIOS is independent from OS, that is, BIOS could be part of the OS." Huh? Contradiction is very contradictory, lol. – Breakthrough Feb 29 '12 at 14:01
2  
Gaming consoles are computers, so are Atari, Amiga and old Macs, so it's definitely relevant. @Breakthrough: that's not contradictory. It means BIOS has nothing to do with OS, and thus, can be a part (or not) of it. – m0skit0 Feb 29 '12 at 14:50
@TomWijsman You're the only one trolling here. Gaming consoles are a subset of computers. If it's possible for some consoles to do it, then it's possible for some computers. Also, don't use bold just like that. It's inappropriate. – luiscubal Feb 29 '12 at 18:37
1  
@TomWijsman he has a point, if game consoles can do it, then so can computers. Also, so long as it's not a question or answer, I don't see a problem with it being off topic. Comments are comments, after all; nothing more, nothing less. (No comment about the bold issue - to each his own on that, although that deals more with terminology.) – Breakthrough Feb 29 '12 at 23:35
show 5 more comments

Something is required to start the Operating System. If the OS could fit in some non-volatile memory then it could be started directly, but with fully featured OSes such as Windows, OSX or Linux this isn't possible.

What's needed is a small lightweight "OS" that can be loaded on powerup that does the basic things like memory and disk access and then that loads the Operating System. While this could be part of the OS itself and not a separate entity there are other reasons why you might want another process to start first:

  1. Updates - if the OS was fixed like this then it would become difficult to update it if any security patches were needed. It can be done - firmware updates happen all the time to devices to such as routers etc. but these have relatively simple operating systems installed.
  2. Flexibility - a computer is a general purpose machine and the same hardware can run several different operating systems. Having a BIOS which then loads the OS from disk means you can choose which one to run - you can even go as far has having several installed side by side.

The process is known as bootstrapping.

share|improve this answer
So the answear is because we have a lot of different OSs? I mean, if we have just one OS model for a specific hardware then we would eliminate the need of a BIOS? – Diogo Feb 29 '12 at 13:12
1  
I don't see why it is not possible that Microsoft makes a BIOS... – m0skit0 Feb 29 '12 at 13:14
1  
You don't need the whole OS to fit into non-volatile memory (which it can btw, you just need enough ROM :P). You only need the bootstrapper to be there. – m0skit0 Feb 29 '12 at 13:15
1  
@m0skit0 Microsoft can't make a BIOS since it would have to make a different BIOS for every single motherboard it wants it's software to run on. :) – Breakthrough Feb 29 '12 at 13:53
1  
@ZanLynx: CoreBoot is a BIOS :P – m0skit0 Mar 1 '12 at 11:20
show 7 more comments

No real logical reason. It's more a matter of legacy and history.

  1. There's no requisite that a computer must have a BIOS installed. It's legacy from IBM PC. Although this proved to be a good idea

  2. Having the Operating System doing that wouldn't really change anything because it would still do something like the BIOS does. Of course the OS would need to be in a ROM, not on a I/O device. The problem might arise for monopoly issues when a OS builder decides to make his OS BIOS incompatible with other OSs. Having BIOS manufacturers separate from OSs improves freedom over what software might run.

share|improve this answer
1  
Why it can't function as a BIOS? Give an explanation on why. You only have to put bootstrapper on a ROM and you're done. I do not mean to have it entirely in ROM, and even so it would work if the ROM is big enough (of course to run it you would need to load parts in RAM, but this is done by current BIOS as well). – m0skit0 Feb 29 '12 at 13:23
3  
He said "computer", not PCs. And yes it is applicable. In fact it was this way before the IBM PC (Atari, Amiga... the BIOS is part of the OS). – m0skit0 Feb 29 '12 at 13:31
2  
Silly me, I used to write software for embedded computers that had no BIOS or OS, just application code. Or are we not talking about all computers, just the ones most people think about? – jwernerny Feb 29 '12 at 17:51
2  
Not applicable on the large scale? Check out how many Ataris, Amigas and Macs were there before the PC. – m0skit0 Feb 29 '12 at 22:08
2  
The iPhone is a computer and I don't believe it has a BIOS. Even before the digital age... a computer is a programmable machine that performs operations and outputs the same result for a given input, right? A Jacquard loom is a computer, and it certainly doesn't have a BIOS (it even doesn't have an OS). – rds Mar 1 '12 at 11:32
show 6 more comments

In a sense, you're right. BIOS and OS partly do the same things. The separation in BIOS and OS is solely for flexibility.

The BIOS is usually created by a hardware manufacturer. The hardware has to ensure, that a basic functionality is present, for example that a disk drive can be read from and that a basic display for diagnostics and errors is shown. Thus the name "Basic Input Output System".

This can be done, to some extent, without further knowledge of the actual components really present on the specific system, since they all have to support a certain small BIOS standard. This enables vendors to custom-build a complete system. The BIOS just has to do enough to start the OS. There are some conventions to where this start-points are, so it just tries one after the other. This also enables the use of different operating systems on the same hardware. (there is flexibility, again)

Once the operation system (or at least it's bootloader) ist found and started by the BIOS, the BIOS itself becomes largely obsolete. Modern OS use very little to nothing of the BIOS functionalitly after loading.

If you wanted to make the OS do all the work you'd have to put the OS in a place where it can be accessed by the hardware without the preliminary help of a software (ROM). This may be possible for some closed systems, where flexibility is no concern. If you think about building hardware support into some other hardware, you're basically building a kind of BIOS again...

Another concern is memory size and cost. Full featured OSs are large and trying to get a multi-gigabyte OS into ROM is expensive, besides the follow-up problems of patching and updating it.

So no, there is no technical reason, but many practical ones, especially for the flexible PC platform.

share|improve this answer

In order to run a program on a modern PC, you must already have a program running to begin with that knows how to operate the hardware and load programs into memory. This chicken-and-egg problem is solved by implanting a basic program into the hardware itself.

This basic input/output system (BIOS) is very small and very limited in scope, but provides enough of a foundation that second-stage boot loaders, like GRUB or NTLDR, can be loaded and run. These second-stage loaders are more sophisticated than the BIOS program which enables them to provide a more robust foundation for the operating system proper to load and assume control.

share|improve this answer
Good non-technical explanation. – Mechanical snail Sep 12 '12 at 5:50

It is true what somebody wrote nonsense here, whether there was a need for BIOS! If it were not unable to load any OS, and if he could replace the computer it would become dependent on operating system and would not have the right to choose their OS, but you would be able to use only and only one that is loaded inside. Not to mention that this is the best-quality code that is placed in a computer as if it is not good consequences can be fatal to your computer itself. Still an OS can reinstall whom you want while in BIOS-but is not recommended for serious blunder if it will screw up your computer because it is responsible for all components at a lower level.

share|improve this answer

It does not need it! The boot loader is needed, but this is not the bios. Most of the configurator is not needed except may be to set the clock.

The PC Bios is mostly ignored in Linux, as it is so out of date, the OS does all the device driving; The PC Bios was designed for 16bit dos.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.