Hello to all,
I m working on the system which is smilar to the PC. I wanted to read and write each and every sector of the HDD and that also by writing C program on the Linux OS from the user mode. I can read and write the sector from the user mode. But while doing so i just wanted to lock that perticular sector using some critical section.Say suppose i m accessing some sector for writing, then i wanted that no other application can use that sector otherwise my system will get crashed. I know there is one concept called "spinlock" in the linux, but i think that can be used only from the Kernal Mode.
Actually i wanted that my code should work like a scan disk or check disk utility. Please let me know how these utilities r working internally, how they take care of system crash and all??
Thanks and Regards, Nutty