SlideShare a Scribd company logo
Topic Outline
FILE SYSTEM DIRECTORY
File definition
File Systems and Disks
File Attributes
File types
File operations
Method of accessing file
Directory definition
Directory structures
Directory Operations
Information Elements of
a File Directory
04/16/171 abdalla ali khamis abdallalikha@gmail.com
File
2
A file is a named collection of related information
that is recorded on secondary storage(Abraham
Silberschatz).
Data files are numeric, alphabetic, alphanumeric,
or binary. Files may be free form like text files or
be formatted rigidly . r (Abraham Silberschatz)
04/16/17abdalla ali khamis abdallalikha@gmail.com
File Systems and Disks
3
User view is a named collection of data which are store
in secondary storage medium.
OS & file system view File is collection of disk blocks i.e.,
a container in which File System maps file names and offsets
to disk blocks
04/16/17abdalla ali khamis abdallalikha@gmail.com
File Attributes
4
Name.
Identifier.
Type.
Location.
Size.
Protection.
 Locks
Dates
04/16/17abdalla ali khamis abdallalikha@gmail.com
FILE TYPES
04/16/175 abdalla ali khamis abdallalikha@gmail.com
FILE OPERATIONS
6
 Creating a file
 Writing a file
 Reading a file.
 Repositioning within a file
 Deleting a file
 Truncating a file
04/16/17abdalla ali khamis abdallalikha@gmail.com
Methods for Accessing Files
Sequential access: Sequential access is the one in
which the record are access in the form of sequence
whereby read all bytes or records in order in which
read one record after the other from the beginning in
the file.
Random access: Random access in the one in which
the record can be read un any order.
Indexed sequential: Indexed sequential access is the
one in which file is access items in file based on the
contents of (part of) an item in the file.
04/16/177 abdalla ali khamis abdallalikha@gmail.com
Directory – A Special Kind of File
8
A tool for users & applications to organize and find
files
User-friendly names
Names that are meaningful over long periods of time
The data structure for OS to locate files (i.e.,
containers) on disk
04/16/17abdalla ali khamis abdallalikha@gmail.com
Directory structures
9
o Single level
One directory per system, one entry pointing to each file
Small, single-user or single-use systems
PDA, cell phone, etc.
o Two-level
Single “master” directory per system
Each entry points to one single-level directory per user
Uncommon in modern operating systems
o Hierarchical
Any directory entry may point to
Individual file
Another directory
Common in most modern operating systems
04/16/17abdalla ali khamis abdallalikha@gmail.com
Directory Operations
10
o Create:
Make a new directory
o Add, Delete entry:
o Invoked by file create & destroy, directory create & destroy
o Find, List:
o Search or enumerate directory entries
o Rename:
o Change name of an entry without changing anything else about it
o Link, Unlink:
o Add or remove entry pointing to another entry elsewhere
o Introduces possibility of loops in directory graph
o Destroy:
o Removes directory; must be empty
04/16/17abdalla ali khamis abdallalikha@gmail.com
Information Elements of a File
Directory: basic information
File Name:
This is a name as chosen by the creator of the file.
File Type:
A file type can be of the text type, binary, load module, and
many other types.
File Organization:
File organization is for systems that support different
organizations.
04/16/1711 abdalla ali khamis abdallalikha@gmail.com
Information Elements of a File
Directory: Address Information
o Volume:This component indicates a device on which
the file is stored
o Starting Address:This is a starting physical address
on secondary storage (for example: cylinder, track,
and block number on disk)
o Size Used:This is a current size of the file. It can be
measured in bytes, words, or blocks.
o Size Allocated:This is the maximum size a file can
have.
04/16/1712 abdalla ali khamis abdallalikha@gmail.com
Information Elements of a File
directory: access control information
Owner:
This is a user who is assigned control of the file. The
owner may be able to grant or deny access (to the file)
to other users and to change these privileges.
Access Information:
A simple version of this element would include the
user’s name and password for each authorized user.
Permitted Actions:
This is for controlling reading, writing, executing, and
transmitting over a network.
04/16/1713 abdalla ali khamis abdallalikha@gmail.com
Information Elements of a File
Directory: usage information
o Date Created
o Identity of Creator
o Date Last Read Access
o Identity of Last Reader
o Date Last Modified
o Identity of Last Modifier
o Date of Last Backup
o Current Usage:
04/16/1714 abdalla ali khamis abdallalikha@gmail.com
Study Questions
1. Why do some systems keep track of the type of a file,
while others leave it to the user or simply do not
implement multiple file types?
2. Explain the purpose of the open and close operations.
3. List advantages and advantages of operating system
“knowing” and supporting many file types
4. Why would we want a subdirectory in our account?
04/16/1715 abdalla ali khamis abdallalikha@gmail.com

More Related Content

What's hot

File Management
File ManagementFile Management
File Management
Ramasubbu .P
 
