user1098708
user1098708

Reputation: 63

Operating system loading

When a computer system is switched on, where is the operating system loaded? Is it RAM or ROM?

Well I read that RAM is volatile memory (main memory) And ROM having some read only instruction that got loaded/executed when we switch on the computer.

Upvotes: 2

Views: 9536

Answers (4)

user7156050
user7156050

Reputation:

In the beginning when you switch on your computer, your bios executes some code. That code is usually saved in an EEPROM. This is an Electrically Erasable Programmable Read-Only Memory. So it is a ROM, but it can be erased and reflashed. The bios will load the boot code of your operating system from another device (usually hard disk) into RAM and execute that. From there on usually no ROM is involved.

Upvotes: 0

School student
School student

Reputation: 9

When a computer is switched on the ROM loads the BIOS system and the operating system is loaded and put into the RAM, because ROM is no volatile and the operating system needs to be on the computer every time its switched on, ROM is the ideal place for the operating system to be kept until the computer system is switched on. As I mentioned the non volatility of the RAM wouldn't be a good place to keep the operation system but, the RAM runs and stores currently used applications and software so the operating system has to be put into the RAM as the computer system is loaded. :)

Upvotes: 0

Griwes
Griwes

Reputation: 9029

When a computer is switched on, operating system is not loaded; what is loaded is firmware, be it BIOS for x86 or (U)EFI for modern boards; the firmware is loaded from some kind of ROM on motherboard (assuming PC class computer). Then, firmware decides which devices (or partitions, in case of (U)EFI) are bootable, then load them at physical 0x7c00 (in case of BIOS) or at any other place the bootloader wishes to (in case of (U)EFI; I haven't written anything for (U)EFI so far, so I don't really know how does it work). Later on, bootloader does whatever it wishes to.

So: at start-up, firmware is loaded from ROM; it then decides what to do and what to load and from to load, so your question is way too general to give you precise answer.

Upvotes: 2

yankee
yankee

Reputation: 40820

Unless you are starting a live System from a CD-ROM or any other special device that is read only, no ROM is involved.

Well... At least sort of not involved. In the beginning when you switch on your computer, your bios executes some code. That code is usually saved in an EEPROM. This is an Electrically Erasable Programmable Read-Only Memory. So it is a ROM, but it can be erased and reflashed (which happens on a bios update).

The bios will load the boot code of your operating system from another device (usually hard disk) into RAM and execute that. From there on usually no ROM is involved.

Upvotes: 2

Related Questions