Can we not simply connect a battery to a RAM to prevent data loss during power cuts?RAM device that plugs...

Any Issues with running Workbench 1.3 on a Kickstart 1.2 Amiga 500?

What do you call a document which has no content?

Paper status "Accept with Shepherd". What does it really mean?

Why exactly is the answer 50 ohms?

How is Smough's name pronounced?

My Villain scrys on the party, but I forgot about the sensor!

Is there a historical explanation as to why the USA people are so litigious compared to France?

Can Boris Johnson invoke the Civil Contingencies Act to suspend the Benn law?

Translate "Everything burns" into classical Latin

Neither Raman nor IR Active vibrational modes

Why was the wedding ring missing during the twist of The Sixth Sense

Can we not simply connect a battery to a RAM to prevent data loss during power cuts?

How to see time in ~/.bash_history file

What is the true meaning of Gibbs energy and chemical potential?

Is it now possible to undetectably cross the Arctic Ocean on ski/kayak?

How to plot two axis bar chart side by side

Can digital computers understand infinity?

Stuff the snark?

Is it possible to have 2 ports open on SSH with 2 different authentication schemes?

Usefulness of Nash embedding theorem

How can I learn to write better questions to test for conceptual understanding?

"inuendo" in a piano score

Is there a push, in the United States, to use gender-neutral language and gender pronouns (when they are given)?

Will Schnorr Multi-signatures completely replace ECDSA?



Can we not simply connect a battery to a RAM to prevent data loss during power cuts?


RAM device that plugs into microSD slot?How much power does DDR3 RAM draw when unused?Parallel NOR Flash ROM in-system programming issue (Micron M29F160)Reading RAM externally in a running system by intercepting the memory bus or replacing the RAM chips?eeprom data corruption during power failureFlash and RAM : Code ExecutionResetting Ram problem in VHDL






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








1














$begingroup$


So, I was just wondering about how volatile memory storage loses data when the power to them is cut off. But can we not solve that problem by using a battery in conjunction with a RAM and a ROM and when there's a power cut i.e. when the computer didn't receive a shutdown signal the battery kicks in and a controller transfers data from RAM to an EEPROM?



EEPROM - because I guess HDDs and SDDs consume more power. I mean if we could do this then we can maybe program it to explicitly store data in EEPROM, if not data then the OS(only a copy). That way we can also boot faster. Maybe, all of this is just dumb. There maybe very obvious reasons not to do this. But they are not clear to me. So can you tell me why is this not done?










share|improve this question











$endgroup$












  • 2




    $begingroup$
    Why bother with transferring to EEPROM if the RAM is battery backed up.
    $endgroup$
    – Andy aka
    8 hours ago










  • $begingroup$
    Absolutely no point as other peripherals will get reset and they have nothing to do with the saved RAM data when back from RESET. You have UPS to prevent sudden power downs for the whole system.
    $endgroup$
    – Eugene Sh.
    8 hours ago






  • 2




    $begingroup$
    And the eeprom idea.... Well today a typical mid-end home PC has about 8GB of DRAM. EEPROM of 8GB? MAybe you meant flash after all?
    $endgroup$
    – Eugene Sh.
    8 hours ago










  • $begingroup$
    They already do that, though not for main memory in a computer; the common term is "battery-backed SRAM". SRAM is too expensive by far to use as main memory, but battery-backed SRAM was used historically for things like BIOS settings (ever heard of "the CMOS battery"?), and it's how saving games worked on NES, SNES, Game Boy, and a few early Game Boy Advance video games.
    $endgroup$
    – Hearth
    8 hours ago






  • 1




    $begingroup$
    en.wikipedia.org/wiki/Non-volatile_random-access_memory
    $endgroup$
    – Pradyoth Shandilya
    8 hours ago


















1














$begingroup$


So, I was just wondering about how volatile memory storage loses data when the power to them is cut off. But can we not solve that problem by using a battery in conjunction with a RAM and a ROM and when there's a power cut i.e. when the computer didn't receive a shutdown signal the battery kicks in and a controller transfers data from RAM to an EEPROM?



EEPROM - because I guess HDDs and SDDs consume more power. I mean if we could do this then we can maybe program it to explicitly store data in EEPROM, if not data then the OS(only a copy). That way we can also boot faster. Maybe, all of this is just dumb. There maybe very obvious reasons not to do this. But they are not clear to me. So can you tell me why is this not done?










share|improve this question











