Est-il prudent de retirer les clés USB lorsqu'un ordinateur est en veille?

Table des matières:

Est-il prudent de retirer les clés USB lorsqu'un ordinateur est en veille?
Est-il prudent de retirer les clés USB lorsqu'un ordinateur est en veille?

Vidéo: Est-il prudent de retirer les clés USB lorsqu'un ordinateur est en veille?

Vidéo: Est-il prudent de retirer les clés USB lorsqu'un ordinateur est en veille?
Vidéo: Réinitialisation de la mémoire NVRAM et PRAM sur un Mac - YouTube 2024, Avril
Anonim
Nous avons tous entendu l'avertissement concernant le retrait en toute sécurité des périphériques USB lorsque nous en avons terminé, mais que se passe-t-il si un système d'exploitation est suspendu et que vous décidez simplement de débrancher le périphérique USB à tout moment? L’article d’aujourd’hui sur le SuperUser Q & R répond aux questions d’un lecteur curieux.
Nous avons tous entendu l'avertissement concernant le retrait en toute sécurité des périphériques USB lorsque nous en avons terminé, mais que se passe-t-il si un système d'exploitation est suspendu et que vous décidez simplement de débrancher le périphérique USB à tout moment? L’article d’aujourd’hui sur le SuperUser Q & R répond aux questions d’un lecteur curieux.

La séance de questions et réponses d’aujourd’hui nous est offerte par SuperUser, une sous-division de Stack Exchange, un groupe de sites Web de questions-réponses dirigé par la communauté.

La question

Lecteur SuperUser IQAndreas veut savoir s'il est sûr de retirer le support USB lorsqu'un ordinateur est suspendu:

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.)

Est-il prudent de retirer le support USB lorsqu'un ordinateur est suspendu?

La réponse

Kinokijuf, contributeur de superutilisateur, a la solution pour nous:

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.

Avez-vous quelque chose à ajouter à l'explication? Sound off dans les commentaires. Voulez-vous lire plus de réponses d'autres utilisateurs de Stack Exchange doués en technologie? Découvrez le fil de discussion complet ici.

Crédit d'image: Ambuj Saxena (Flickr)

Conseillé: