Jump to content

The (meta-sata-pata)physics of USB Transfer


jaclaz

Recommended Posts

Those slim USB drives must also make trade-offs to achieve the reduction in size, like a reduction in transfer speed. There is no easy way to cheat physics.

Well, it depends on the type of data you send.

You see, 1's are slim enough, 0's are rather fat and may get slowed down by friction in the tinier electronic pipes.

As long as you send lots of 1's everything seems normal but when you want to actually 00 out a stick, it will get SLOW.

:whistle:

Though for very different reasons, the effect is not completely unlike what happens with cable connections:

http://www.911cd.net/forums//index.php?showtopic=21827&st=23

though if you use 0's and 8's on those tiny USB sticks, you will actually worsen the issue :ph34r:

:lol:

jaclaz

Edited by jaclaz
Link to comment
Share on other sites


Those slim USB drives must also make trade-offs to achieve the reduction in size, like a reduction in transfer speed. There is no easy way to cheat physics.

Well, it depends on the type of data you send.

You see, 1's are slim enough, 0's are rather fat and may get slowed down by friction in the tinier electronic pipes.

As long as you send lots of 1's everything seems normal but when you want to actually 00 out a stick, it will get SLOW.

:whistle:

Though for very different reasons, the effect is not completely unlike what happens with cable connections:

http://www.911cd.net/forums//index.php?showtopic=21827&st=23

though if you use 0's and 8's on those tiny USB sticks, you will actually worsen the issue :ph34r:

:lol:

jaclaz

Too bad nobody posted the real reason 0's are slower than 1's when writing USB Devices.

Link to comment
Share on other sites

Too bad nobody posted the real reason 0's are slower than 1's when writing USB Devices.

It boils down to line capacity. 0's require more bandwidth than 1's going through the line. USB wiring specifications lack 0-bit compression.

USB nominal transfer rate bit 0

Type A Connector
__________ ____________________________________________________________
| ______ | ________ ________ ________ ________ ________
| [______] | --> / \ / \ / \ / \ / \
| _____ | --> | | | | | | | | | |
| [_____] | --> | | | | | | | | | |
| [_____] | --> | | | | | | | | | |
| ______ | --> | | | | | | | | | |
| [______] | --> \________/ \________/ \________/ \________/ \________/
|__________| ____________________________________________________________

Result 0 0 0 0 0

===============================================================================

USB nominal transfer rate bit 1

Type A Connector
__________ ____________________________________________________________
| ______ |
| [______] | --> /| /| /| /| /| /| /| /|
| _____ | --> / | / | / | / | / | / | / | / |
| [_____] | --> | | | | | | | |
| [_____] | --> | | | | | | | |
| ______ | --> | | | | | | | |
| [______] | --> __|__ __|__ __|__ __|__ __|__ __|__ __|__ __|__
|__________| ____________________________________________________________

Result 1 1 1 1 1 1 1 1

Link to comment
Share on other sites

It boils down to line capacity. 0's require more bandwidth than 1's going through the line. USB wiring specifications lack 0-bit compression.