$endgroup$












  • 2




    $begingroup$
    Why bother with transferring to EEPROM if the RAM is battery backed up.
    $endgroup$
    – Andy aka
    8 hours ago










  • $begingroup$
    Absolutely no point as other peripherals will get reset and they have nothing to do with the saved RAM data when back from RESET. You have UPS to prevent sudden power downs for the whole system.
    $endgroup$
    – Eugene Sh.
    8 hours ago






  • 2




    $begingroup$
    And the eeprom idea.... Well today a typical mid-end home PC has about 8GB of DRAM. EEPROM of 8GB? MAybe you meant flash after all?
    $endgroup$
    – Eugene Sh.
    8 hours ago










  • $begingroup$
    They already do that, though not for main memory in a computer; the common term is "battery-backed SRAM". SRAM is too expensive by far to use as main memory, but battery-backed SRAM was used historically for things like BIOS settings (ever heard of "the CMOS battery"?), and it's how saving games worked on NES, SNES, Game Boy, and a few early Game Boy Advance video games.
    $endgroup$
    – Hearth
    8 hours ago






  • 1




    $begingroup$
    en.wikipedia.org/wiki/Non-volatile_random-access_memory
    $endgroup$
    – Pradyoth Shandilya
    8 hours ago














1












1








1


2



$begingroup$


So, I was just wondering about how volatile memory storage loses data when the power to them is cut off. But can we not solve that problem by using a battery in conjunction with a RAM and a ROM and when there's a power cut i.e. when the computer didn't receive a shutdown signal the battery kicks in and a controller transfers data from RAM to an EEPROM?



EEPROM - because I guess HDDs and SDDs consume more power. I mean if we could do this then we can maybe program it to explicitly store data in EEPROM, if not data then the OS(only a copy). That way we can also boot faster. Maybe, all of this is just dumb. There maybe very obvious reasons not to do this. But they are not clear to me. So can you tell me why is this not done?










share|improve this question











$endgroup$




So, I was just wondering about how volatile memory storage loses data when the power to them is cut off. But can we not solve that problem by using a battery in conjunction with a RAM and a ROM and when there's a power cut i.e. when the computer didn't receive a shutdown signal the battery kicks in and a controller transfers data from RAM to an EEPROM?



EEPROM - because I guess HDDs and SDDs consume more power. I mean if we could do this then we can maybe program it to explicitly store data in EEPROM, if not data then the OS(only a copy). That way we can also boot faster. Maybe, all of this is just dumb. There maybe very obvious reasons not to do this. But they are not clear to me. So can you tell me why is this not done?







computers eeprom ram






share|improve this question















share|improve this question













share|improve this question




share|improve this question



share|improve this question








edited 7 hours ago







Vishal Dalwadi

















asked 9 hours ago









Vishal DalwadiVishal Dalwadi

153 bronze badges




153 bronze badges











  • 2




    $begingroup$
    Why bother with transferring to EEPROM if the RAM is battery backed up.
    $endgroup$
    – Andy aka
    8 hours ago










  • $begingroup$
    Absolutely no point as other peripherals will get reset and they have nothing to do with the saved RAM data when back from RESET. You have UPS to prevent sudden power downs for the whole system.
    $endgroup$
    – Eugene Sh.
    8 hours ago






  • 2




    $begingroup$
    And the eeprom idea.... Well today a typical mid-end home PC has about 8GB of DRAM. EEPROM of 8GB? MAybe you meant flash after all?
    $endgroup$
    – Eugene Sh.
    8 hours ago










  • $begingroup$
    They already do that, though not for main memory in a computer; the common term is "battery-backed SRAM". SRAM is too expensive by far to use as main memory, but battery-backed SRAM was used historically for things like BIOS settings (ever heard of "the CMOS battery"?), and it's how saving games worked on NES, SNES, Game Boy, and a few early Game Boy Advance video games.
    $endgroup$
    – Hearth
    8 hours ago






  • 1




    $begingroup$
    en.wikipedia.org/wiki/Non-volatile_random-access_memory
    $endgroup$
    – Pradyoth Shandilya
    8 hours ago














  • 2




    $begingroup$
    Why bother with transferring to EEPROM if the RAM is battery backed up.
    $endgroup$
    – Andy aka
    8 hours ago










  • $begingroup$
    Absolutely no point as other peripherals will get reset and they have nothing to do with the saved RAM data when back from RESET. You have UPS to prevent sudden power downs for the whole system.
    $endgroup$
    – Eugene Sh.
    8 hours ago






  • 2




    $begingroup$
    And the eeprom idea.... Well today a typical mid-end home PC has about 8GB of DRAM. EEPROM of 8GB? MAybe you meant flash after all?
    $endgroup$
    – Eugene Sh.
    8 hours ago










  • $begingroup$
    They already do that, though not for main memory in a computer; the common term is "battery-backed SRAM". SRAM is too expensive by far to use as main memory, but battery-backed SRAM was used historically for things like BIOS settings (ever heard of "the CMOS battery"?), and it's how saving games worked on NES, SNES, Game Boy, and a few early Game Boy Advance video games.
    $endgroup$
    – Hearth
    8 hours ago






  • 1




    $begingroup$
    en.wikipedia.org/wiki/Non-volatile_random-access_memory
    $endgroup$
    – Pradyoth Shandilya
    8 hours ago








