Filesystems-10 - File Systems Storing Information • Applications can store it in the process address space • Why is it a bad idea – Size is

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: File Systems 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 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! 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 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 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 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 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 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 FS on disk • Could use entire disk space for a FS, but...
View Full Document

This note was uploaded on 12/07/2011 for the course CS 4410 taught by Professor Vollset during the Spring '07 term at Cornell University (Engineering School).

Page1 / 69

Filesystems-10 - File Systems Storing Information • Applications can store it in the process address space • Why is it a bad idea – Size is

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