Wednesday, December 21, 2011

Cyclic Redundancy Check Error in hard disks

This issue can occur in hard disks once you try to copy or move files in the hard disk from one location to another.

It might prompt you to format the disk in order to proceed using the hard disk.

One of the reasons for this issue can be bad sectors in a damaged hard disk. If your file or folder which is corrupted is in a bad sector of the disk, then recovering those data would be difficult or sometimes, IMPOSSIBLE!

To recover your data you can try Windows copy, xcopy commands with options.

To repair the disk, use Windows CHKDSK /R command.

How to troubleshoot this issue?

Monday, December 19, 2011

Instruction prefetching!

Recently we came across an issue where our application will take relatively more time to process in the first time after some idle time than the subsequent executions that happen later.

So, the concept behind that strange behaviour is prefetching

First time the application is loaded from the memory it will cache that for further subsequent processing. Once the application is no longer requested by the user, it will dump the cache.

So, after some idle time it will have to load the application from the memory itself, thus causing some delay in the initial execution.

I might be terribly wrong here, but I was delighted to find out the reason for this weird issue, so I'm posing this for my own reference!

So, read @ your own risk! :P

How to pass arguments to a Windows batch file?

You can pass an argument to Windows batch file (.bat) using %1 in the batch file.
Ex: echo %1

Then, in command prompt you need to give argument (ex: > test.bat Jay) This will replace %1 in the batch file.

This willl display "jay" in command prompt.