Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to know how is data I/O takes place on flash drives which are typically EEPROM's . I thought so as I was writing a C Program that involves file handling . For a normal HDD , that would involve returning the file pointer and reading or writing data to the disk which would be done by read/write HEAD . While in EEPROM's there is no read/write head , as it's works on mnemonic commands , So how come does the C file handling program works when I apply it to a file on flash drive ?

share|improve this question

1 Answer 1

Unless you're talking about writing a device driver, file handling is the same for a flash drive as a hard drive because the operating system and file system have abstracted away all the low-level details. All you have to worry about is opening a file and reading to or writing from it.

Even at a low level, either device would generally take an address and some bytes to write (or an address to read). Hard drives internally handle the conversion from address to cylinder, track, sector, etc.

share|improve this answer
    
Basically , I want to access the ECC code of each block the file is stored in and flip a random bit in that . So I wanted to access it at that level . In case of HDD I found some boot-speed up utilities like ureadahead use FIEMAP ioctl , but since Flash drive is electronic how would it be helpful in that case ? –  user35704 May 2 '10 at 10:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.