PDA

View Full Version : How USB works?


tonebloke
2011-07-28, 02:20 AM
I've been wondering about this so.......this is for the extreme techs out there.

When using a USB hub; if you have 2 external drives connected to it, and you want to transfer data from one to the other, does the data go from one external via the main C: drive to the other or does it go straight from external A to external B?

Just wondering. :hmm:

paddington
2011-07-28, 02:24 AM
Depends on your OS and how the drives are seen by it.

Many times, the removeable drives' file operations will be cached by the OS - the OS cache usually resides on the C: drive with the OS. This is why you should always "stop" the devices before you unplug them... this forces the OS to write any remaining data it has buffered to the intended destination.


If you have a USB hub w/ two drives on it and you copy files between them, there is an excellent chance the file data is being cached on the C:\ drive during the operation.

direwolf-pgh
2011-07-28, 08:39 AM
http://www.beyondlogic.org/usbnutshell/usb1.shtml

tonebloke
2011-07-29, 12:29 AM
OK, thanks. That pretty much answers my question. :thumbsup

Interesting read direwolf - but too much information for a semi-tech. :thumbsup

direwolf-pgh
2011-07-29, 12:39 AM
it goes device A to device B

USB data packets are not unlike ethernet packets when it comes to hard drives/data transfer
its handled by the southbridge IC controllers / CRC integrity ..and all that happiness.
in fact, your usb hub adds another controller.

paddington
2011-07-29, 12:59 AM
it goes device A to device B

USB data packets are not unlike ethernet packets when it comes to hard drives/data transfer
its handled by the southbridge IC controllers / CRC integrity ..and all that happiness.
in fact, your usb hub adds another controller.


unless they are seen by the Windows OS as removeable and "optimized for Better Performance"... then it buffers the transfer. in buffering, the OS may use the cache.

if you want to avoid the caching, you can choose to "optimize for quick removal", instead, which will write directly to the device without caching - but generally will actually slow down the transfer.


read more (http://www.yoingco.com/how_to_safely_remove_hardware_windows_7.htm)

direwolf-pgh
2011-07-29, 01:17 AM
read it. that cache is for 'common requested OS tasks'.. not data transfer.
can you imagine all the thrashing that would occur on a 16GB transfer. yikes!

paddington
2011-07-29, 02:25 AM
not directly... but where is it buffering to, if not RAM? If the OS is buffering to RAM, wouldn't some of that end up in the swapfile?