Jump to content

Recommended Posts

Posted

Computers seem to foist on you some sort of vague impression of doom that must arise from simply switching off a computer without going through the shut down sequence. I believe I've encountered messages saying that I would "lose memory" or some such thing, and the machine always throws a tantrum when you turn it back on. What exactly happens when you shut down and why is it so important? Will it really damage my computer if I just hold that power button down to turn it off?

Posted

It's not so much will you cause physical damage to your computer as will you damage your data.

 

Many filesystems aren't always consistent on disk. This means your computer will be in the middle of doing something when it loses power, and only part of some data got written out.

 

There's also the possibility that something you saved is actually in cache and not written out to disk.

 

That said, most modern filesystems use a technique called journaling to ensure this isn't a problem.

Posted

its all to do with the harddrive.

 

as bascule said, it may be that data was being written or about to be written to the disk and you end up trashing something or just losing it which isn't as bad.

 

it can also cause a head crash. if the disk spins down while the heads are over data containing bits of the disk it can cause physical damage. this isn't as much of a problem in more modern drives as the arm should immediatly throw itself over to the park position(though this in itself isn't a good thing for it). It was a serious problem not so long ago. its not so much now but it will still reduce the lifetime of your drives.

 

the solid state hardware on the other hand should be fine.

Posted

Yeah, they used to call that "write-behind caching". Not sure if they still do. The OS and the HD are actually pretty robust about stuff like that, so it's mainly a question of data loss, like IA says above.

 

Note that with a USB drive the failure to use "safely remove" would only run you a risk when writing data TO the drive. When reading from it you can just rip it right out of there after the copy is done with no risk.

 

I guess that might be another advantage for solid-state drives, although I've been wondering if they might start putting fast RAM caches in those things to speed 'em up, since their performance has been disappointing.

Posted

I'd imagine that in addition to possible loss of currently-written data (but you wouldn't switch of your computer while you write important data to the HD, would you?) temporary data (-trash) might not be correctly cleaned up. Personally, I think "damages your HD" or "messes up your filesystem" sounds like an urban myth. It would really surprise me if the manufacturers of HDs and designers of file systems were not aware that the average computer gets hardware switched-off (by power failure, system crash, ...) somewhere between once a week to once a year.

Posted

well, they are generally very robust when it comes to unexpected powerloss whether its a power cut or a silly user. but still data in the cache which may not have been written to disk can be lost. the cached data could be some temporary file that is inconsequential or that thesis you've been working on for three months. this especially applies to external devices like usb flash sticks.

 

an extreme example you could try is to set up a virtual machine with linux installed with the root partition as XFS and see how many times you can quit it and still boot up the virtual machine. there would be no Hardware damage as the computer never gets shut down but it will illustrate the filesystem problem quite nicely.

 

i picked XFS as it is kind of sensitive to this but all filesystems are to some extent. FAT32 would also be an example of one that deals with it poorly as it has no journal.

  • 3 weeks later...
Posted
I'd imagine that in addition to possible loss of currently-written data (but you wouldn't switch of your computer while you write important data to the HD, would you?) temporary data (-trash) might not be correctly cleaned up. Personally, I think "damages your HD" or "messes up your filesystem" sounds like an urban myth. It would really surprise me if the manufacturers of HDs and designers of file systems were not aware that the average computer gets hardware switched-off (by power failure, system crash, ...) somewhere between once a week to once a year.

 

It's not something hardware deigners or file systems programmers could necessarily have any control of. If the operating system is halted before it finishes its tasks of writing data to hardware and cleaning up the mess you could have a number of problems. You could in fact have partial entries in the filesystem that could cause troubles with your harddrive. Data in RAM that isn't written yet would be lost.

 

In an age of apparent multitasking you think many things are happening at once when they really aren't. The processor can really only process one instruction at a time, it just bounces to and fro among all of the running threads of instructions so fast it gives the appearance of multitasking. The operating system and the user could have dozens, hundreds or even thousands of concurrent processes open at once with the CPU bouncing among them. Halting the CPU instantly could leave any number of these processes in an indeterminate state and any hardware dependent on them in a similar indeterminate state.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.