1 / 67

Chapter 12 File Management Systems

Chapter 12 File Management Systems. Outline. Functions and components Storage allocation File manipulation Access controls Migration, backup, recovery. File Management Systems. Logical and Physical Storage Views File Content and Type. File Management Systems.

arvin
Download Presentation

Chapter 12 File Management Systems

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. Chapter 12File Management Systems

  2. Outline • Functions and components • Storage allocation • File manipulation • Access controls • Migration, backup, recovery

  3. File Management Systems • Logical and Physical Storage Views • File Content and Type

  4. File Management Systems • A File Management System (FMS) is implement in layers: • Command layer or application program • File control • Storage I/O control • Storage devices

  5. File Management Systems • Storage devices – interact with the bus and with operating system device drivers to transfer data between storage devices and memory. • Storage I/O control – accesses storage locations and manages data movement between storage devices and memory.

  6. File Management Systems • File Control – provides a set of service functions for manipulating files and directories. • Command layer or application program – users perform common file management functions such as copying, moving and renaming.

  7. File Management Systems Logical and Physical Storage Views Logical Storage Views – viewed by users are a collection of files organized within directories and storage volumes. Physical Storage Views – a collection of physical storage locations organized as a linear address space.

  8. File Management Systems

  9. Records and Fields

  10. File Management Systems File Content and Type • A file can store many different data types including text, numbers, complex data structures, and executable instructions. • Modern file management systems provide a framework to support additional file types.

  11. File Management Systems File Content and Type • File type normally is declared when a file is created. • In the UNIX file management system, the file type is stored within the directory. In the Windows file management system, the file type is declared through the extension.

  12. File Management Systems

  13. Directory Content and Structure • Hierarchical Directory Structure • Graph Directory Structure

  14. Directory Content and Structure Hierarchical Directory Structure • A directory contains information about files and other directories. • Typical directory contents include: • Name Size Time stamp • File Type Ownership • Location Access controls

  15. Directory Content and Structure • Typical file ownership permissions are: • List • Read • Modify • Change

  16. Directory Content and Structure • Time stamps include: • When the file was created • When the file most recently was read • When the file most recently was written • When the file last was backed up

  17. Directory Content and Structure

  18. Directory Content and Structure Hierarchical Directory Structure • Directories can contain other directories. • Directories can not have more than one parent. • Sometimes called a tree structure.

  19. Directory Content and Structure

  20. Directory Content and Structure • Example: Traversing directories in the Windows command shell

  21. Directory Content and Structure Graph Directory Structure • Files and subdirectories can be contained within multiple directories. • Directory links can form a cycle.

  22. Directory Content and Structure

  23. Paths • Where do operating systems look for executable files? • In the current directory • In the path • If directories are missing or in the wrong order, OS can’t find the right files • Example: Windows PATH

  24. Paths and Environment Variables • Some programs use environment variables to store path information • If directories are missing or in the wrong order, programs can’t find the right files • Example: Java and the CLASSPATH

  25. Paths, INI Files, Programs … • Paths are all over the place! • They are in initialization files, programs, the Windows registry, … • You need to be comfortable with absolute and relative file specs.

  26. Outline • Functions and components • Storage allocation • File manipulation • Access controls • Migration, backup, recovery

  27. Storage Allocation • Allocation Units • Storage Allocation Tables • Blocking and Buffering

  28. Storage Allocation Allocation Units • An allocation unit is the smallest number of secondary storage bytes that can be allocated to a file. • Allocation units can not be smaller than the unit of data transfer between the storage device and controller, which is normally called a block.

  29. Chapter 12 Systems Architecture Storage Allocation Allocation unit size is usually a tradeoff among: • Efficient use of secondary storage space for files. • Size of storage allocation data structures. • Efficiency of storage allocation procedures.

  30. Chapter 12 Systems Architecture Storage Allocation Storage Allocation Tables A storage allocation table is a data structure that records which allocation units are free and which belong to files.

  31. Chapter 12 Systems Architecture Storage Allocation

  32. Outline • Functions and components • Storage allocation • File manipulation • Migration, backup, recovery • Access controls • Directories

  33. Storage Allocation

  34. Storage Allocation

  35. Storage Allocation Blocking and Buffering • A logical record is a collection of data items, or fields, that is accessed by an application program as a single unit. • A physical record is the unit of storage transferred between the device controller and memory in a single operation.

  36. Storage Allocation Blocking and Buffering • Logical record grouping within physical records is called blocking. • If a physical record contains just one logical record, then the file is said to be unblocked.

  37. Storage Allocation

  38. Storage Allocation Blocking and Buffering: • A FMS uses buffers in primary storage to store data temporarily as it moves between programs and secondary storage devices. • A buffer is a scratchpad for extracting logical records from physical records.

  39. Storage Allocation

  40. Outline • Functions and components • Storage allocation • File manipulation • Access controls • Migration, backup, recovery

  41. File Manipulation • File Open and Close Operations • Delete and Undelete Operations

  42. File Manipulation File Open and Close Operations • The FMS must perform several tasks, collectively called a file open operation, before an application program can read or write a file’s contents.

  43. File Manipulation File Open Operation: • Locates the file within the directory structure and reads its directory entry. • Searches an internal table of open files to see if the file already is open. • Ensures that process has sufficient privileges to access the files. • Allocates one or more buffers. • Updates an internal table of open files.

  44. File Manipulation File Close Operation: • Flushing the program’s file I/O buffers to secondary storage. • Deallocating buffer memory. • Updating the file’s directory entry time stamps. • Updating the open file table.

  45. File Manipulation Delete and Undelete Operations • In most file management systems, files are not removed immediately from secondary storage when they are deleted. • The file’s storage allocation units are marked as free and its directory entry is marked as unused. • A user might be able to use the undelete operation to recover the file.

  46. Access Controls • A File Management System helps prevent loss, corruption and unauthorized access to files. • The operating system is used to identify and authenticate users and their processes. • The file access is authenticated through id’s and passwords.

  47. Outline • Functions and components • Storage allocation • File manipulation • Access controls • Migration, backup, recovery

  48. Access Controls For Example: UNIX defines three access control types: • Read • Write • Execute

More Related