2




2




$begingroup$
Why bother with transferring to EEPROM if the RAM is battery backed up.
$endgroup$
– Andy aka
8 hours ago




$begingroup$
Why bother with transferring to EEPROM if the RAM is battery backed up.
$endgroup$
– Andy aka
8 hours ago












$begingroup$
Absolutely no point as other peripherals will get reset and they have nothing to do with the saved RAM data when back from RESET. You have UPS to prevent sudden power downs for the whole system.
$endgroup$
– Eugene Sh.
8 hours ago




$begingroup$
Absolutely no point as other peripherals will get reset and they have nothing to do with the saved RAM data when back from RESET. You have UPS to prevent sudden power downs for the whole system.
$endgroup$
– Eugene Sh.
8 hours ago




2




2




$begingroup$
And the eeprom idea.... Well today a typical mid-end home PC has about 8GB of DRAM. EEPROM of 8GB? MAybe you meant flash after all?
$endgroup$
– Eugene Sh.
8 hours ago




$begingroup$
And the eeprom idea.... Well today a typical mid-end home PC has about 8GB of DRAM. EEPROM of 8GB? MAybe you meant flash after all?
$endgroup$
– Eugene Sh.
8 hours ago












$begingroup$
They already do that, though not for main memory in a computer; the common term is "battery-backed SRAM". SRAM is too expensive by far to use as main memory, but battery-backed SRAM was used historically for things like BIOS settings (ever heard of "the CMOS battery"?), and it's how saving games worked on NES, SNES, Game Boy, and a few early Game Boy Advance video games.
$endgroup$
– Hearth
8 hours ago




$begingroup$
They already do that, though not for main memory in a computer; the common term is "battery-backed SRAM". SRAM is too expensive by far to use as main memory, but battery-backed SRAM was used historically for things like BIOS settings (ever heard of "the CMOS battery"?), and it's how saving games worked on NES, SNES, Game Boy, and a few early Game Boy Advance video games.
$endgroup$
– Hearth
8 hours ago




1




1




$begingroup$
en.wikipedia.org/wiki/Non-volatile_random-access_memory
$endgroup$
– Pradyoth Shandilya
8 hours ago




$begingroup$
en.wikipedia.org/wiki/Non-volatile_random-access_memory
$endgroup$
– Pradyoth Shandilya
8 hours ago










3 Answers
3






active

oldest

votes


















3
















$begingroup$

Short answer: You might be able to "connect a battery to a RAM to prevent data loss during power outage", but this depends on the type of RAM.



Lithium "coin cell" primary (non-rechargeable) batteries, along with a diode, are commonly used for SRAM retention. SRAM is not DRAM, explained below. SRAMs are found pretty much everywhere else, such as in a modern (home) thermostat; it uses a battery to retain your settings if the power ever goes out. And in an alarm clock; uses a battery to keep the time (and to operate from for a short period), etc. SRAM is even present in the CPU as it's cache memory.



One caveat to battery-backing SRAM is, given the SRAM voltage from a battery of 3.00v a diode must be used to prevent charging the battery from the typical Vdd voltage of 3.3v or 5.0v. The supply current is very small (even nano-amps) so data can be retained for years.



The acronym SRAM means "Static Random Acccess Memory." Static, because its contents stay whatever state they are programmed, indefinitely (as long as power is applied.) SRAM is relatively expensive and bulky physically, but it is very fast, so only finds niche roles.



DRAM is a different beast altogether. DRAM needs to be "refreshed" continuously, else its contents are lost. Normal operation of the PC keeps the data in DRAM refreshed continuously, so that data is always available. But attempting to power DRAM from a battery alone would quickly (within thousandths of a second) cause the data to be lost. DRAM is relatively dense (capacity-wise) and inexpensive, so is used for computer main system memory. It is also slower.



Aside: to get around this slowness of DRAM, PC's use these in parallel, termed "banks". A whole stick is accessed at once (x8 speed since there are 8 chips on it), then if the motherboard supports dual-banking, two modules at once (2x8 = 16x). Triple-banking = 24x, etc.






share|improve this answer












$endgroup$















  • $begingroup$
    Thank you! This was a great help.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago



















4
















$begingroup$


Can we not simply connect a battery to a RAM to prevent data loss during power cuts? So can you tell me why is this not done?




Of course we do! It's called battery-backed SRAM, and it's widely used in embedded systems. These days, the cost of NVRAM technology (such as conventional EEPROM, or new FRAM) is low, they can do the same thing without power, so it's not as common as before, but it's still here. And it's very likely that your desktop computer still has one inside to keep the BIOS settings.



Battery-Backed SRAM



Applications include:




  • Date/Time. The coin cell on your computer motherboard powers the real-time clock chip, which has SRAM inside that keeps the time. It's the reason that your desktop computer remembers the time even if power is removed.


  • Calibration Parameters. A piece of test equipment such as an oscilloscope can save the current calibration data inside SRAM (A common problem of old test equipment is losing all calibration data when the battery is dead).



  • Runtime Parameters. A microcontroller can save important runtime data in a battery-backed SRAM, so that the data never loses even if the microcontroller is reset due to a power outage or crashes. Similarly, a handheld scientific calculator can save your variables.




    • Many desktop computers still use this technique to retain some BIOS settings, along with the date/time. It is kept because people found that it is easy to remove the battery and reset everything if the BIOS setting is bad. Early PCs used real dedicated SRAM chips, modern PCs use an integrated solution. Although modern UEFI firmware mostly uses NVRAM, but some still have a battery-backed SRAM in addition to NVRAM.



  • Cryptography and Security. A security hardware can save the private key inside a battery-backed SRAM, with a temper-detection mechanism that erases and disconnects the SRAM if intrusion is detected, permanently destroys the private key. Similarly, in the extreme case, the program itself is saved in SRAM to frustrate any reverse-engineering efforts by competitors.



We don't do this on desktop computers. The large DRAM on computers use a lot of power. Also, most operating systems and software is not designed to continue working after a power loss anyway. You can implement something like hibernation, but if so, why don't you just use hibernation? Overall, it's not done, not because it's impossible, it's simply because nobody really wants to do it.






share|improve this answer












$endgroup$















  • $begingroup$
    Thanks, man! What I needed and more.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago










  • $begingroup$
    tAmper-detection. Although some people do get angry when they can't decrypt their data.
    $endgroup$
    – dave_thompson_085
    21 mins ago



















2
















$begingroup$

For a PC, that's more or less what "hibernate on low battery" is. The contents of RAM are written to disk in the hibernation file. Since you need the whole system to be on while doing this, it needs quite a lot of power, and is therefore only suitable for systems which would have a battery anyway like laptops.



Similarly it's possible to boot quickly from hibernation; Intel call this "rapid start" and it's been available on some systems for a long time.



The main limiting factor is that RAM is so large that it takes many seconds to write it all to Flash.






share|improve this answer










$endgroup$















  • $begingroup$
    Thanks, man! This helped a lot.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago













Your Answer






StackExchange.ifUsing("editor", function () {
return StackExchange.using("schematics", function () {
StackExchange.schematics.init();
});
}, "cicuitlab");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "135"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});















draft saved

draft discarded
















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f461861%2fcan-we-not-simply-connect-a-battery-to-a-ram-to-prevent-data-loss-during-power-c%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown


























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









3
















$begingroup$

Short answer: You might be able to "connect a battery to a RAM to prevent data loss during power outage", but this depends on the type of RAM.



Lithium "coin cell" primary (non-rechargeable) batteries, along with a diode, are commonly used for SRAM retention. SRAM is not DRAM, explained below. SRAMs are found pretty much everywhere else, such as in a modern (home) thermostat; it uses a battery to retain your settings if the power ever goes out. And in an alarm clock; uses a battery to keep the time (and to operate from for a short period), etc. SRAM is even present in the CPU as it's cache memory.



One caveat to battery-backing SRAM is, given the SRAM voltage from a battery of 3.00v a diode must be used to prevent charging the battery from the typical Vdd voltage of 3.3v or 5.0v. The supply current is very small (even nano-amps) so data can be retained for years.



The acronym SRAM means "Static Random Acccess Memory." Static, because its contents stay whatever state they are programmed, indefinitely (as long as power is applied.) SRAM is relatively expensive and bulky physically, but it is very fast, so only finds niche roles.



DRAM is a different beast altogether. DRAM needs to be "refreshed" continuously, else its contents are lost. Normal operation of the PC keeps the data in DRAM refreshed continuously, so that data is always available. But attempting to power DRAM from a battery alone would quickly (within thousandths of a second) cause the data to be lost. DRAM is relatively dense (capacity-wise) and inexpensive, so is used for computer main system memory. It is also slower.



Aside: to get around this slowness of DRAM, PC's use these in parallel, termed "banks". A whole stick is accessed at once (x8 speed since there are 8 chips on it), then if the motherboard supports dual-banking, two modules at once (2x8 = 16x). Triple-banking = 24x, etc.






share|improve this answer












$endgroup$















  • $begingroup$
    Thank you! This was a great help.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago
















