3

If I was to restart my computer without cutting power by performing a soft reboot, but then going into bios and booting into another OS on the startup screen, like going from windows to a linux live cd, would some data persisting in memory just remain there until the space is needed by the new OS or would it begin disappearing right away?

1
  • Assuming this isn't in a VM, then yes, it is possible some data may remain in the RAM. You should fully cut the power if you want to guarantee everything being cleared. It won't clear when new space is needed by the new OS. Commented Sep 18, 2021 at 8:20

1 Answer 1

3

In older computers, during the POST phase, the BIOS traditionally performed a "memory test" which entailed writing to and rereading the whole of the physical RAM. However, this process can take much time, and RAM is much larger today, and also the process is rather bad at detecting bad memory, so it is disabled by default on many modern computers.

Memory is then not cleared on soft reboot. How much data is left depends on the RAM technology, the power down time before the new boot, and the temperature.

This fact is not a security concern, since most modern operating systems protect against RAM leftovers by zeroing out allocated RAM pages before handing them to applications.

Thus, while physical RAM contents might contain interesting remnants of past data, this is accessible only to kernel code using special API calls, while user-mode code only sees zeroes.

2
  • So does this mean that when these types of modern operating systems are started, they see all memory as empty and free to use even if certain bits are still physically leftover there? kind of like how a file can still physically remain on a disk until overwritten, but the OS cant interact with it because it has no ponter to it? Commented Sep 19, 2021 at 19:20
  • The memory is seen as a series of bytes/pages, all addressable. The OS allocates and uses it as it needs. At the beginning, all memory is free and available for allocation.
    – harrymc
    Commented Sep 19, 2021 at 19:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .