Monday, December 31, 2012

Direct Memory Access

boringus title.. ha.

Yes, but I figured that I might not be the only one facing this issue, so if this helps even just ONE more person, than it would have served its purpose.. ‘paying it forward’ perhaps.. =)

So recently, like just a month back, I decided to do a clean reformat of my Windows partition seeing it had some errors (which I now know what it was but didn’t then). In essence, it decided to slow down so much over night that it was practically impossible to use.. and I couldn’t figure out why. I didn’t install any new program, I didn’t update any stuff, I just left it alone for a night and the next morning it was crawling..

Shortly after the reinstall and what-nots, I got my Windows XP updated to SP3 and got all the updates till then. It was good as new.. nice and fast.

But it didn’t last long.. about 2 weeks back, on a random night when I flicked the computer on, it took FOREVER to load my desktop.. what would typically be a 45 second wait became a 5 minute wait before I saw my desktop spring into life on my monitor.. every application I opened would be first accompanied by a painstakingly long wait and unresponsiveness of the OS altogether. The same bug bit.. and I didn’t know what it was.

So after days of trying to put up with a really slow computer (yes, even trying to fix my iPod), I finally found the problem and solution to it.. the 3 magic letters? DMA.

U see, by default, when set to AUTO under bios, Windows automatically tries to set ur harddisk up for the fastest speed it can access it with. New versions of hardware and firmware allows for DMA mode which is the fastest, now it even has Ultra DMA modes (UDMA).


Configured within the codes of Windows also includes a certain condition by which things change. As a default, when Windows runs into any errors (CRC) reading/writing to the harddisk, it takes note of it. Once u accumulate a total of 6 errors, it decides that the speed’s too fast for its own good and bumps it down a notch. So if u were at UDMA mode, it kicks u down to a slower version of DMA. And if u’re already at the slowest version of DMA, it sets u to use PIO mode.

The difference is staggering.. and it not just affects the harddisk speed, it affects ur CPU speeds as well.

PIO (Programmable Input-Output) mode works by taking up ur precious CPU processing time to read and write into ur harddrive. Think of it as each time Windows wants to read or write to ur harddisk, it has to have the specific instruction from the CPU, byte by byte, word by word. CPU tells it to write, then it writes. So our dear CPU is awfully busy when u want to just say, open an application or save a document.

DMA (Direct Memory Access) mode on the other hand, does the reading/writing independently of the CPU. All the CPU does is to tell a little controller that it wants to read/write and then the CPU is free to process other stuff while the controller does the reading/writing.. and once it’s done, it just sends an interrupt to the CPU to inform it that it’s done. Somewhat like delegating the task to someone else..

So the solution? After digging around I found what works for me and it’s detailed in the following few steps from Microsoft’s support site..

To re-enable the typical, or faster, transfer mode for an affected device:

  1. Double-click Administrative Tools, and then click Computer Management.
  2. Click System Tools, and then click Device Manager.
  3. Expand the IDE ATA/ATAPI Controllers node.
  4. Double-click the controller for which you want to restore the typical DMA transfer mode.
  5. Click the Driver tab.
  6. Click Uninstall.
  7. When the process completes, restart your computer. When Windows restarts, the hard disk controller is re-enumerated and the transfer mode is reset to the default value for each device that is connected to the controller.
And there u have it! My comp’s finally back to the blazing speeds it used to have.. and all in time for the new year =) woot!

DMA modes for both my Harddisk and DVD drive..

Latest earwax?
Mandy Moore’s I wanna be with you..

No comments: