Modern Day File Systems

Discussion in 'Computer Science & Culture' started by darksidZz, Jul 30, 2007.

Thread Status:
Not open for further replies.
  1. darksidZz Valued Senior Member

    Messages:
    4,924
    I had a few questions I was hoping you may be able to answer.

    1. When I copy a file with something like OS X, Windows Vista, the process is simply to right-click and then goto copy, later I paste and presto. The thing I've been wondering is whether there are checks done between the files.

    How can I be certain the file I copied is a duplicate? What if there was some small, minor error, would the OS tell me or indicate this?

    2. Will a modern OS still be able to play a file if it's somehow been corrupted, or read incorrectly? Say I have an .mp3 file, I copy it to a CD, I copy it back.... in theory this is a duplicate, but does the OS compare the 2 files or just perform the copy itself? Would it still play if there was a minor error in copying, a few bytes etc?

    So basically I'm asking are there checks in place to ensure a file doesn't become corrupted while using it in your OS? What if I copy something 10 times, will it be a duplicate each time or is there a possibility it will somehow copy wrong and never tell me?

    I'm somewhat weary because I have alot of songs, and I've copied them probably 20 times updating my DVD+R's. The question is simply whether the files have any chance to become corrupt, and would the corruption of a few bytes be noticable or would the files SEEM ok but really not be?

    Any thoughts?
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. darksidZz Valued Senior Member

    Messages:
    4,924
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. andbna Registered Senior Member

    Messages:
    316
    1. The error you describe is checked internaly by the drive most of the time. There are many schemes of ensuring the data is correct, and have no fears, the drive will varify what it copied is perfect before it deletes the old data (so almost all of the time, if an error occurs, it is handled internaly and fixed.)
    However, for instance a CD drive or floppy may become damaged while you take it out and about, and thus corrupt files. One methode for varifying that it's file contects are correct is a cyclic redundancy check, in which on the disk, the data is re-written as a checksum. If the checksum matches the read-data, than the data is good, but if it doesnt, then your OS will let you know there's a problem (old floppy disks are netorious for this.)

    2. Music and video files are generaly stored on the medium in such a way that data can be damaged and it will still play. for instance, if 1 byte of music is incorrect, at 360kbps you wont notice a difference at all. Data CD's however must be pristine, every bit must be perfect or the program will fail. There are of course other schemes implimented to ensure it is correct, and wont corrupt easily (so your CD can take more of a beating.) So I usualy store music as data on a CD (the compression of an MP3 means I can store more anyways.)

    Thus, file corruption is an issue with portable media (CD's etc...) but usualy only happens during the burning process (so verify the burn before you delete it from your computer) and if it becomes corrupt later due to damage, you should be able to resurface the disk, and get the data off it.
    However corruption is not much of an issue with a HDD. The only time a file corrupts on an HDD is if there is a power outtage, or forced restart during a read/write operation. (usualy recoverable) or the drive itself is failing (which has nothign to do with copying) eg bad sectors forming where data is. However the SMART check when your computer starts usualy tells you theres a problem before then.

    -Andrew
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. leopold Valued Senior Member

    Messages:
    17,455
    every computer that i am familiar with has 2 built in schemes for checking files.
    1. parity, this basically is a scheme to keep all bytes at an odd number of ones and is a rather crude method of error checking.
    2. cyclical redundancy check, this is the more complex of the two. this method can, depending how it is implemented, detect single bit, double bit, and even triple bit, errors, in any block of data.

    find out more about parity here:
    http://en.wikipedia.org/wiki/Parity_bit
    and cyclical redundancy check here:
    http://www.softwarepatch.com/tips/cyclic-redundancy.html
     
    Last edited: Jul 31, 2007
Thread Status:
Not open for further replies.

Share This Page