File system structure
File system structureFile system structure
File system structure
sangrampatil81
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53myrajendra
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 IntroductionRico
 
Degonto file management
Degonto file managementDegonto file management
Degonto file management
Degonto Islam
 
File structures
File structuresFile structures
File structures
Shyam Kumar
 
Sql server lesson3
Sql server lesson3Sql server lesson3
Sql server lesson3
Ala Qunaibi
 
Switching & Multiplexing
Switching & MultiplexingSwitching & Multiplexing
Switching & Multiplexing
MelkamuEndale1
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
RubaNagarajan
 
Operating system file system
Operating system file systemOperating system file system
Operating system file system
Anil Pokhrel
 
File and directory
File and directoryFile and directory
File and directory
Sunil Kafle
 
File system Os
File system OsFile system Os
File system Os
Nehal Naik
 
File handling in qbasic
File handling in qbasicFile handling in qbasic
File handling in qbasic
SmritiGurung4
 
File system interface
File system interfaceFile system interface
File system interface
Dayan Ahmed
 
Files
FilesFiles
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File Handling
Momina Idrees
 
The windows hierarchy
The windows hierarchyThe windows hierarchy
The windows hierarchy
Middle East International School
 

What's hot (20)

Ch11
Ch11Ch11
Ch11
 
File Management
File ManagementFile Management
File Management
 
File system structure
File system structureFile system structure
File system structure
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53
 
Lecture #1 Introduction
Lecture #1 IntroductionLecture #1 Introduction
Lecture #1 Introduction
 
File organization
File organizationFile organization
File organization
 
Degonto file management
Degonto file managementDegonto file management
Degonto file management
 
File structures
File structuresFile structures
File structures
 
Sql server lesson3
Sql server lesson3Sql server lesson3
Sql server lesson3
 
Switching & Multiplexing
Switching & MultiplexingSwitching & Multiplexing
Switching & Multiplexing
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
 
Operating system file system
Operating system file systemOperating system file system
Operating system file system
 
File and directory
File and directoryFile and directory
File and directory
 
File system Os
File system OsFile system Os
File system Os
 
File handling in qbasic
File handling in qbasicFile handling in qbasic
File handling in qbasic
 
File system interface
File system interfaceFile system interface
File system interface
 
Files
FilesFiles
Files
 
File organisation
File organisationFile organisation
File organisation
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File Handling
 
The windows hierarchy
The windows hierarchyThe windows hierarchy
The windows hierarchy
 

Similar to Introduction to file systems

file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
HelalMirzad
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
AsmaaFaried1
 
File System Interface
File System InterfaceFile System Interface
File System Interface
chandinisanz
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Learn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems pptLearn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems ppt
geethasenthil2706
 
Operating System File Management Unit v.pptx
Operating System File Management Unit v.pptxOperating System File Management Unit v.pptx
Operating System File Management Unit v.pptx
SanthiNivas
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
ImranKhan880955
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
Kalai Selvi
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OSC.U
 
Chapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptxChapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptx
alehegn9
 
Degonto, File management system in fisheries science
Degonto, File management  system in fisheries scienceDegonto, File management  system in fisheries science
Degonto, File management system in fisheries science
Degonto Islam
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
sbmguys
 
FILE MANAGEMENT.pptx
FILE MANAGEMENT.pptxFILE MANAGEMENT.pptx
FILE MANAGEMENT.pptx
jayashri kolekar
 
File Management System in Shell Script.pptx
File Management System in Shell Script.pptxFile Management System in Shell Script.pptx
File Management System in Shell Script.pptx
Green University of Bangladesh
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
donny101
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
rajshreemuthiah
 
Os10 2
Os10 2Os10 2
Os10 2issbp
 
OS Unit IV.ppt
OS Unit IV.pptOS Unit IV.ppt
OS Unit IV.ppt
FarhanaMariyam1
 

Similar to Introduction to file systems (20)

file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
 
File System Interface
File System InterfaceFile System Interface
File System Interface
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
Learn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems pptLearn about the File Concept in operating systems ppt
Learn about the File Concept in operating systems ppt
 
Operating System File Management Unit v.pptx
Operating System File Management Unit v.pptxOperating System File Management Unit v.pptx
Operating System File Management Unit v.pptx
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
OS_Ch11
OS_Ch11OS_Ch11
OS_Ch11
 
OSCh11
OSCh11OSCh11
OSCh11
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
 
Chapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptxChapter 2 Linux File System and net.pptx
Chapter 2 Linux File System and net.pptx
 
Degonto, File management system in fisheries science
Degonto, File management  system in fisheries scienceDegonto, File management  system in fisheries science
Degonto, File management system in fisheries science
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
FILE MANAGEMENT.pptx
FILE MANAGEMENT.pptxFILE MANAGEMENT.pptx
FILE MANAGEMENT.pptx
 
