Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,392 Programmers. There are 1,400 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

flash drives

 
Reply to this topicStart new topic

flash drives

tootintorrey
post 22 Apr, 2008 - 02:35 PM
Post #1


New D.I.C Head

*
Joined: 24 Mar, 2008
Posts: 13



when you go to remove a flash drive from a usb port should you always go to safely remove hardware? Cuz i usually just gank it out and get on with my day but was recently told no dont do that youll wipe the drive.
blink.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Mikhail
post 22 Apr, 2008 - 02:38 PM
Post #2


D.I.C Addict

Group Icon
Joined: 26 Oct, 2007
Posts: 622

Wrong forum, should be in Computer Supports & Operating Systems, and No it wont wipe your drive.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

ferrari12508
post 22 Apr, 2008 - 03:21 PM
Post #3


Feelin' L33t? if so, die!

Group Icon
Joined: 2 Nov, 2007
Posts: 914

Well if you have something unsaved open, it will be erased, but i normally just take my drive out because apparently trying to safely remove a flash drive at my school is considered hacking
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

KYA
post 22 Apr, 2008 - 04:29 PM
Post #4


I am the evil C++ dichotomy of paradigms

Group Icon
Joined: 14 Sep, 2007
Posts: 1,335

It may be a problem is you're streaming something to it, but just yank that sucker out of there!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

pertheusual
post 22 Apr, 2008 - 04:38 PM
Post #5


D.I.C Head

**
Joined: 26 Jan, 2008
Posts: 212

Usually it doesn't matter. The main issue is if you save something on it right before you pull it out.
When you save files on most OS's, there is a little bit of lag where the data sits in your RAM but doesn't get written to the actual drive even though it looks like the file is there.

Doing "Safely Remove" basically makes the OS flush any caches of data that need to be written. So if you are just reading from the drive, then it doesn't matter, but if you are saving files and stuff, it can be bad to pull it out.

Per
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

spearfish
post 22 Apr, 2008 - 05:55 PM
Post #6


Monkey in Training

Group Icon
Joined: 10 Mar, 2008
Posts: 670

:nods at all previous answers:

:nods at all previous answers:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

mikeblas
post 22 Apr, 2008 - 08:06 PM
Post #7


D.I.C Head

**
Joined: 8 Feb, 2008
Posts: 94

It won't exactly wipe your drive, but it is very likely to corrupt individual files and could possibly corrupt the file system. You're playing Russian Roulette with your data each time you remove without ejecting.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

tootintorrey
post 23 Apr, 2008 - 12:29 PM
Post #8


New D.I.C Head

*
Joined: 24 Mar, 2008
Posts: 13

alright kool.
my bad on putting in the wrong forum i didnt see the rest of those at the bottom of the list.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

RodgerB
post 26 Apr, 2008 - 02:01 AM
Post #9


D.I.C Lover

Group Icon
Joined: 21 Sep, 2007
Posts: 1,471

As long as you don't have write caching enabled it should be safe to just yank your USB flash disk out. Write caching is disabled by default on removable hard drives for this very reason, because people are lazy. When write caching is disabled data is directly written to the storage device.

If write caching is enabled, data will be sent to a queue in the RAM where it will then perform a cache flush and write everything onto the drive when the system isn't busy, or it has exceeded a maximum time interval where it forces a cache flush.

All the Safely Remove hardware option does is perform a cache flush, much as pertheusual has already said.
User is online!Profile CardPM
Go to the top of the page
+Quote Post

mikeblas
post 28 Apr, 2008 - 07:12 AM
Post #10


D.I.C Head

**
Joined: 8 Feb, 2008
Posts: 94

Un-flushed writes are note the only threat when a device is removed from the system. Even with delayed writes turned off, a program may be in the middle of writing to a file at the moment that the device is removed. If one write succeeds and another fails, the data left in the file might be left in an inconsistent state, rendering the file unusable by the programs that try to read it.

Using the "safely remove hardware" feature flushes pending writes, but also gracefully stops access to the drive. The feature causes the system to see if any applications have files open on the drive, and will indicate to the user that removal of the device is not appropriate until those files are closed.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 05:08AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month