OPERATING SYSTEMS
PREPARED BY
N.RUBA.,MCA., M.PHIL.,(Ph.D).,
ASSISTANT PROFESSOR,
DEPARTMENT OF COMPUTER APPLICATIONS’
BONSECOURS COLLEGE FOR WOMEN,
THANJAVUR-6
1
Understanding Operating
Systems 7th Edition
File Management
Introduction
 File Manager’s efficiency directly affected by:
 How the system’s files are organized
 How files are stored
 How each file’s records are structured
 How user access to all files is protected
3
The File Manager
 File management system
 Software
 File access responsibilities
 Creating, deleting, modifying, controlling
4
Responsibilities of the File
Manager
 Four tasks
 File storage tracking
 Policy implementation
 Determine where and how files are stored
 Efficiently use available storage space
 Provide efficient file access
 File allocation if user access cleared
 Record file use
 File deallocation
 Return file to storage
 Communicate file availability
5
Responsibilities of the File
Manager (cont'd.)
 Policy determines:
 File storage location
 System and user access
 Uses device-independent commands
 Access to material
 Two factors
 Factor 1: flexibility of access to information
 Share files
 Provide distributed access
 Allow users to browse public directories
6
Responsibilities of the File
Manager (cont'd.)
 Factor 2: subsequent protection
 Prevent system malfunctions
 Security checks
 Account numbers and passwords
 File allocation
 Activate secondary storage device, load file into memory,
and update records
 File deallocation
 Update file tables, rewrite file (if revised), and notify
waiting processes of file availability
7
Definitions
 Field
 Group of related bytes
 Identified by user (name, type, size)
 Record
 Group of related fields
 File
 Group of related records
 Information used by specific application programs
 Report generation
 Flat file
 No connections to other files; no dimensionality
8
Definitions (cont'd.)
 Database
 Group of related files
 Interconnected at various levels
 Give users flexibility of access to stored data
 Program files
 Contain instructions
 Data files
 Contain data
 Directories (folders)
 Listings of filenames and their attributes
9
10
Files are made up of records. Records consist of files
Interacting with the File
Manager
 Most common user commands
 OPEN
 DELETE
 RENAME
 COPY
11
Interacting with the File
Manager
 Device-independent
 Physical location: knowledge not needed
 Cylinder, surface, sector
 Device medium: knowledge not needed
 Tape, magnetic disk, optical disc, flash storage
 Network knowledge: not needed
12
Interacting with the File
Manager (cont'd.)
 Logical commands
 Broken into lower-level signals
 Example: READ
 Move read/write heads to record cylinder
 Wait for rotational delay (sector containing record passes
under read/write head)
 Activate appropriate read/write head and read record
 Transfer record to main memory
 Send flag indicating free device for another request
 System monitors for error conditions
13
Typical Volume Configuration
 Volume
 Secondary storage unit (removable, nonremovable)
 Multi-file volume
 Contains many files
 Multi-volume files
 Extremely large files spread across several volumes
 Volume name
 File manager manages
 Easily accessible
 Innermost part of CD, beginning of tape, first sector of
outermost track
14
Typical Volume Configuration
(cont'd.)
15
The volume descriptor, which is stored at the beginning of each volume,
includes this vital information about the storage unit.
Typical Volume Configuration
(cont'd.)
 Master file directory (MFD)
 Stored immediately after volume descriptor
 Lists
 Names and characteristics of every file in volume
 File names (program files, data files, system files)
 Subdirectories
 If supported by file manager
 Remainder of volume
 Used for file storage
16
Typical Volume Configuration
(cont'd.)
 Single directory per volume
 Supported by early operating systems
 Disadvantages
 Long search time for individual file
 Directory space filled before disk storage space filled
 Users cannot create subdirectories
 Users cannot safeguard their files
 Each program needs unique name
 Even those serving many users
17
Introducing Subdirectories
 File managers
 Create MFD for each volume
 Contains file and subdirectory entries
 Subdirectory
 Created upon account opening
 Treated as file
 Flagged in MFD as subdirectory
 Unique properties
 Improvement over single directory scheme
 Problems remain: unable to logically group files
18
Introducing Subdirectories
(cont'd.)
 File managers today
 Users create own subdirectories (folders)
 Related files grouped together
 Implemented as upside-down tree
 Efficient system searching of individual directories
 May require several directories to reach file
19
20
(figure 8.4)
File directory tree structure. The “root” is the MFD shown at the top, each node is
a directory file, and each branch is a directory entry pointing to either another
directory or to a real file. All program and data files subsequently added to the tree
are the leaves, represented by circles. © Cengage Learning 2014
Introducing Subdirectories
(cont'd.)
 File descriptor
 Filename: each must be unique
 File type: organization and usage
 System dependent
 File size: for convenience
 File location
 Identifies first physical block (or all blocks)
 Date and time of creation
 Owner
 Protection information: access restrictions
 Record size: fixed size, maximum size
21
File-Naming Conventions
 Filename components
 Relative filename and extension
 Complete filename (absolute filename)
 Includes all path information
 Relative filename
 Name without path information
 Appears in directory listings, folders
 Provides filename differentiation within directory
 Varies in length
 One to many characters
 Operating system specific
22
23
Fig: File name parameters for several operating systems.
File-Naming Conventions
(cont'd.)
 Extensions
 Appended to relative filename
 Two to four characters
 Separated from relative filename by period
 Identifies file type or contents
 Example
 BASIA_TUNE.AVI
 Unknown extension
 Requires user intervention
24
File-Naming Conventions
(cont'd.)
 Operating system specifics
 Windows
 Drive label and directory name, relative name, and extension
 UNIX/Linux
 Forward slash (root), first subdirectory, sub-subdirectory, file’s
relative name
25

OPERATING SYSTEM

  • 1.
    OPERATING SYSTEMS PREPARED BY N.RUBA.,MCA.,M.PHIL.,(Ph.D)., ASSISTANT PROFESSOR, DEPARTMENT OF COMPUTER APPLICATIONS’ BONSECOURS COLLEGE FOR WOMEN, THANJAVUR-6 1
  • 2.
    Understanding Operating Systems 7thEdition File Management
  • 3.
    Introduction  File Manager’sefficiency directly affected by:  How the system’s files are organized  How files are stored  How each file’s records are structured  How user access to all files is protected 3
  • 4.
    The File Manager File management system  Software  File access responsibilities  Creating, deleting, modifying, controlling 4
  • 5.
    Responsibilities of theFile Manager  Four tasks  File storage tracking  Policy implementation  Determine where and how files are stored  Efficiently use available storage space  Provide efficient file access  File allocation if user access cleared  Record file use  File deallocation  Return file to storage  Communicate file availability 5
  • 6.
    Responsibilities of theFile Manager (cont'd.)  Policy determines:  File storage location  System and user access  Uses device-independent commands  Access to material  Two factors  Factor 1: flexibility of access to information  Share files  Provide distributed access  Allow users to browse public directories 6
  • 7.
    Responsibilities of theFile Manager (cont'd.)  Factor 2: subsequent protection  Prevent system malfunctions  Security checks  Account numbers and passwords  File allocation  Activate secondary storage device, load file into memory, and update records  File deallocation  Update file tables, rewrite file (if revised), and notify waiting processes of file availability 7
  • 8.
    Definitions  Field  Groupof related bytes  Identified by user (name, type, size)  Record  Group of related fields  File  Group of related records  Information used by specific application programs  Report generation  Flat file  No connections to other files; no dimensionality 8
  • 9.
    Definitions (cont'd.)  Database Group of related files  Interconnected at various levels  Give users flexibility of access to stored data  Program files  Contain instructions  Data files  Contain data  Directories (folders)  Listings of filenames and their attributes 9
  • 10.
    10 Files are madeup of records. Records consist of files
  • 11.
    Interacting with theFile Manager  Most common user commands  OPEN  DELETE  RENAME  COPY 11
  • 12.
    Interacting with theFile Manager  Device-independent  Physical location: knowledge not needed  Cylinder, surface, sector  Device medium: knowledge not needed  Tape, magnetic disk, optical disc, flash storage  Network knowledge: not needed 12
  • 13.
    Interacting with theFile Manager (cont'd.)  Logical commands  Broken into lower-level signals  Example: READ  Move read/write heads to record cylinder  Wait for rotational delay (sector containing record passes under read/write head)  Activate appropriate read/write head and read record  Transfer record to main memory  Send flag indicating free device for another request  System monitors for error conditions 13
  • 14.
    Typical Volume Configuration Volume  Secondary storage unit (removable, nonremovable)  Multi-file volume  Contains many files  Multi-volume files  Extremely large files spread across several volumes  Volume name  File manager manages  Easily accessible  Innermost part of CD, beginning of tape, first sector of outermost track 14
  • 15.
    Typical Volume Configuration (cont'd.) 15 Thevolume descriptor, which is stored at the beginning of each volume, includes this vital information about the storage unit.
  • 16.
    Typical Volume Configuration (cont'd.) Master file directory (MFD)  Stored immediately after volume descriptor  Lists  Names and characteristics of every file in volume  File names (program files, data files, system files)  Subdirectories  If supported by file manager  Remainder of volume  Used for file storage 16
  • 17.
    Typical Volume Configuration (cont'd.) Single directory per volume  Supported by early operating systems  Disadvantages  Long search time for individual file  Directory space filled before disk storage space filled  Users cannot create subdirectories  Users cannot safeguard their files  Each program needs unique name  Even those serving many users 17
  • 18.
    Introducing Subdirectories  Filemanagers  Create MFD for each volume  Contains file and subdirectory entries  Subdirectory  Created upon account opening  Treated as file  Flagged in MFD as subdirectory  Unique properties  Improvement over single directory scheme  Problems remain: unable to logically group files 18
  • 19.
    Introducing Subdirectories (cont'd.)  Filemanagers today  Users create own subdirectories (folders)  Related files grouped together  Implemented as upside-down tree  Efficient system searching of individual directories  May require several directories to reach file 19
  • 20.
    20 (figure 8.4) File directorytree structure. The “root” is the MFD shown at the top, each node is a directory file, and each branch is a directory entry pointing to either another directory or to a real file. All program and data files subsequently added to the tree are the leaves, represented by circles. © Cengage Learning 2014
  • 21.
    Introducing Subdirectories (cont'd.)  Filedescriptor  Filename: each must be unique  File type: organization and usage  System dependent  File size: for convenience  File location  Identifies first physical block (or all blocks)  Date and time of creation  Owner  Protection information: access restrictions  Record size: fixed size, maximum size 21
  • 22.
    File-Naming Conventions  Filenamecomponents  Relative filename and extension  Complete filename (absolute filename)  Includes all path information  Relative filename  Name without path information  Appears in directory listings, folders  Provides filename differentiation within directory  Varies in length  One to many characters  Operating system specific 22
  • 23.
    23 Fig: File nameparameters for several operating systems.
  • 24.
    File-Naming Conventions (cont'd.)  Extensions Appended to relative filename  Two to four characters  Separated from relative filename by period  Identifies file type or contents  Example  BASIA_TUNE.AVI  Unknown extension  Requires user intervention 24
  • 25.
    File-Naming Conventions (cont'd.)  Operatingsystem specifics  Windows  Drive label and directory name, relative name, and extension  UNIX/Linux  Forward slash (root), first subdirectory, sub-subdirectory, file’s relative name 25