473,811 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

back up data in C how & when in sudden poweroff??????? ??

Hi,

In sudden power off, How to backup means in which format(files,
streams) & when to backup in C.

Thanks,
SAI

Jul 24 '06
11 1670
In article <th************ *************** *****@4ax.com>,
Mark McIntyre <ma**********@s pamcop.netwrote :
>On Tue, 25 Jul 2006 15:37:21 +0000 (UTC), in comp.lang.c ,
ro******@ibd.n rc-cnrc.gc.ca (Walter Roberson) wrote:
>>It so happens that your statement is incorrect on some operating
systems, including SGI IRIX and including Linux.
>... and Windows. However typically unless you have a UPS or other
battery supply, you get about a hundredth of a second to do anything
in any OS...
Tsk, overly specific on the timelines ;-)

Some OSes only run on systems which are designed to provide longer
usable emergency power-shutdown times.

Besides, 1/100th of a second might well be long -enough- on
systems with battery-backed (or capacitor-backed) hard disk controllers,
or systems with SDRAM or other writable non-volatile memory.

At (say) 1 Gops (10^9 core operations per second), 1/100th of second
is enough for 10 million core operations. Even with the usual
"drop by a factor of 10 for each level of cache", one can expect
several tens of thousands of real memory operations, and the speed
of your permanent storage (e.g., disk drives) typically is
the limiting factor.

It's been some time since I had a disk soft corrupted due to
power failure, and much longer yet since the last hard corruption
due to power failure: systems these days typically last long enough for
a drive cache flush. But brownouts (not bad enough to be
detected as power failures) have caused me the occasional trouble
within the last year.
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)
Jul 25 '06 #11
Mark McIntyre <ma**********@s pamcop.netwrite s:
On Tue, 25 Jul 2006 15:37:21 +0000 (UTC), in comp.lang.c ,
ro******@ibd.nr c-cnrc.gc.ca (Walter Roberson) wrote:
>>It so happens that your statement is incorrect on some operating
systems, including SGI IRIX and including Linux.

... and Windows. However typically unless you have a UPS or other
battery supply, you get about a hundredth of a second to do anything
in any OS...
If the application is properly designed for the purpose, power
failures shouldn't cause much loss of data anyway, even if the
application does nothing special after the power starts to fail. For
example, it might periodically dump (some representation of) its state
to non-volatile storage. You'll only lose data generated between the
most recent completed dump and the power failure. This approach works
equally well for other external events, such as someone "kill -9"ing
the process or whatever the local equivalent is.

This is, of course, off-topic.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 25 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2819
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using http://192.168.1.106/~mlh/credifree/index.php the AMP app still thinks the data resides somewhere else. It runs fine - as long as I leave my LAN's external internet connection up. But if I unplug my LAN from the world, my app locks up. Before I...
7
5548
by: BlueDragon | last post by:
I don't know enough math to demonstrate that any numerical operation with a null should yield a null; although I would guess that it's true. I just don't buy it, however, when dealing with strings and nulls. In a simple table with first, middle and last name columns, I would infer that a null value in the middle name column means the HR person forgot to ask. A zero length string, however, tells me HR did ask and there is no middle name....
19
2725
by: jameso321 | last post by:
Hi, We run an MS Access 2000 DB with about 15 users. It is on a Win 2000 Server (SP4) machine and runs through Citrix Metaframe Presentation Server 3.0. --------------------------
4
3155
by: Murali Krishna. Siruvuru | last post by:
Hi, All of a sudden, all my Button Controls and Image Button Controls are not posting back data. I have Click event and event handlers in the code. Page itself is not posting back. Whereas Linkbuttons are working fine.
5
4340
by: David Bartosik [MSFT MVP] | last post by:
I'm parsing an XML file with XMLDocument, each node I write to SQL server. Sometimes values in the XML have to contain an ampersand, so they are in the XML as &amp; obviously. I assumed the .net framework took care of converting &amp; back to & But I'm wrong in that assumption. For every &amp; in the XML I receive
2
1208
by: fatica | last post by:
Hi all, I've written a windows service in .net 2.0 running on a windows 2003 server. I've hooked the system timer elapsed event to run some very time consuming code. This code processes a list of jobs and when its done, clears out that list. However, when the code takes longer to execute than the timer interval, all heck breaks loose. The elapsed code is fired again, yet, its still working on the list. What exactly has happened...
2
1263
by: skishorev | last post by:
Hi, In sudden power off, How to backup means in which format(files, streams) & when to backup in C++. Thanks, SAI
23
14527
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of the visitors will retype it all so i'm asking: "how to preserve POST-data when clicking the back-button?" i've already tried to print post data as a value in a HTML tag but
4
5699
by: Sin Precedente | last post by:
I have a win2k server with multiple domains on it many of which have a generic contact us page with a form that when submitted calls an .asp page that utilizes CDONTS. These pages have worked extremely well in the past until a couple days ago when all of a sudden every time that page is called i'm getting event 4000 in source smtpsvc Message delivery to the remote domain 'mydomain.com' failed for the following reason: Unable to bind to...
0
9727
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.