DOC PREVIEW
CORNELL CS 414 - File Systems

This preview shows page 1-2-3-4-5-32-33-34-35-65-66-67-68-69 out of 69 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 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 69 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 69 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

File SystemsStoring InformationFile SystemsFile NamingFile ExtensionsInternal File StructureFile AccessFile AttributesBasic File System OperationsFS on diskDirectoriesSingle-level DirectoryTwo-level directoryTree-structured DirectoryPath NamesAcyclic Graph DirectoriesSlide 17File System MountingRemote file system mountingFile ProtectionCategories of UsersLinux Access RightsIssues with LinuxXP ACLsSecurity and Remote File SystemsUnix Remote File System SecuritySpoofingFile System ImplementationImplementing File OperationsSlide 30Other file operationsMultiple users of a fileThe File Control Block (FCB)Files Open and ReadPowerPoint PresentationSlide 36File System LayoutStoring FilesContiguous AllocationSlide 40Linked List AllocationSlide 42MS-DOS file systemFAT DiscussionIndexed AllocationUFS - Unix File SystemUnix inodesImplementing DirectoriesDirectory SearchShared FilesHard vs Soft LinksSlide 52Managing Free Disk SpaceTracking free spaceDisk Space ManagementManaging Disk QuotasEfficiency and PerformanceFile System ConsistencyA changing problemInconsistent FS examplesCheck Directory SystemLog Structured File SystemsSlide 63FS PerformanceBlock Cache ReplacementOther ApproachesStorage Area Networks (SANs)Examples of SAN issuesSlide 69File SystemsStoring 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 processFile 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 isFile 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 extensionsInternal 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 fileFile 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 systemsFile 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 monitoringBasic 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 fileFS on disk•Could use entire disk space for a FS, but–A system could have multiple FSes–Want to use some disk space for swap space•Disk divided into partitions, slices or minidisks–Chunk of storage that holds a FS is a volume–Directory structure maintains info of all files in the volume•Name, location, size, type, …Directories•Directories/folders keep track of files–Is a symbol table that translates file names to directory entries–Usually are themselves files•How to structure the directory to optimize all of the following:–Search a file–Create a file–Delete a file–List directory–Rename a file–Traversing the FSF 1F 2F 3F 4F nDirectoryFilesSingle-level Directory•One directory for all files in the volume–Called root directory–Used in early PCs, even the first supercomputer CDC 6600•Pros: simplicity, ability to quickly locate files•Cons: inconvenient naming (uniqueness, remembering all)Two-level directory•Each user has a separate directory•Solves name collision, but what if user has lots of files•May not allow a user to access other users’ filesTree-structured Directory•Directory is now a tree of arbitrary height–Directory contains files and subdirectories–A bit in directory entry differentiates files from subdirectoriesPath Names•To access a file, the user should either:–Go to the directory where file resides, or–Specify the path where the file is•Path names are either absolute or relative–Absolute: path of file from the root directory–Relative: path from the current working directory•Most OSes have two special entries in each directory:–“.” for current directory and “..” for parentAcyclic Graph Directories•Share subdirectories or filesAcyclic Graph Directories•How to implement shared files and subdirectories:–Why not copy the file?–New directory entry, called Link (used in UNIX)•Link is a pointer to another file or subdirectory•Links are ignored when traversing FS•ln in UNIX, fsutil in Windows for hard links•ln –s in UNIX, shortcuts in Windows for soft links•Issues?–Two different names (aliasing)–If dict deletes count  dangling pointer•Keep backpointers of links for each file•Leave the link, and delete only when accessed later•Keep reference count of each fileFile System Mounting•Mount allows two FSes to be merged into one–For example you insert your floppy into the


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?