DOC PREVIEW
CORNELL CS 414 - File Systems

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

File SystemsAnnounementsStoring InformationFile SystemsFile SystemTranslating from User to System ViewDisk Management PoliciesFile System PatternsGoals for Today: User’s perspective of FSFile NamingFile ExtensionsFile StructureFile AccessFile AttributesFile OperationsFS on diskDirectoriesSingle-level DirectoryTwo-level directoryTree-structured DirectoryPath NamesAcyclic Graph DirectoriesSlide 23File System MountingRemote file system mountingFile ProtectionCategories of UsersLinux Access RightsIssues with LinuxXP ACLsSecurity and Remote File SystemsUnix Remote File System SecuritySpoofingSummaryFile Systems2Announements•I still have prelims–See me after class to receive your prelim3Storing Information•So far… –we have discussed processor, memory, and disk management•How do we make stored information usable?•Applications can store information in the process address space•Why is it a bad idea for permanent storage?–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 crashes!–Multiple process might want to access the same data•Imagine a telephone directory part of one process4File 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!5File System•File System: Layer of OS that transforms block interface of disks (or other block devices) into Files, Directories, etc.•File System Components–Disk Management: collecting disk blocks into files–Naming: Interface to find files by name, not by blocks–Protection: Layers to keep data secure–Reliability/Durability: Keeping of files durable despite crashes, media failures, attacks, etc•User vs. System View of a File–User’s view: •Durable Data Structures–System’s view (system call interface):•Collection of Bytes (UNIX)•Doesn’t matter to system what kind of data structures you want to store on disk!–System’s view (inside OS):•Collection of blocks (a block is a logical transfer unit, while a sector is the physical transfer unit)•Block size  sector size; in UNIX, block size is 4KB6Translating from User to System View•What happens if user says: give me bytes 2—12?–Fetch block corresponding to those bytes–Return just the correct portion of the block•What about: write bytes 2—12?–Fetch block–Modify portion–Write out Block•Everything inside File System is in whole size blocks–For example, getc(), putc()  buffers something like 4096 bytes, even if interface is one byte at a time•From now on, file is a collection of blocksFileSystem7Disk Management Policies•Basic entities on a disk:–File: user-visible group of blocks arranged sequentially in logical space–Directory: user-visible index mapping names to files (next lecture)•Access disk as linear array of sectors. Two Options: –Identify sectors as vectors [cylinder, surface, sector]. Sort in cylinder-major order. Not used much anymore.–Logical Block Addressing (LBA). Every sector has integer address from zero up to max number of sectors.–Controller translates from address  physical position•First case: OS/BIOS must deal with bad sectors•Second case: hardware shields OS from structure of disk•Need way to track free disk blocks–Link free blocks together  too slow today–Use bitmap to represent free space on disk•Need way to structure files: File Header (next lecture)–Track which blocks belong at which offsets within the logical file structure–Optimize placement of files’ disk blocks to match access and usage patterns8File System Patterns•How do users access files?–Sequential Access•bytes read in order (“give me the next X bytes, then give me next, etc”)–Random Access•read/write element out of middle of array (“give me bytes i—j”)•What are file sizes?–Most files are small (for example, .login, .c, .o, .class files, etc)–Few files are large (for example, core files, etc.)–Large files use up most of the disk space and bandwidth to/from disk•May seem contradictory, but a few enormous files are equivalent to an immense # of small files9Goals for Today: User’s perspective of FS•Files–Naming, structure, types, access, attributes, operations•Directories–Structure, path and operations•Mounting file systems•File Protection•On Wednesday,–Implementing internal file system structures10File 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 is11File 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 extensions12File Structure(a) Byte Sequence: unstructured, most commonly used(b) Record sequence: r/w in records, used earlier(c) Complex structures, e.g. tree- Data stored in variable length records; location decided by OS13File 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–2 possible reads •Specify disk block in read•move file marker (seek), then read or …14File 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


View Full Document

CORNELL CS 414 - File Systems

Documents in this Course
Security

Security

49 pages

Processes

Processes

24 pages

Deadlocks

Deadlocks

57 pages

Threads

Threads

5 pages

Threads

Threads

29 pages

Deadlocks

Deadlocks

36 pages

Load more
Download File Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view File Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view File Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?