Not really. :(

In your nice diagram both the 0 and 1's are propelled by a same given force, the --> :



Type A Connector
__________
| ______ |
| [______] | -->
| _____ | -->
| [_____] | -->
| [_____] | -->
| ______ | -->
| [______] | -->
|__________|

Since you are transmitting bits in vertical position the actual (band) width is actually the height between the two horizontal walls of the pipe (and is obviously a constant), this has nothing to do with actual rate.

A more accurate diagram (though you still have the actual bits sideways) is this one:


Type A Connector
__________ __________________________________
| ______ |
| [______] | --> /| --> /| --> /|
| _____ | --> / | --> / | --> / |
| [_____] | --> | --> | --> |
| [_____] | --> | --> | --> |
| ______ | --> | --> | --> |
| [______] | --> __|__ --> __|__ --> __|__
|__________| ___________________________________

(you have to push each single byte).

In such a scenario, physics tells us how if you give a stronger push, the pushed object will acquire greater speed, so that if the diagram was a motion picture, what you woud see would be roughly as follows:

Type A Connector
__________ __________________________________
| ______ | ____ ____ ____
| [______] | ---> / \ ---> / \ ---> / \
| _____ | ---> | | ---> | | ---> | |
| [_____] | ---> | | ---> | | ---> | |
| [_____] | ---> | | ---> | | ---> | |
| ______ | ---> | | ---> | | ---> | |
| [______] | ---> \____/ ---> \____/ ---> \____/
|__________| ___________________________________

BUT what the good guys did was simply to use smaller characters:


____
/| / \ ____
/ | | | /| / \
| and | | = | and | |
| | | __|__ \____/
| | |
__|__ \____/

And sent them vertically, here you can see how the fatter 0's may slow down transfer, since they go more tight in the pipe:


|__ __ |
| | |
| | |
| |/ |
| ____ |
|/ \|
|| ||
|\____/|
| ____ |
|/ \|
|| ||
|\____/|
| ____ |
|/ \|
|| ||
|\____/|
|__ __ |
| | |
| | |
| |/ |
|__ __ |
| | |
| | |
| |/ |
| ____ |
|/ \|
|| ||
|\____/|

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Guys, going over and over with that kind of jokes is not too helpfull IMO, however I was wondering if rloew was also joking saying that transmitting zeros was slower than transmitting ones so I looked up a bit and from what I understand (perhaps erroneously) by briefly reading about NRZI encoding used for USB data transmission it would be that the more there are bit changes the slower the transmission.

Edited by loblo
Link to comment
Share on other sites

Guys, going over and over with that kind of jokes is not too helpfull IMO, however I was wondering if rloew was also joking saying that transmitting zeros was slower than transmitting ones so I looked up a bit and from what I understand (perhaps erroneously) by briefly reading about NRZI encoding used for USB data transmission it would be that the more there are bit changes the slower the transmission.

Noone ever tagged those posts as "helpful", AFAIK. :whistle:

I asked dencorso if he could split these few posts to a new thread, so that we can discuss some physics ;) without deranging the NUSB topic. :ph34r:

A bit more seriously (but not much ;)) the NRZI in itself has no consequence, it is the bit stuffing that actually makes the USB behave the other way round:

http://en.wikipedia.org/wiki/Non-return-to-zero

Non-Return-to-Zero Inverted (NRZI)

Example NRZI encoding

NRZ-transition occurs for a zero

Non return to zero, inverted (NRZI) is a method of mapping a binary signal to a physical signal for transmission over some transmission media. The two level NRZI signal has a transition at a clock boundary if the bit being transmitted is a logical 1, and does not have a transition if the bit being transmitted is a logical 0.

"One" is represented by a transition of the physical level.

"Zero" has no transition.

Also, NRZI might take the opposite convention, as in Universal Serial Bus (USB) signalling, when in Mode 1 (transition when signalling zero and steady level when signalling one). The transition occurs on the leading edge of the clock for the given bit. This distinguishes NRZI from NRZ-Mark.

However, even NRZI can have long series of zeros (or ones if transitioning on "zero"), so clock recovery can be difficult unless some form of run length limited (RLL) coding is used on top. Magnetic disk and tape storage devices generally use fixed-rate RLL codes, while USB uses bit stuffing, which is efficient, but results in a variable data rate: it takes slightly longer to send a long string of 1 bits over USB than it does to send a long string of 0 bits. (USB inserts an additional 0 bit after 6 consecutive 1 bits.)

http://en.wikipedia.org/wiki/Bit_stuffing

A similar scheme is used in the Universal Serial Bus, but for a different reason: to ensure sufficient clock edges. Low- and full-speed USB data is sent NRZI encoded: a 0 bit causes a signal transition, while a 1 bit causes no change. The receiver must count the time between transitions to determine the number of 1 bits, and if that time is too long, the receiver can lose count. USB stuffs a 0 bit (causing a transition) after every 6 consecutive 1 bits; this guarantees at least one transition every 7 bit times. (A (0,6) RLL code.)