File Management System in Shell Script.pptx
File Management System in Shell Script.pptxFile Management System in Shell Script.pptx
File Management System in Shell Script.pptx
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
 
Os10 2
Os10 2Os10 2
Os10 2
 
OS Unit IV.ppt
OS Unit IV.pptOS Unit IV.ppt
OS Unit IV.ppt
 

Recently uploaded

Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 

Recently uploaded (20)

Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 

Introduction to file systems

  • 1. Topic Outline FILE SYSTEM DIRECTORY File definition File Systems and Disks File Attributes File types File operations Method of accessing file Directory definition Directory structures Directory Operations Information Elements of a File Directory 04/16/171 abdalla ali khamis abdallalikha@gmail.com
  • 2. File 2 A file is a named collection of related information that is recorded on secondary storage(Abraham Silberschatz). Data files are numeric, alphabetic, alphanumeric, or binary. Files may be free form like text files or be formatted rigidly . r (Abraham Silberschatz) 04/16/17abdalla ali khamis abdallalikha@gmail.com
  • 3. File Systems and Disks 3 User view is a named collection of data which are store in secondary storage medium. OS & file system view File is collection of disk blocks i.e., a container in which File System maps file names and offsets to disk blocks 04/16/17abdalla ali khamis abdallalikha@gmail.com
  • 5. FILE TYPES 04/16/175 abdalla ali khamis abdallalikha@gmail.com
  • 6. FILE OPERATIONS 6  Creating a file  Writing a file  Reading a file.  Repositioning within a file  Deleting a file  Truncating a file 04/16/17abdalla ali khamis abdallalikha@gmail.com
  • 7. Methods for Accessing Files Sequential access: Sequential access is the one in which the record are access in the form of sequence whereby read all bytes or records in order in which read one record after the other from the beginning in the file. Random access: Random access in the one in which the record can be read un any order. Indexed sequential: Indexed sequential access is the one in which file is access items in file based on the contents of (part of) an item in the file. 04/16/177 abdalla ali khamis abdallalikha@gmail.com
  • 8. Directory – A Special Kind of File 8 A tool for users & applications to organize and find files User-friendly names Names that are meaningful over long periods of time The data structure for OS to locate files (i.e., containers) on disk 04/16/17abdalla ali khamis abdallalikha@gmail.com
  • 9. Directory structures 9 o Single level One directory per system, one entry pointing to each file Small, single-user or single-use systems PDA, cell phone, etc. o Two-level Single “master” directory per system Each entry points to one single-level directory per user Uncommon in modern operating systems o Hierarchical Any directory entry may point to Individual file Another directory Common in most modern operating systems 04/16/17abdalla ali khamis abdallalikha@gmail.com
  • 10. Directory Operations 10 o Create: Make a new directory o Add, Delete entry: o Invoked by file create & destroy, directory create & destroy o Find, List: o Search or enumerate directory entries o Rename: o Change name of an entry without changing anything else about it o Link, Unlink: o Add or remove entry pointing to another entry elsewhere o Introduces possibility of loops in directory graph o Destroy: o Removes directory; must be empty 04/16/17abdalla ali khamis abdallalikha@gmail.com
  • 11. Information Elements of a File Directory: basic information File Name: This is a name as chosen by the creator of the file. File Type: A file type can be of the text type, binary, load module, and many other types. File Organization: File organization is for systems that support different organizations. 04/16/1711 abdalla ali khamis abdallalikha@gmail.com
  • 12. Information Elements of a File Directory: Address Information o Volume:This component indicates a device on which the file is stored o Starting Address:This is a starting physical address on secondary storage (for example: cylinder, track, and block number on disk) o Size Used:This is a current size of the file. It can be measured in bytes, words, or blocks. o Size Allocated:This is the maximum size a file can have. 04/16/1712 abdalla ali khamis abdallalikha@gmail.com
  • 13. Information Elements of a File directory: access control information Owner: This is a user who is assigned control of the file. The owner may be able to grant or deny access (to the file) to other users and to change these privileges. Access Information: A simple version of this element would include the user’s name and password for each authorized user. Permitted Actions: This is for controlling reading, writing, executing, and transmitting over a network. 04/16/1713 abdalla ali khamis abdallalikha@gmail.com
  • 14. Information Elements of a File Directory: usage information o Date Created o Identity of Creator o Date Last Read Access o Identity of Last Reader o Date Last Modified o Identity of Last Modifier o Date of Last Backup o Current Usage: 04/16/1714 abdalla ali khamis abdallalikha@gmail.com
  • 15. Study Questions 1. Why do some systems keep track of the type of a file, while others leave it to the user or simply do not implement multiple file types? 2. Explain the purpose of the open and close operations. 3. List advantages and advantages of operating system “knowing” and supporting many file types 4. Why would we want a subdirectory in our account? 04/16/1715 abdalla ali khamis abdallalikha@gmail.com