I read as much as I could comprehend about PC Card. I wanted to understand why real world performance is so low. I am not an expert, and I have no formal education of computer engineering. Do not take my words as facts. If you know better than I do, then please correct my errors.
Quiz yourself! Spend a minute or two thinking about these questions.
What is the correct name: PCMCIA, PC card, 16-bit PCMCIA Card…?
How fast (or slow) is 16-bit PC Card, really?
Why does 16-bit PC Card i/o have such high CPU load?
Can performance be increased?What is the correct name: PCMCIA, PC card, 16-bit PCMCIA Card…?
I think it is important to know the names of these technologies. PC Card, as a generic term, refers to the standards and all sorts of devices. The first few versions of the standard were named "PCMCIA Standard". In 1995 the CardBus interface was created, and the name of the standard was changed to "PC Card Standard".
PC Card Standard, paraphrased wrote:
PCMCIA and JEITA have developed a standard for a credit card-sized adapter, called a 'PC Card' that does for notebook and other portable computers what the AT bus did for desktop PCs.How fast (or slow) is 16-bit PC Card, really?
When referring to products that support 16-bit operation, the term "16-bit PC Card" should be used. "CardBus PC Card" is the correct term that can be used when referring to the 32-bit bus master specification of the PC Card Standard.
As EOMtp and dr_st pointed out, 16-bit PC Card has a theoretical maximum speed of 160 megabits per second (20 Mo/s). I did not believe that number was true at first. Based on my experience, I thought 2 Mo/s was more likely! I can believe that some specific combinations of card, host, and software might
exist and have high performance. But in fact, 16-bit PC Card usually has very low performance. It is slow and hogs processor time.
David Hinds, Linux PCMCIA HOWTO wrote:Why does 16-bit PC Card i/o have such high CPU load?
16-bit PC Card can operate in two basic transfer modes: programmed input/output (PIO), and memory mapped input/output (MMIO).
During PIO, the driver software reaches out to the PC Card continuously. In a multi-threading computer, other instructions can still be executed. In a single-threading computer, all other tasks suffer.
During MMIO, the PC Card Host Adapter does i/o to a slow PC Card. When a PC Card is accessed, the driver software communicates data with the PC Card Host Adapter. The Host Adapter does the "dirty work", while the system CPU can smoothly do other work.
Let me make an analogy. Imagine a small town that represents a computer. The main street is named PCI Lane. The daily newspaper is delivered by a youth named Driver. Driver can deliver most of the papers quickly: ey rides a bicycle on PCI LN, pulls a paper from eir bag and throws it to the door of every home and office. The bicycle is fast and does not stop any traffic in town. This efficient way of working represents MMIO. But Driver needs to make one annoying delivery, to a senior citizen named Peacey. Peacey's house is much further away from the street than the other buildings. Driver cannot just toss the paper into Peacey's yard, because Peacey is too old to bend down and retrieve paper from the ground. And Peacey forbids Driver from riding eir bicycle on the lawn! So Driver parks the bicycle in the street, walks the path to the front door, and deposits newspaper in the mailbox. During this delivery, street traffic is halted. This slow way of working represents PIO.Can performance be increased?
To improve performance by offloading work from the CPU, MMIO is needed. Then, when the CPU is not doing the dirty work, i/o frequency should be increased (a little closer to that mythical 10 MHz). I found failed attempts at improving performance, again for Linux PCMCIA. If they cannot get it working, then I doubt anyone will ever do it for Windows or Macintosh.http://lists.infradead.org/pipermail/linux-pcmcia/2007-April/004473.htmlhttp://lists.infradead.org/pipermail/linux-pcmcia/2007-December/005249.html
I end this write-up with comic relief. A quote by Linus Torvalds on drivers.
Linus Torvalds wrote:
For a driver writer, there is one rule above _all_ other rules:Bonus: where can one find a copy of the spec?
"Reality sucks, deal with it"
That rule is inviolate, and no amount of "I wish", and "it _should_ work
this way" or "…but the documentation says" matters at all.
On the disgusting polluted Internet of today, good information can be more difficult to find than to understand! Here is goods. Pass it on. To the people at affron.narod.ru: Thank you
for hosting the Specification!http://affon.narod.ru/pcmcia.html
content revised 2012-02-11 to add the Linus quote
wording edited 2012-05-02