The main disadvantage of this form of bit-stuffing is that the code rate is unpredictable; it depends on the data being transmitted.

But that merely says that a 0 is added every few 1's, so as long as you send values up to 127 everything is fine and dandy.

170 and 85 will still be very nice numbers to transmit :yes: .

Guess why typing ASCII is usually faster than typing UNICODE? :w00t:

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Guess why typing ASCII is usually faster than typing UNICODE?

That ones simple:

ASCII = 5 characters

UNICODE = 7 characters

With that simple math ASCII is and will always be faster and (much easier on the fingers in the long run) than UNICODE...

Also what happens when and if binary gets pased 0-1, 2-3 and gets up to the rough and jagged numbers of 4 and 7???

Edited by Kelsenellenelvian
Link to comment
Share on other sites

Also what happens when and if binary gets pased 0-1, 2-3 and gets up to the rough and jagged numbers of 4 and 7???

Again it depends which effect you want to reduce, or the feature you want to add...

0 and 8's are very good as they are rounded, but, given that the pipes walls are made in a hard enough material, both the 4 and 7, since they have sharp, scraping edges may contribute to clean the pipes from any escaped electron that may pile up and clog the pipes, like:

|.8.|
|. .|
|. .|

The alternative, as you might know, is to send a few asterisks down the pipe, like:

|*  |
|* |
| * |
| * |
| *|
| *|

Or, as some do, a set of slashes/backslashes:


| \ |
| \ |
| \|
| \|
|/ |
|/ |

Personally I prefer the asterisks because you can give 'em a little spin, so that they rotate, and each one of the six edges works * only a little time and thus last longer.

jaclaz

Link to comment
Share on other sites

Yeah but that is assuming you have a straight length of cable...

ANY slight bend and your going to get a clog.

Sure :), on cables, back to where it all began:

http://www.911cd.net/forums//index.php?showtopic=21827&st=23

It is not very common, but it can happen, it obviously depends on the material the pipes are made of/layered with.

Ever wondered how there were once gold (SCSI) cables and even today there is people willing to spend some US$21,.000 :w00t:

http://www.noiseaddicts.com/2008/11/most-expensive-speaker-cable-world-audioquest-audiophile/

http://www.verber.com/mark/ce/cables.html

http://consumerist.com/2008/03/do-coat-hangers-sound-as-good-monster-cables.html

It's easy, they are made with better materials and have much smoother walls, after a few hours of use coathangers get all clogged by electrons. :ph34r:

Ha!, noone ever runs an endurance comparison with coathangers! :whistle:

But with Foxbat, we were talking of USB transfers and of the tinier sticks, and of USB connectors, they are straight enough normally.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

ALTHOUGH! I am now building a app to send a metric sh!tload of spining asterisks down my pipes once every morning so I can have that fresh' clean feeling everyday.

You should NOT run that app every morning! :no:

It's just like DEFRAG, you only need to do it when it is needed and it depends on the use you do of the disk.

Currently used 1's already provide for normal cleaning, so unless you send too much 0's you shouldn't have so frequent the need.

There are some reports that streaming p0rn can clog cables faster, though. :rolleyes:

jaclaz

Link to comment
Share on other sites

Ah good point, BUT hey I do watch alot of porn so maybe I will set it to every wednesday morning at 3am, MS thinks thats good enough for my win7 so I might as well have everything sorted out at the same time.

You should be VERY aware of the risks involved in running that at 3 A.M. :ph34r:

You need to add to your scheduling set a provision to calculate if the moon is full and skip the cleaning on that night if it is.

The sound (well below what the human ear can perceive) made by the spinning asterisks on some cable types can be very similar to the mating cry of werewolves... :w00t:

Of course it is well possible that it doesn't happen on your cables, but I wouldn't take the chance, if I were you. :no:

http://www.imdb.com/title/tt0072431/quotes?qt=qt0484648

:)

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...