DOC PREVIEW
Chico CSCI 340 - Chapter 10: File­-System Interface

This preview shows page 1-2-15-16-31-32 out of 32 pages.

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

Unformatted text preview:

Chapter 10: File-System InterfaceSlide 2Storage ManagementObjectivesFile ConceptSlide 6File AttributesFile OperationsTypical File OperationsSlide 10File Operations – The Process ItselfOpen File TablesOpen File Basic InformationOpen File LockingFile Locking Example – Java APIFile Locking Example – Java API (cont)File Types – Name, ExtensionSlide 18File StructureFile Structure – not recognizable formats…Internal File StructureSlide 22Slide 23Access MethodsSlide 25Slide 26Sequential-access FileSimulation of Sequential Access on a Direct-access FileExample of Index and Relative FilesSlide 30Slide 31End of Chapter 10.1Chapter 10: File-System InterfaceChapter 10: File-System Interface10.2Silberschatz, Galvin and Gagne ©2005Operating System ConceptsChapter 10: File-System InterfaceChapter 10: File-System InterfaceChapter 10.1File ConceptAccess MethodsChapter 10.2Directory StructureFile-System MountingFile SharingProtection10.3Silberschatz, Galvin and Gagne ©2005Operating System ConceptsStorage ManagementStorage ManagementNew block – Storage ManagementProcess / processor managementMemory management Storage managementDisk storage – the primary medium for primary, online storage.Contains files – collections of related items defined by the file creator.Normally grouped into directories for ease of use and reference.Organized in a variety of structures.Disk Access – sometimes character at a time; blocks at a time.Disk Access – sometimes access sequentially; sometimes randomly.Some file systems dedicated; some sharedSome transfer data asynchronously; others synchronously.Differ greatly in speed – many parameters as cited above.This chapter: the File System Interface.10.4Silberschatz, Galvin and Gagne ©2005Operating System ConceptsObjectivesObjectivesTo explain the function of file systemsTo describe the interfaces to file systemsTo discuss file-system design tradeoffs, including access methods, file sharing, file locking, and directory structuresTo explore file-system protection10.5Silberschatz, Galvin and Gagne ©2005Operating System ConceptsFile ConceptFile ConceptA File System consists of two parts:Files – storage of dataStored on a sequential or some kind of direct access storage device.Directory Structure – organizes the information about the files.Size, location, logical record length, block size, format, ownership, security, paths to files/directories,l etc.A file may be defined as a contiguous logical address space, which is mapped by the operating system onto some kind of physical devices.Almost all storage devices are non-volatileMagnetic tapesMagnetic disksOptical disks,Jump drivesCDs / DVDs ….Many more…10.6Silberschatz, Galvin and Gagne ©2005Operating System ConceptsFile ConceptFile ConceptTo a user, a file is the smallest allocation of logical secondary storage. All data is written to a ‘file.’Data may be numeric, alphabetic, alphanumeric, or binary.Can be free form (text) Can be rigidly formatted – records.Can be somewhere in between – variable length recordsBright Lights files overseas?Generally, a file is a sequence of bits, bytes, lines, or records whose meaning is interpreted by the creator of the file and how it is used. Files – data files – many forms and structuresI like to differentiate between a file’s organization and how it may be accessed.They are not the same, as we shall see.Files - program files – source programs, object files – understandable by the linker and executable files – ready for loader to bring into memory.These files, when created, contain relocation and linkage information that linkers and loaders need to create executables and/or to load the file for execution.Much of the data about programs and data files revolves simply as how they are used!10.7Silberschatz, Galvin and Gagne ©2005Operating System ConceptsFile AttributesFile AttributesName – This is the only information kept in human-readable formIs independent of the process and system that created it.But names often are constrained by the operational environment.NIHPOO……. Each positions often means something very important in a commercial (non-academic environment.)Identifier – unique tag (number) identifies file within file systemNIHP00; System Code IH; Source programs: ‘N’; subsystem ‘P’Programs within subsystem: 00, 01, ….Type – needed for systems that support different types.c, .java. .cpp, .exe, .dll, .dat, .wpd, .doc, etc. .xls, .css. ….And bringing up certain ‘processes’ to process these files … by type.Location – pointer to file location on deviceSize – current file size - generally in bytes or blocks, especially blocks.Protection – controls who can do reading, writing, executingYes! Read, write, execute, Time, date, and user identification – data for protection, security, and usage monitoring – Maybe date last accesses; OPR; security; Information about files like those mentioned above are kept in the directory structure, which is maintained on the diskNames: example: VTOC (Volume Table of Contents – IBM) or some general directory structure name…10.8Silberschatz, Galvin and Gagne ©2005Operating System ConceptsFile OperationsFile OperationsFile is an “abstract data type.”This means it has data which will be unique to its implementation (realization and use), andOperations that can be performed on the data – dependent upon how it is implemented.Let’s look at the six basic functions that can be performed on most files.10.9Silberschatz, Galvin and Gagne ©2005Operating System ConceptsTypical File OperationsTypical File OperationsCreate – Need to allocate spaceAdd an entry in the disk directory; load data onto the storage device.Write – “System call” supplies name of file and data to be written.A pointer usually needs to be available to point to the place where the next ‘item’ is to be written; pointer updated.Read – Another system call specifies file name, where in memory the read data is to be placed, and, using a read pointer, locates the data to be read.Pointer needs to be updated to point to the ‘next’ item to be read.Pointer for read and write is called a ‘current file-position


View Full Document

Chico CSCI 340 - Chapter 10: File­-System Interface

Download Chapter 10: File­-System Interface
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 Chapter 10: File­-System Interface 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 Chapter 10: File­-System Interface 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?