1 / 15

File Management

File Management . Chapter 12. File System. Permits users to create data collections (files) which has the following properties Long-term existence – stored on disk/LT-storage Sharable between processes – access permissions

brock
Télécharger la présentation

File Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. File Management Chapter 12

  2. File System • Permits users to create data collections (files) which has the following properties • Long-term existence – stored on disk/LT-storage • Sharable between processes – access permissions • Structure – an internal structure convenient for particular applications • Functions that can be performed on files • Create / Delete; Open / Close; Read / Write • File Structure • Field – the basic element of data • Record – a collection of related fields that can be treated as a unit (e.g. an employee record with name, SSN, address, etc.) • Database – a collection of related data and operations defined upon them (usually database management system is independent of the OS) Note that on UNIX systems, the basic file structure is just a stream of bytes (e.g. a C program file does not have fields, records, and so on)

  3. File Management System • Set of system software that provides services to users and applications in the use of files Objectives • Meet the data management needs of the user (e.g. file storage and operations – R/W, create/delete, access rights) • Optimize performance (e.g. maximize throughput/response time) • Provide I/O support for a variety of storage device types • Minimize or eliminate the potential for lost or destroyed data • Provide a standardized set of I/O interface routines • Provide I/O support for concurrent access to files Functions • Identify and locate a selected file • Use a directory to describe the location of all files plus their attributes • I/O is done on a block basis – conversions between blocks and records • Allocate files to free blocks • Manage & organize the free storage

  4. File Organization and Access • File Organization: logical structuring of the records as determined by the way in which they are accessed • Physical Organization: depends on the blocking and file allocation strategy • Criteria for choosing a file organization: • Short access time • Ease of update • Economy of storage • Simple maintenance • Reliability • Different Organizations • The pile • The sequential file • The indexed sequential • The indexed • The direct, or hashed, file

  5. Different file Organizations • The pile • The sequential file • The indexed sequential • The indexed

  6. File Directories • Contains information about files • Attributes • Location • Ownership • Directory itself is a file owned by the OS • Provides mapping between file names and the files themselves

  7. Hierarchical, or Tree-Structured Directory • Master directory with user directories underneath it • Files can be located by following a path from the root • Current directory = working directory • Files are referenced relative to the working directory

  8. UNIX File Management • Types of files • Regular / ordinary • Directory • Special • Named pipes • Links • Symbolic links • Inodes • Index node • Control structure that contains key information for a particular file

  9. File Allocation Methods for Secondary Storage Management • Contiguous allocation • single entry in the File Allocation Table (FAT) - Starting block and the length • External fragmentation may occur  compaction needed

  10. File Allocation (cont.) • Chained allocation • Each block contains a pointer to the next block in the chain • single entry in the FAT - Starting block and the length • No external fragmentation • Best for sequential files – quick access to the record • No accommodation of the principle of locality After consolidation  

  11. File Allocation (cont.) • Indexed allocation • File allocation table contains a one-level index for each file • The index has one entry for each portion allocated to the file • The file allocation table contains block number for the index Indexed Allocation with variable-length portions Indexed Allocation with block portions

  12. Linux Virtual File System • Designed to support a wide variety of file management systems • VFS provides a uniform file system interface to user processes • Represents any conceivable file system’s general feature and behavior • Assumes files are objects that share basic properties regardless of the target system Files on secondary Storage maintained By file system X

More Related