3
















$begingroup$

Short answer: You might be able to "connect a battery to a RAM to prevent data loss during power outage", but this depends on the type of RAM.



Lithium "coin cell" primary (non-rechargeable) batteries, along with a diode, are commonly used for SRAM retention. SRAM is not DRAM, explained below. SRAMs are found pretty much everywhere else, such as in a modern (home) thermostat; it uses a battery to retain your settings if the power ever goes out. And in an alarm clock; uses a battery to keep the time (and to operate from for a short period), etc. SRAM is even present in the CPU as it's cache memory.



One caveat to battery-backing SRAM is, given the SRAM voltage from a battery of 3.00v a diode must be used to prevent charging the battery from the typical Vdd voltage of 3.3v or 5.0v. The supply current is very small (even nano-amps) so data can be retained for years.



The acronym SRAM means "Static Random Acccess Memory." Static, because its contents stay whatever state they are programmed, indefinitely (as long as power is applied.) SRAM is relatively expensive and bulky physically, but it is very fast, so only finds niche roles.



DRAM is a different beast altogether. DRAM needs to be "refreshed" continuously, else its contents are lost. Normal operation of the PC keeps the data in DRAM refreshed continuously, so that data is always available. But attempting to power DRAM from a battery alone would quickly (within thousandths of a second) cause the data to be lost. DRAM is relatively dense (capacity-wise) and inexpensive, so is used for computer main system memory. It is also slower.



Aside: to get around this slowness of DRAM, PC's use these in parallel, termed "banks". A whole stick is accessed at once (x8 speed since there are 8 chips on it), then if the motherboard supports dual-banking, two modules at once (2x8 = 16x). Triple-banking = 24x, etc.






share|improve this answer












$endgroup$















  • $begingroup$
    Thank you! This was a great help.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago














3














3










3







$begingroup$

Short answer: You might be able to "connect a battery to a RAM to prevent data loss during power outage", but this depends on the type of RAM.



Lithium "coin cell" primary (non-rechargeable) batteries, along with a diode, are commonly used for SRAM retention. SRAM is not DRAM, explained below. SRAMs are found pretty much everywhere else, such as in a modern (home) thermostat; it uses a battery to retain your settings if the power ever goes out. And in an alarm clock; uses a battery to keep the time (and to operate from for a short period), etc. SRAM is even present in the CPU as it's cache memory.



One caveat to battery-backing SRAM is, given the SRAM voltage from a battery of 3.00v a diode must be used to prevent charging the battery from the typical Vdd voltage of 3.3v or 5.0v. The supply current is very small (even nano-amps) so data can be retained for years.



The acronym SRAM means "Static Random Acccess Memory." Static, because its contents stay whatever state they are programmed, indefinitely (as long as power is applied.) SRAM is relatively expensive and bulky physically, but it is very fast, so only finds niche roles.



DRAM is a different beast altogether. DRAM needs to be "refreshed" continuously, else its contents are lost. Normal operation of the PC keeps the data in DRAM refreshed continuously, so that data is always available. But attempting to power DRAM from a battery alone would quickly (within thousandths of a second) cause the data to be lost. DRAM is relatively dense (capacity-wise) and inexpensive, so is used for computer main system memory. It is also slower.



Aside: to get around this slowness of DRAM, PC's use these in parallel, termed "banks". A whole stick is accessed at once (x8 speed since there are 8 chips on it), then if the motherboard supports dual-banking, two modules at once (2x8 = 16x). Triple-banking = 24x, etc.






share|improve this answer












$endgroup$



Short answer: You might be able to "connect a battery to a RAM to prevent data loss during power outage", but this depends on the type of RAM.



Lithium "coin cell" primary (non-rechargeable) batteries, along with a diode, are commonly used for SRAM retention. SRAM is not DRAM, explained below. SRAMs are found pretty much everywhere else, such as in a modern (home) thermostat; it uses a battery to retain your settings if the power ever goes out. And in an alarm clock; uses a battery to keep the time (and to operate from for a short period), etc. SRAM is even present in the CPU as it's cache memory.



One caveat to battery-backing SRAM is, given the SRAM voltage from a battery of 3.00v a diode must be used to prevent charging the battery from the typical Vdd voltage of 3.3v or 5.0v. The supply current is very small (even nano-amps) so data can be retained for years.



The acronym SRAM means "Static Random Acccess Memory." Static, because its contents stay whatever state they are programmed, indefinitely (as long as power is applied.) SRAM is relatively expensive and bulky physically, but it is very fast, so only finds niche roles.



