chapter 12 file management systems
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/1.jpg)
Chapter 12
File Management Systems
![Page 2: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/2.jpg)
Outline
Functions and components Storage allocation File manipulation Access controls Migration, backup, recovery
![Page 3: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/3.jpg)
File Management Systems
Logical and Physical Storage Views File Content and Type
![Page 4: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/4.jpg)
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
![Page 5: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/5.jpg)
![Page 6: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/6.jpg)
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.
![Page 7: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/7.jpg)
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.
![Page 8: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/8.jpg)
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.
![Page 9: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/9.jpg)
File Management Systems
![Page 10: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/10.jpg)
Records and Fields
![Page 11: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/11.jpg)
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.
![Page 12: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/12.jpg)
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.
![Page 13: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/13.jpg)
File Management Systems
![Page 14: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/14.jpg)
![Page 15: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/15.jpg)
Directory Content and Structure
Hierarchical Directory Structure Graph Directory Structure
![Page 16: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/16.jpg)
Directory Content and StructureHierarchical 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
![Page 17: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/17.jpg)
Directory Content and Structure Typical file ownership permissions are:
List Read Modify Change
![Page 18: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/18.jpg)
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
![Page 19: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/19.jpg)
Directory Content and Structure
![Page 20: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/20.jpg)
Directory Content and StructureHierarchical Directory Structure
Directories can contain other directories. Directories can not have more than one
parent. Sometimes called a tree structure.
![Page 21: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/21.jpg)
Directory Content and Structure
![Page 22: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/22.jpg)
Directory Content and Structure Example: Traversing directories in
the Windows command shell
![Page 23: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/23.jpg)
Directory Content and Structure
Graph Directory Structure
Files and subdirectories can be contained within multiple directories.
Directory links can form a cycle.
![Page 24: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/24.jpg)
Directory Content and Structure
![Page 25: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/25.jpg)
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
![Page 26: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/26.jpg)
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
![Page 27: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/27.jpg)
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.
![Page 28: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/28.jpg)
Outline
Functions and components Storage allocation File manipulation Access controls Migration, backup, recovery
![Page 29: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/29.jpg)
Storage Allocation
Allocation Units Storage Allocation Tables Blocking and Buffering
![Page 30: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/30.jpg)
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.
![Page 31: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/31.jpg)
Systems Architecture Chapter 12
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.
![Page 32: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/32.jpg)
Systems Architecture Chapter 12
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.
![Page 33: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/33.jpg)
Systems Architecture Chapter 12
Storage Allocation
![Page 34: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/34.jpg)
Outline
Functions and components Storage allocation File manipulation Migration, backup, recovery Access controls Directories
![Page 35: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/35.jpg)
Storage Allocation
![Page 36: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/36.jpg)
Storage Allocation
![Page 37: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/37.jpg)
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.
![Page 38: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/38.jpg)
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.
![Page 39: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/39.jpg)
Storage Allocation
![Page 40: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/40.jpg)
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.
![Page 41: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/41.jpg)
Storage Allocation
![Page 42: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/42.jpg)
Outline
Functions and components Storage allocation File manipulation Access controls Migration, backup, recovery
![Page 43: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/43.jpg)
File Manipulation
File Open and Close Operations Delete and Undelete Operations
![Page 44: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/44.jpg)
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.
![Page 45: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/45.jpg)
File Manipulation
File Open Operation:
1. Locates the file within the directory structure and reads its directory entry.
2. Searches an internal table of open files to see if the file already is open.
3. Ensures that process has sufficient privileges to access the files.
4. Allocates one or more buffers.5. Updates an internal table of open files.
![Page 46: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/46.jpg)
File Manipulation
File Close Operation:
1. Flushing the program’s file I/O buffers to secondary storage.
2. Deallocating buffer memory.
3. Updating the file’s directory entry time stamps.
4. Updating the open file table.
![Page 47: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/47.jpg)
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.
![Page 48: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/48.jpg)
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.
![Page 49: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/49.jpg)
Outline
Functions and components Storage allocation File manipulation Access controls Migration, backup, recovery
![Page 50: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/50.jpg)
Access Controls
For Example:
UNIX defines three access control types: Read Write Execute
![Page 51: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/51.jpg)
Technology Focus – Windows NTFS
![Page 52: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/52.jpg)
Outline
Functions and components Storage allocation File manipulation Access controls Migration, backup, recovery
![Page 53: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/53.jpg)
File Migration, Backup and Recovery File Migration File Backup Transaction Logging File Recovery Fault Tolerance Mirroring
![Page 54: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/54.jpg)
File Migration, Backup and Recovery
File Migration – management technique for secondary storage in which older versions of a file are moved automatically to less costly storage media or devices such as magnetic tape.
![Page 55: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/55.jpg)
File Migration
File Migration, Backup and Recovery
![Page 56: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/56.jpg)
File Backup:
Full Backup
Incremental Backup
Differential Backup
File Migration, Backup and Recovery
![Page 57: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/57.jpg)
Full Backup – the FMS copies all files and directories for an entire storage volume.
Incremental Backup – only the files that have been modified are archived.
Differential Backup – only the changed portions of the files are archived.
File Migration, Backup and Recovery
![Page 58: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/58.jpg)
Transaction Logging
A form of automated file backup. A transaction is any single change to file
contents or attributes. Transaction logging provides a high degree of
protection against data loss due to program or hardware failure.
File Migration, Backup and Recovery
![Page 59: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/59.jpg)
File Recovery
The file management system maintains backup logs to aid in locating backup copies of lost or damages files.
The recovery utility reconstructs as much of the directory and storage allocation data structures as possible and makes a consistency check.
File Migration, Backup and Recovery
![Page 60: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/60.jpg)
Fault Tolerance
Describes methods of securing file content against hardware failure.
File backup, recovery, and transaction logging are forms or protection against disk failure.
File Migration, Backup and Recovery
![Page 61: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/61.jpg)
Mirroring
A fault tolerance technique in which all disk write operations are made simultaneously or concurrently to two different storage devices.
Disk mirroring provides a high degree of protection against data loss with no performance penalty if implemented in hardware.
File Migration, Backup and Recovery
![Page 62: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/62.jpg)
Technology Focus
![Page 63: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/63.jpg)
Technology Focus
![Page 64: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/64.jpg)
Technology Focus
![Page 65: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/65.jpg)
Summary
The file management system (FMS), usually a part of the operating system, manages all aspects of user and program access to secondary storage.
With directories, users can organize the thousands of files stored in a typical computer system.
![Page 66: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/66.jpg)
Summary
Secondary storage units are divided into allocation units, which are typically a few kilobytes in size.
The FMS allocates buffers to support program file I/O.
![Page 67: Chapter 12 File Management Systems](https://reader035.vdocuments.site/reader035/viewer/2022081419/56814d48550346895dba6ed9/html5/thumbnails/67.jpg)
Summary
The FMS enforces access controls when accessing files on behalf of a user or program.
FMSs provide utilities to make backup copies of files and directories and to recover them if needed.