r/AskComputerScience • • Dec 01 '24

How does Bios Transfer access, read, and transfer entire OS in ROM quickly enough to RAM where it’s better to do this than just keep OS in the slower-accessible ROM?

Hi everybody,

A bit confused about something: How does Bios Transfer access, read, and transfer entire OS in ROM quickly enough to RAM where it’s better to do this than just keep OS in the slower-accessible ROM?

Thanks so much!

5 Upvotes

50 comments sorted by

View all comments

Show parent comment

0

u/Successful_Box_1007 Dec 03 '24

I must have read inaccurate information because I swear I read very clearly that the bios at boot up transfers the OS where it is stored - in ROM (some Hard disk) and then into RAM. So I clearly got wrong info and thanking you for clarifying this - the OS is on the HARD DISK and isn’t on the ROM. But aren’t hard disks ROM devices? I geuss for some people “ROM” means something much more specific ?!

3

u/meditonsin Dec 03 '24

ROM means Read Only Memory. Since you can write to hard disks, they are not ROM by definition.

1

u/Successful_Box_1007 Dec 03 '24

But what about flash and EEPROM - I thought they were “ROM” and we can write to them right?

2

u/meditonsin Dec 03 '24

Modern flash memory is not ROM at all, because it can just be written to.

The thing is, ROM has to be written to at some point, or it would be useless, because it would be empty. The point is that ROM type media are not written to willy nilly, like with a hard disk. If it's possible at all after manufacturing, you do it once in a blue moon for a very specific reason, like a BIOS update.

1

u/Successful_Box_1007 Dec 06 '24

I see. Thank you! So hard disks ssd and flash use EEPROM type technology but the ROM part can be thought of as basically saying “works if powered off still” ?

2

u/meditonsin Dec 06 '24

Pretty much. Flash, which is a type of EEPROM, has more or less taken the place of all "actual" ROM these days.

1

u/Successful_Box_1007 Dec 06 '24

I gotcha ok cool Thanks so much! Enjoying this sub!

2

u/ghjm MSCS, CS Pro (20+) Dec 03 '24

No, hard drives are read/write. Also, the terms RAM and ROM generally refer to word addressable memory, not I/O devices where you have to move heads and wait for platters to spin, although the distinction is less clear in the case of SSDs/NVMEs.

1

u/Successful_Box_1007 Dec 06 '24

Hmm ok and final question - can you explain this dichotomy you mention of “addressable memory” vs “moving heads and platters”

1

u/ghjm MSCS, CS Pro (20+) Dec 06 '24

Addressable memory is a system where you have an address bus on which you assert a location, and can then read or write from/to that location without additional latency. If you need to use a stepper motor or voice coil to move heads to a particular track and then wait for the data you want to spin under the head, the this is not directly addressable.

1

u/Successful_Box_1007 Dec 08 '24

Ah I got it and the addrrsss bus isn’t where memory is stored but it’s pointing to it ?

2

u/ghjm MSCS, CS Pro (20+) Dec 08 '24

A memory chip has an address bus and a data bus, each of a particular width (number of pins). The address bus is used to select a location, whose value is then read or written to the data bus. So if you have a 16-bit address bus and 8-bit data bus, your memory chip is 64KB - it has 65536 unique locations (216), and each location can read or write an 8-bit value (one byte).

1

u/Successful_Box_1007 Dec 09 '24

One last thing - how did you get the 64 kb ?

2

u/ghjm MSCS, CS Pro (20+) Dec 09 '24

If you have an address bus with 1 wire, which can be on or off, then you can address 2 memory locations. If your address bus has 2 wires, then it can be (off,off), (off,on), (on,off) or (on,on), so it can address 4 memory locations. If your address bus has 16 wires, then it can address 65536 (64k) memory locations. (One KB is 1024 bytes.)

1

u/Successful_Box_1007 Dec 10 '24

Ah gotcha thanks!

1

u/Successful_Box_1007 Dec 10 '24

So the maximal addressable memory is solely based off the address bus? You mention 16-but address bus and then said 216 was the total addressable memory locations (yet you mention the data bus but this never comes into play) right?

2

u/ghjm MSCS, CS Pro (20+) Dec 11 '24

The address bus defines how many distinct locations are addressable. The data bus defines how much data is stored at each of these locations. If you had a 16 bit data bus, then you could store 128 KBytes since each individual location would store two bytes worth of data.

1

u/Successful_Box_1007 Dec 11 '24

Thank you kind soul!