DRAM is a different beast altogether. DRAM needs to be "refreshed" continuously, else its contents are lost. Normal operation of the PC keeps the data in DRAM refreshed continuously, so that data is always available. But attempting to power DRAM from a battery alone would quickly (within thousandths of a second) cause the data to be lost. DRAM is relatively dense (capacity-wise) and inexpensive, so is used for computer main system memory. It is also slower.



Aside: to get around this slowness of DRAM, PC's use these in parallel, termed "banks". A whole stick is accessed at once (x8 speed since there are 8 chips on it), then if the motherboard supports dual-banking, two modules at once (2x8 = 16x). Triple-banking = 24x, etc.







share|improve this answer















share|improve this answer




share|improve this answer



share|improve this answer








edited 3 hours ago









Neil_UK

87.7k2 gold badges90 silver badges203 bronze badges




87.7k2 gold badges90 silver badges203 bronze badges










answered 8 hours ago









rdtscrdtsc

5,6883 gold badges13 silver badges39 bronze badges




5,6883 gold badges13 silver badges39 bronze badges















  • $begingroup$
    Thank you! This was a great help.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago


















  • $begingroup$
    Thank you! This was a great help.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago
















$begingroup$
Thank you! This was a great help.
$endgroup$
– Vishal Dalwadi
7 hours ago




$begingroup$
Thank you! This was a great help.
$endgroup$
– Vishal Dalwadi
7 hours ago













4
















$begingroup$


Can we not simply connect a battery to a RAM to prevent data loss during power cuts? So can you tell me why is this not done?




Of course we do! It's called battery-backed SRAM, and it's widely used in embedded systems. These days, the cost of NVRAM technology (such as conventional EEPROM, or new FRAM) is low, they can do the same thing without power, so it's not as common as before, but it's still here. And it's very likely that your desktop computer still has one inside to keep the BIOS settings.



Battery-Backed SRAM



Applications include:




  • Date/Time. The coin cell on your computer motherboard powers the real-time clock chip, which has SRAM inside that keeps the time. It's the reason that your desktop computer remembers the time even if power is removed.


  • Calibration Parameters. A piece of test equipment such as an oscilloscope can save the current calibration data inside SRAM (A common problem of old test equipment is losing all calibration data when the battery is dead).



  • Runtime Parameters. A microcontroller can save important runtime data in a battery-backed SRAM, so that the data never loses even if the microcontroller is reset due to a power outage or crashes. Similarly, a handheld scientific calculator can save your variables.




    • Many desktop computers still use this technique to retain some BIOS settings, along with the date/time. It is kept because people found that it is easy to remove the battery and reset everything if the BIOS setting is bad. Early PCs used real dedicated SRAM chips, modern PCs use an integrated solution. Although modern UEFI firmware mostly uses NVRAM, but some still have a battery-backed SRAM in addition to NVRAM.



  • Cryptography and Security. A security hardware can save the private key inside a battery-backed SRAM, with a temper-detection mechanism that erases and disconnects the SRAM if intrusion is detected, permanently destroys the private key. Similarly, in the extreme case, the program itself is saved in SRAM to frustrate any reverse-engineering efforts by competitors.



We don't do this on desktop computers. The large DRAM on computers use a lot of power. Also, most operating systems and software is not designed to continue working after a power loss anyway. You can implement something like hibernation, but if so, why don't you just use hibernation? Overall, it's not done, not because it's impossible, it's simply because nobody really wants to do it.






share|improve this answer












$endgroup$















  • $begingroup$
    Thanks, man! What I needed and more.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago










  • $begingroup$
    tAmper-detection. Although some people do get angry when they can't decrypt their data.
    $endgroup$
    – dave_thompson_085
    21 mins ago
















4
















$begingroup$


Can we not simply connect a battery to a RAM to prevent data loss during power cuts? So can you tell me why is this not done?




Of course we do! It's called battery-backed SRAM, and it's widely used in embedded systems. These days, the cost of NVRAM technology (such as conventional EEPROM, or new FRAM) is low, they can do the same thing without power, so it's not as common as before, but it's still here. And it's very likely that your desktop computer still has one inside to keep the BIOS settings.



Battery-Backed SRAM



Applications include:




  • Date/Time. The coin cell on your computer motherboard powers the real-time clock chip, which has SRAM inside that keeps the time. It's the reason that your desktop computer remembers the time even if power is removed.


  • Calibration Parameters. A piece of test equipment such as an oscilloscope can save the current calibration data inside SRAM (A common problem of old test equipment is losing all calibration data when the battery is dead).



  • Runtime Parameters. A microcontroller can save important runtime data in a battery-backed SRAM, so that the data never loses even if the microcontroller is reset due to a power outage or crashes. Similarly, a handheld scientific calculator can save your variables.




    • Many desktop computers still use this technique to retain some BIOS settings, along with the date/time. It is kept because people found that it is easy to remove the battery and reset everything if the BIOS setting is bad. Early PCs used real dedicated SRAM chips, modern PCs use an integrated solution. Although modern UEFI firmware mostly uses NVRAM, but some still have a battery-backed SRAM in addition to NVRAM.



  • Cryptography and Security. A security hardware can save the private key inside a battery-backed SRAM, with a temper-detection mechanism that erases and disconnects the SRAM if intrusion is detected, permanently destroys the private key. Similarly, in the extreme case, the program itself is saved in SRAM to frustrate any reverse-engineering efforts by competitors.



We don't do this on desktop computers. The large DRAM on computers use a lot of power. Also, most operating systems and software is not designed to continue working after a power loss anyway. You can implement something like hibernation, but if so, why don't you just use hibernation? Overall, it's not done, not because it's impossible, it's simply because nobody really wants to do it.






share|improve this answer












$endgroup$















  • $begingroup$
    Thanks, man! What I needed and more.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago










  • $begingroup$
    tAmper-detection. Although some people do get angry when they can't decrypt their data.
    $endgroup$
    – dave_thompson_085
    21 mins ago














4














4










4







$begingroup$


Can we not simply connect a battery to a RAM to prevent data loss during power cuts? So can you tell me why is this not done?




Of course we do! It's called battery-backed SRAM, and it's widely used in embedded systems. These days, the cost of NVRAM technology (such as conventional EEPROM, or new FRAM) is low, they can do the same thing without power, so it's not as common as before, but it's still here. And it's very likely that your desktop computer still has one inside to keep the BIOS settings.



Battery-Backed SRAM



Applications include:




  • Date/Time. The coin cell on your computer motherboard powers the real-time clock chip, which has SRAM inside that keeps the time. It's the reason that your desktop computer remembers the time even if power is removed.


  • Calibration Parameters. A piece of test equipment such as an oscilloscope can save the current calibration data inside SRAM (A common problem of old test equipment is losing all calibration data when the battery is dead).



  • Runtime Parameters. A microcontroller can save important runtime data in a battery-backed SRAM, so that the data never loses even if the microcontroller is reset due to a power outage or crashes. Similarly, a handheld scientific calculator can save your variables.




    • Many desktop computers still use this technique to retain some BIOS settings, along with the date/time. It is kept because people found that it is easy to remove the battery and reset everything if the BIOS setting is bad. Early PCs used real dedicated SRAM chips, modern PCs use an integrated solution. Although modern UEFI firmware mostly uses NVRAM, but some still have a battery-backed SRAM in addition to NVRAM.



  • Cryptography and Security. A security hardware can save the private key inside a battery-backed SRAM, with a temper-detection mechanism that erases and disconnects the SRAM if intrusion is detected, permanently destroys the private key. Similarly, in the extreme case, the program itself is saved in SRAM to frustrate any reverse-engineering efforts by competitors.



We don't do this on desktop computers. The large DRAM on computers use a lot of power. Also, most operating systems and software is not designed to continue working after a power loss anyway. You can implement something like hibernation, but if so, why don't you just use hibernation? Overall, it's not done, not because it's impossible, it's simply because nobody really wants to do it.






share|improve this answer












$endgroup$




Can we not simply connect a battery to a RAM to prevent data loss during power cuts? So can you tell me why is this not done?




Of course we do! It's called battery-backed SRAM, and it's widely used in embedded systems. These days, the cost of NVRAM technology (such as conventional EEPROM, or new FRAM) is low, they can do the same thing without power, so it's not as common as before, but it's still here. And it's very likely that your desktop computer still has one inside to keep the BIOS settings.



Battery-Backed SRAM



Applications include:




  • Date/Time. The coin cell on your computer motherboard powers the real-time clock chip, which has SRAM inside that keeps the time. It's the reason that your desktop computer remembers the time even if power is removed.


  • Calibration Parameters. A piece of test equipment such as an oscilloscope can save the current calibration data inside SRAM (A common problem of old test equipment is losing all calibration data when the battery is dead).



  • Runtime Parameters. A microcontroller can save important runtime data in a battery-backed SRAM, so that the data never loses even if the microcontroller is reset due to a power outage or crashes. Similarly, a handheld scientific calculator can save your variables.




    • Many desktop computers still use this technique to retain some BIOS settings, along with the date/time. It is kept because people found that it is easy to remove the battery and reset everything if the BIOS setting is bad. Early PCs used real dedicated SRAM chips, modern PCs use an integrated solution. Although modern UEFI firmware mostly uses NVRAM, but some still have a battery-backed SRAM in addition to NVRAM.



  • Cryptography and Security. A security hardware can save the private key inside a battery-backed SRAM, with a temper-detection mechanism that erases and disconnects the SRAM if intrusion is detected, permanently destroys the private key. Similarly, in the extreme case, the program itself is saved in SRAM to frustrate any reverse-engineering efforts by competitors.



