filesystems-10 - File Systems Storing Information...

Info icon This preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
File Systems
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Storing Information Applications can store it in the process address space Why is it a bad idea? Size is limited to size of virtual address space May not be sufficient for airline reservations, banking, etc. The data is lost when the application terminates Even when computer doesn’t crash! Multiple process might want to access the same data Imagine a telephone directory part of one process
Image of page 2
File Systems 3 criteria for long-term information storage: Should be able to store very large amount of information Information must survive the processes using it Should provide concurrent access to multiple processes Solution: Store information on disks in units called files Files are persistent, and only owner can explicitly delete it Files are managed by the OS File Systems: How the OS manages files!
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
File Naming Motivation: Files abstract information stored on disk You do not need to remember block, sector, … We have human readable names How does it work? Process creates a file, and gives it a name Other processes can access the file by that name Naming conventions are OS dependent Usually names as long as 255 characters is allowed Digits and special characters are sometimes allowed MS-DOS and Windows are not case sensitive, UNIX family is
Image of page 4
File Extensions Name divided into 2 parts, second part is the extension On UNIX, extensions are not enforced by OS However C compiler might insist on its extensions These extensions are very useful for C Windows attaches meaning to extensions Tries to associate applications to file extensions
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Internal File Structure (a) Byte Sequence: unstructured (b) Record sequence: r/w in records, relates to sector sizes (c) Complex structures, e.g. tree - Data stored in variable length records; OS specific meaning of each file
Image of page 6
File Access Sequential access read all bytes/records from the beginning cannot jump around, could rewind or forward convenient when medium was magnetic tape Random access bytes/records read in any order essential for database systems
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
File Attributes File-specific info maintained by the OS File size, modification date, creation time, etc. Varies a lot across different OSes Some examples: Name – only information kept in human-readable form Identifier – unique tag (number) identifies file within file system Type – needed for systems that support different types Location – pointer to file location on device Size – current file size Protection – controls who can do reading, writing, executing Time, date, and user identification – data for protection, security, and usage monitoring
Image of page 8
Basic File System Operations Create a file Write to a file Read from a file Seek to somewhere in a file Delete a file Truncate a file
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
FS on disk Could use entire disk space for a FS, but A system could have multiple FSes
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern