filesystems-10 - File Systems Storing Information...

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

View Full Document Right Arrow Icon
File Systems
Background image of page 1

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

View Full DocumentRight 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
Background 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!
Background image of page 3

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

View Full DocumentRight 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
Background 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
Background image of page 5

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

View Full DocumentRight 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
Background 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
Background image of page 7

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

View Full DocumentRight 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
Background 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
Background image of page 9

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

View Full DocumentRight Arrow Icon
FS on disk Could use entire disk space for a FS, but
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2008 for the course CS 4410 taught by Professor Vollset during the Fall '07 term at Cornell University (Engineering School).

Page1 / 69

filesystems-10 - File Systems Storing Information...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online