É seguro remover unidades USB quando um computador está dormindo?

Índice:

É seguro remover unidades USB quando um computador está dormindo?
É seguro remover unidades USB quando um computador está dormindo?

Vídeo: É seguro remover unidades USB quando um computador está dormindo?

Vídeo: É seguro remover unidades USB quando um computador está dormindo?
Vídeo: APRENDA A FORMATAR O SEU MAC! Restaure o seu computador para venda ou começar do zero - YouTube 2024, Abril
Anonim
Todos nós já ouvimos a admoestação sobre a remoção segura de dispositivos USB quando terminamos com eles, mas e se um sistema operacional for suspenso e você decidir simplesmente desconectar o dispositivo USB de qualquer lugar? A postagem de perguntas e respostas do SuperUser de hoje tem a resposta para a pergunta de um leitor curioso.
Todos nós já ouvimos a admoestação sobre a remoção segura de dispositivos USB quando terminamos com eles, mas e se um sistema operacional for suspenso e você decidir simplesmente desconectar o dispositivo USB de qualquer lugar? A postagem de perguntas e respostas do SuperUser de hoje tem a resposta para a pergunta de um leitor curioso.

A sessão de perguntas e respostas de hoje nos é oferecida por cortesia do SuperUser, uma subdivisão do Stack Exchange, um agrupamento de sites de perguntas e respostas conduzido pela comunidade.

A questão

Leitor SuperUser IQAndreas quer saber se é seguro remover mídia USB quando um computador é suspenso:

We are often cautioned against unplugging USB drives in case they are currently being read from or written to. When a computer is suspended, hibernated, or asleep, it is obviously not writing any data. It may have been in the middle of a read or write operation, however, and it will have put such an operation on hold.

Since no arms are moving (for USB hard drives), or bytes on the drive flickering on and off (for flash drives), is it then “safe” to unplug the drive in question?

Is this true even if data was being written to it, but the operation was temporarily suspended? (Assuming you do not mind that specific file having been only half-written to the USB drive.)

É seguro remover mídia USB quando um computador é suspenso?

A resposta

O contribuidor do SuperUser, kinokijuf, tem a resposta para nós:

While there are indeed no transfers going on, the reason you do the Safely Remove Hardware dance is not because of the transfers. You are doing this to cleanly unmount the file system. Programs may still be using the USB drive and some files may still be unwritten to the disk, even after the application using them is closed. This is the same reason why you do not just hibernate and switch operating systems. A mounted file system is never guaranteed to be in a consistent state.

Ever wondered why an operating system slowed down to a crawl when using floppies? It is because the cache was flushed after writing each sector so that the floppy could be removed at any time when not in use.

You will still get a dialog pop-up and your program will hang if you try to access a floppy that was removed behind your back. Just insert the floppy back and be done. This will not work with USB drives because they get a different identifier each time. The program will just crash and the operating system may too if a driver was accessing a file.

Tem algo a acrescentar à explicação? Som desligado nos comentários. Quer ler mais respostas de outros usuários do Stack Exchange com experiência em tecnologia? Confira o tópico de discussão completo aqui.

Crédito de imagem: Ambuj Saxena (Flickr)

Recomendado: