Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to get a better understanding of how BIOS and operating systems work. From what I understand, BIOS is a basic piece of software that is the first thing to be run when a computer turns on and loads the operating system. I also understand that the BIOS is written by the company that makes the computer. For example, Dell writes the BIOS for Dell computers. Please correct me if any of this is wrong.

I have been told that computers that get Windows 8 OS installed can no longer access the BIOS when the computer turns on. How does this work? It seems that the only way this would work is if the BIOS was dependent on the OS, but that doesn't really make sense.

share|improve this question

migrated from stackoverflow.com Jan 10 at 6:35

This question came from our site for professional and enthusiast programmers.

    
I believe this is a better question for Super User –  svenoaks Jan 10 at 4:03
    
@svenoaks I wasn't aware of Super User until now. I agree, is there an easy way to migrate it over? –  jlars62 Jan 10 at 4:05
1  
I don't think this is a Super User question. It's a lack of understanding of the bootstrap process, processor modes, etc. –  John Saunders Jan 10 at 4:14

1 Answer 1

up vote 5 down vote accepted

When an x86 computer is first turned on, it is operating in what is known as "real mode". The hardware starts running the BIOS, which loads the operating system, and transfers control to it.

Shortly after this, the operating system turns on what is known as "protected mode". In protected mode, there are basically two kinds of code: kernel code (like the operating system and drivers), and user code (like everything else).

In order to use the features of the BIOS, it is necessary to operate in kernel mode. Once Windows starts, only Windows is able to run in kernel mode (Windows, and anything else that Windows decides can also run in kernel mode).

Normal (user mode) code cannot call on the BIOS once the operating system has started. Only the operating system and drivers and other such kernel mode software can access the BIOS.

share|improve this answer
    
Thank you that makes a lot of sense. A follow-up question I have then is how does an OS know how to talk to the BIOS to use its features? Is there some type of standard protocol/API to do this? –  jlars62 Jan 10 at 4:23
    
The OS uses very few of the features of the BIOS these days. And there are even fewer features. A BIOS is very primitive. It has calls like "read disk block" and "write disk block". And, yes, there is a standard API for that. –  John Saunders Jan 10 at 4:24
    
See "BIOS interrupt call" for the ancient history. –  John Saunders Jan 10 at 4:25
    
Cool thank you very much! –  jlars62 Jan 10 at 4:31
    
I'm not sure that I'd use the word "cool", unless you mean "cold and dead" ;-) That's not what Windows uses to talk to disks, for instance. –  John Saunders Jan 10 at 4:34

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.