Oct30th

System IO too slow

I went to my home town last week i wanted to burn a few dvd`s so i started burning one, it was taking a long time even though i was burning at 16x!
so i got suspecious and started checking for any other problems, i noticed that even copying a file of small size to the harddisk from my ipod took a long time.
DMA was my immediate suspect, DMA allows fast data transfers since it doesnt involve the processor.
so navigate to device manager (Run > devmgr.msc) and double click on the IDE controller, open the Advanced tab and see under what mode it is running.

my harddisk was running in PIO mode, even though 'use DMA if available' was selected! so uninstalled the drivers and reinstalled them which made it work.
Now it is happily running at Ultra DMA mode 5 :)
P.S: the screenshot is not the actual screen of my home computer ,it is that of my laptop. i added it for reference.

Oct22nd

Secret Chips anyone? (no, not the eatable types)

There is this long time conspiracy that all the PCB`s in the world contain a hidden microchip implanted by PRC of China,
They can “activate” this chip whenever they want and voila have complete access to your hard drive.
Sounds theoretically plausible considering the fact that almost every gadget is assembled there.
Consider the implications of this, a country having access to every other countries confidential and military data.

Read more about this here

I for one don’t believe this is possible, hiding a complete microprocessor is totally impossible and would have showed up at least in the quality checks or some hacker would have noticed the extra processor which doesn’t officially do anything.

The other possibility is adding extra functionality to a existing processor, say hiding it in the north bridge chip. Sounds plausible, but there are a few problems to this theory as well. To be able to access any hard disk and make connections to the internet listening for the ‘activation signal” needs a complicated low level system (basically a mini computer running within a main computer!) and hiding such a system within a simple RAID controller or a network gear without anybody noticing seems highly unlikely.

Oct18th

Problem with new line characters in Unix

Yogesh Java Read on

I faced a peculiar problem few days back, we have a java program which reads a text file containing multiple bank records, splits it into chunks and parallel processes all the records.

The program runs fin on windows, but when i run it on Unix it intermittantly gave problems.

On analysing the logs i found that the the records were not getting seperated properly! The records are split using substring function based on the record length, we had added the newline character length into the equation. we had set it as 1 previously(for unix it is 1), i changed it to 2 and bravo it worked.

To avoid running into these type of issues i used System.getProperty(‘line.separator) to get the newline character and subsequently its length.So my initial guess was that this was not returning the value correctly.

On further analysis it turns out the problem was the text file.

see, on windows a line character is actually two characters a carriage return + a Line Feed

Newline_win

However on Unix it is only ‘Line Feed’

Newline_unix

to add to the confusion on mac it is only ‘Carriage Return’

Newline_mac

The text file we were sending was edited on a windows box so it had two newline characters , so we changed the file to Unix format and all is well now.

Tags: ,

Categories

Monthly Archives