How exactly do operating system and kernals update themselves?

94 views Asked by At

I was wondering what exactly happens when a device gets an update (e.g. iPhone? Does the current OS go into ram or something? Does the device firmware handle it?

1

There are 1 answers

1
Randy Leberknight On BEST ANSWER

It has been pointed out that the process is very system dependent. However, there are some generic steps that will be followed by most systems updating an OS or the firmware.

  1. Some communication channel must exist with a trusted outside entity.
  2. The existing OS or firmware is already stored somewhere, e.g. on disk or in Flash Storage.
  3. An update command comes from the outside entity, along with the new data (e.g. a new version of the firmware).
  4. The data is validated for authenticity and integrity (is it really from home, and was it damaged en-route).
  5. The new data is stored in an alternate location on the disk or in the flash.
  6. A pointer in some non-volatile place is changed so that the system will use the OS or firmware from the new location.
  7. The system resets itself.
  8. When the system boots, it sees the pointer pointing to the new version and uses that.