We don't do this on desktop computers. The large DRAM on computers use a lot of power. Also, most operating systems and software is not designed to continue working after a power loss anyway. You can implement something like hibernation, but if so, why don't you just use hibernation? Overall, it's not done, not because it's impossible, it's simply because nobody really wants to do it.







share|improve this answer















share|improve this answer




share|improve this answer



share|improve this answer








edited 7 hours ago

























answered 8 hours ago









比尔盖子比尔盖子

1,1365 silver badges23 bronze badges




1,1365 silver badges23 bronze badges















  • $begingroup$
    Thanks, man! What I needed and more.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago










  • $begingroup$
    tAmper-detection. Although some people do get angry when they can't decrypt their data.
    $endgroup$
    – dave_thompson_085
    21 mins ago


















  • $begingroup$
    Thanks, man! What I needed and more.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago










  • $begingroup$
    tAmper-detection. Although some people do get angry when they can't decrypt their data.
    $endgroup$
    – dave_thompson_085
    21 mins ago
















$begingroup$
Thanks, man! What I needed and more.
$endgroup$
– Vishal Dalwadi
7 hours ago




$begingroup$
Thanks, man! What I needed and more.
$endgroup$
– Vishal Dalwadi
7 hours ago












$begingroup$
tAmper-detection. Although some people do get angry when they can't decrypt their data.
$endgroup$
– dave_thompson_085
21 mins ago




$begingroup$
tAmper-detection. Although some people do get angry when they can't decrypt their data.
$endgroup$
– dave_thompson_085
21 mins ago











2
















$begingroup$

For a PC, that's more or less what "hibernate on low battery" is. The contents of RAM are written to disk in the hibernation file. Since you need the whole system to be on while doing this, it needs quite a lot of power, and is therefore only suitable for systems which would have a battery anyway like laptops.



Similarly it's possible to boot quickly from hibernation; Intel call this "rapid start" and it's been available on some systems for a long time.



The main limiting factor is that RAM is so large that it takes many seconds to write it all to Flash.






share|improve this answer










$endgroup$















  • $begingroup$
    Thanks, man! This helped a lot.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago
















2
















$begingroup$

For a PC, that's more or less what "hibernate on low battery" is. The contents of RAM are written to disk in the hibernation file. Since you need the whole system to be on while doing this, it needs quite a lot of power, and is therefore only suitable for systems which would have a battery anyway like laptops.



Similarly it's possible to boot quickly from hibernation; Intel call this "rapid start" and it's been available on some systems for a long time.



The main limiting factor is that RAM is so large that it takes many seconds to write it all to Flash.






share|improve this answer










$endgroup$















  • $begingroup$
    Thanks, man! This helped a lot.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago














2














2










2







$begingroup$

For a PC, that's more or less what "hibernate on low battery" is. The contents of RAM are written to disk in the hibernation file. Since you need the whole system to be on while doing this, it needs quite a lot of power, and is therefore only suitable for systems which would have a battery anyway like laptops.



Similarly it's possible to boot quickly from hibernation; Intel call this "rapid start" and it's been available on some systems for a long time.



The main limiting factor is that RAM is so large that it takes many seconds to write it all to Flash.






share|improve this answer










$endgroup$



For a PC, that's more or less what "hibernate on low battery" is. The contents of RAM are written to disk in the hibernation file. Since you need the whole system to be on while doing this, it needs quite a lot of power, and is therefore only suitable for systems which would have a battery anyway like laptops.



Similarly it's possible to boot quickly from hibernation; Intel call this "rapid start" and it's been available on some systems for a long time.



The main limiting factor is that RAM is so large that it takes many seconds to write it all to Flash.







share|improve this answer













share|improve this answer




share|improve this answer



share|improve this answer










answered 8 hours ago









pjc50pjc50

36.3k3 gold badges49 silver badges93 bronze badges




36.3k3 gold badges49 silver badges93 bronze badges















  • $begingroup$
    Thanks, man! This helped a lot.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago


















  • $begingroup$
    Thanks, man! This helped a lot.
    $endgroup$
    – Vishal Dalwadi
    7 hours ago
















$begingroup$
Thanks, man! This helped a lot.
$endgroup$
– Vishal Dalwadi
7 hours ago




$begingroup$
Thanks, man! This helped a lot.
$endgroup$
– Vishal Dalwadi
7 hours ago



















draft saved

draft discarded



















































Thanks for contributing an answer to Electrical Engineering Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f461861%2fcan-we-not-simply-connect-a-battery-to-a-ram-to-prevent-data-loss-during-power-c%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...