0

Are there any negative effects to go into "suspend mode" wile an application is in the middle of running?

I'm assuming applications that don't actually "do much" unless interacted with (such as a GEdit or Nautilus window) would handle it fine.

But I imagine applications like Transmission or an active cp or mv command which are continuously reading/writing from the harddisk, or sending data over the network may not like it as much. Or are these concerns unfounded?

  • A process can be interrupted by the kernel any time. It's the kernel providing the CPU time (scheduling tasks) and just as well while you think your applications are running simultaneously, they don't. They will be interrupted all the time. Suspend/hibernate is just the same, but then it's not for milliseconds, but for a much longer time and for all running processes. Luckily machines don't care about time. :) – gertvdijk Jul 15 '13 at 5:09
1

Are there any negative effects to go into "suspend mode" wile an application is in the middle of running?

No, an application should be able to cope with this just fine. If it doesn't, it would indicate a problem with the application.

An application doesn't even have to know it suspended, it may just notice the normal side-effects of associated things like active network connections being cut off.

An application like Transmission will notice that any network connections it had open suddenly close. It should just continue to try to open new connections, no harm done. This is just the same as if your internet connection went down temporarily.

An operation like cp or mv should be fine particularly if the operation is on local drives - it should continue after resuming, except in the case that the device it was copying from or to has been disconnected in the mean-time (or was a network device and the connection was lost), in which case it would issue an error message, just as if you had disconnected the device yourself while the computer was running.

So to summarise, suspending your computer usually won't harm the running applications any more than the network dropping connection, or changing the time on the clock, or disconnecting devices, might at any time. An application doesn't need to be specially programmed to be able to suspend and resume properly.

|improve this answer|||||
0

Yes, network applications will behave themselves as they were disconnected. Transmission will reconnect automatically. And cp/mv I did not research, but when I start copying in Virtual Machine and suspend then resume it, the operation breaks. I think these commands will do the same thing.

|improve this answer|||||
0

Interesting question. For network transmissions, there are timeouts, so those connections will be broken after a certain amount of time. Read and write from a local harddisk should be fine and would just resume when the system comes back up, but I'm not 100% certain and I think I'd try to avoid that situation.

It's not possible to talk about commands that way. If you're copying or moving using cp or mv to/from a network mounted file system over TCP, then if you suspend, the network connection is dropped and when the system comes back up, the data source/destination no longer exists. So even if a local cp would be unaffected, in another situation, it would be detrimental.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.