SlideShare a Scribd company logo
files
What are files? 
 In general, a file is a sequence of bits, bytes, lines or 
records whose meaning is defined by the files 
creator and user. 
 The file can be indexed, structured, etc. 
 The file is an entry in a directory. 
 The file may have attributes (name, creator, date, 
type, permissions).
File structure 
 File structure is a structure, which is according to a 
required format that operating system can 
understand. 
 A file has a certain defined structure according to its 
type. 
 A text file is a sequence of characters organized into 
lines. 
 A source file is a sequence of procedures and 
functions. 
 An object file is a sequence of bytes organized into 
blocks that are understandable by the machine.
File attributes 
 Name – only information kept in human-readable form 
 Identifier – unique tag (number) identifies file within file system 
 Type – needed for systems that support different types 
 Location – pointer to file location on device 
 Size – current file size 
 Protection – controls who can do reading, writing, executing 
 Time, date, and user identification – data for protection, 
security, and usage monitoring 
 Information about files are kept in the directory structure, which is 
maintained on the disk
File operations 
 Create 
Write 
 Read 
 Reposition within file 
 Delete 
 Truncate
File types
Functions of file system 
 File system in OS provide the way to create and 
access the files. 
 How the memory is allocated to files and how the 
addresses are saved regarding to each file.
File access methods 
 File access refers to the manner in which the 
records of a file may be accessed. 
 There are several ways to access files 
 Sequential access 
 Direct/Random access 
 Indexed sequential access
Sequential access 
 A sequential access is that in which the records are 
accessed in some sequence i.e the information in the file 
is processed in order, one record after the other.
 This access method is the most common one. 
 Example: Compilers usually access files in this fashion. 
 Retrieving from sequential file: 
 To access records, it is necessary to read the file from beginning to 
examine each record in sequence until the desired record is located. 
 Appending a sequential file: 
The append operation refers to adding more records to an 
existing file. 
The following operations are done for the purpose of appending a 
file. 
 Open the file. 
 Read the file till EOF is encountered. 
 Read the data to be added. 
 Write the data on the file. 
 Close the file.
Direct / random access 
 Random access file organization provides, accessing the records 
directly. 
 Each record has its own address on the file with by the help of 
which it can be directly accessed for reading or writing. 
 The records need not be in any sequence within the file and they 
need not be in adjacent locations on the storage medium.
 Method useful for disks. 
 There are no restrictions on which blocks are read/written 
in any order. 
 User now says "read n" rather than "read next".
Files
Indexed sequential access 
 This approach combines the advantages of both 
sequential and direct file access. 
 An index is created for each file which contains 
pointers to various blocks. 
 Index is searched sequentially and its pointer is 
used to access the file directly.
Example to understand Indexed 
Sequential Access 
(Prime Area)
File allocation methods 
 Files are allocated disk spaces by operating system. 
 Allocation methods are for 
 Effective disk space utilization 
 Allow fast file access 
 Operating systems deploy following three main 
ways to allocate disk space to files. 
 Contiguous Allocation 
 Linked Allocation 
 Indexed Allocation
Contiguous allocation 
 Each file occupies a set of contiguous blocks 
on the disk. 
Simple – only starting location (block ) and 
length (number of blocks) are required. 
Random access. 
Can be used for both sequential and direct 
files.
Example: 
 If file is n block long and starts at location b, then, the blocks 
occupied are b, b+1, b+2…..b+n-1 . 
 The directory entry for file has 
 Name 
 Starting address 
 Length
problems 
 Finding space for a new file or a resized file. 
 Determining size requirements. 
 External fragmentation of the hard disk.
Linked allocation 
 Each file is a linked list of disk blocks, scattered 
anywhere on the disk. 
 Directory contains link / pointer to first block of a 
file. 
 There's no external fragmentation since each 
request is for one block. 
 Method can only be effectively used for sequential 
files. 
 This method is inefficient for direct files.
EXAMPLE
Indexed allocation 
 Provides solutions to problems of contiguous and 
linked allocation. 
 A index block is created having all pointers to files. 
 Each file has its own index block which stores the 
addresses of disk space occupied by the file. 
 Directory contains the addresses of index blocks of 
files.
example
 Method suffers from wasted space since, for small files, most of the index block is 
wasted 
 If the index block is too small, we can: 
 Link several together 
 Use a multilevel index 
 Combined scheme
protection 
 We want to keep our information safe from 
physical damage(reliability) and improper 
access(protection). 
 We can protect our information by controlled 
access. 
 Types of access 
 Read 
 Write 
 Execute 
 Delete etc.
Access control 
 This is the most common approach. 
 ALCs(access control lists) are maintained. 
 The main problem of ALCs is their length. 
 The technique has two undesirable consequences: 
 Construction of list is tedious. 
 Size of the directory once defined cannot be 
changed
 This problem can be resolved by using condense 
access list. 
 Three classifications of users is defined: 
 OWNER: the user who creates the file. 
 GROUP: a set of user who are sharing the file and 
need similar access. 
 UNIVERSE: all other users in the system. 
 Eg. UNIX system defines three fields i.e. rwx 
 r- controls read access 
 w- controls write access 
 x- controls execution 
 DIFFICULTY: assigning the precedence when 
permission and ACLs conflict.
Other methods of protection 
 PROTECTION THROUGH PASSWORD: 
 To associate password with each file. 
 Use a separate password for each file. But it would be a 
tedious job for the user to remember all the passwords. 
 Solution to this is to choose same password but if the 
password is once known to someone else than all the data 
will be revealed. 
 Hence, the security in this method is on all or nothing 
basis.
Thank you

More Related Content

PPTX
File system structure
PPTX
File system Os
PDF
Microsoft Office 365 Security and Compliance
PPTX
Basics of coronary angiography
PPT
Microprocessor & microcontroller
PPTX
Module 2:- HUMAN ORGAN SYSTEMS AND BIO DESIGNS
PPTX
Presentation on Segmentation
PPTX
Power apps presentation
File system structure
File system Os
Microsoft Office 365 Security and Compliance
Basics of coronary angiography
Microprocessor & microcontroller
Module 2:- HUMAN ORGAN SYSTEMS AND BIO DESIGNS
Presentation on Segmentation
Power apps presentation

What's hot (20)

PPT
Chapter 11 - File System Implementation
PPT
File Management in Operating Systems
PPTX
File System in Operating System
PPTX
File concept and access method
PPT
Chapter 10 - File System Interface
PPTX
file system in operating system
PPT
Memory management
PPT
Disk scheduling
PPTX
Deadlock ppt
PPTX
RAID LEVELS
PPT
Disk management
PDF
File system
PPT
File system
PPTX
Normalization in DBMS
PPT
Unix File System
PDF
operating system structure
PPT
Disk structure
PDF
10 File System
PPT
Chapter 9 - Virtual Memory
PPTX
Storage management in operating system
Chapter 11 - File System Implementation
File Management in Operating Systems
File System in Operating System
File concept and access method
Chapter 10 - File System Interface
file system in operating system
Memory management
Disk scheduling
Deadlock ppt
RAID LEVELS
Disk management
File system
File system
Normalization in DBMS
Unix File System
operating system structure
Disk structure
10 File System
Chapter 9 - Virtual Memory
Storage management in operating system
Ad

Viewers also liked (14)

PDF
Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
PPT
File access methods.54
PPTX
Concept of computer files
PPT
Indexing and hashing
PPT
File Management
PPT
FILE STRUCTURE IN DBMS
PPTX
File management
PPT
12. Indexing and Hashing in DBMS
PPTX
File Organization
PPTX
File system.
PDF
File Systems
PPT
Chapter 9-METHODS OF DATA COLLECTION
PPTX
Operating Systems - File Management
Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
File access methods.54
Concept of computer files
Indexing and hashing
File Management
FILE STRUCTURE IN DBMS
File management
12. Indexing and Hashing in DBMS
File Organization
File system.
File Systems
Chapter 9-METHODS OF DATA COLLECTION
Operating Systems - File Management
Ad

Similar to Files (20)

PPTX
Introduction to File System
PPT
Unit 3 file management
PPT
Unit 3 chapter 1-file management
PPTX
8 File Management system project .pptx
PPTX
PPT
Operating Systems - File Space Allocation
PPTX
File Concept.pptx fa s fasfasfasfsfsfasfasfas
PPT
Operating System - File Management concepts
PPT
file management_osnotes.ppt
PPTX
Filesth file handling in language dile
PPTX
Operating System Unit 4(RTU Syllabus).pptx
DOCX
File system
PPTX
Unit 6 OSY.pptx aaaaaaaaaaaaaaaaaaaaaaaa
PPT
os unit-5-part2.ppt,Disk management file
PPTX
operating system notes for file managment.pptx
PPTX
Chapter 12.pptx
PPTX
file_concept.pptx file presentation directories
PPTX
Learn about the File Concept in operating systems ppt
PPTX
file_concept.pptx file presentation directories
PDF
File structure
Introduction to File System
Unit 3 file management
Unit 3 chapter 1-file management
8 File Management system project .pptx
Operating Systems - File Space Allocation
File Concept.pptx fa s fasfasfasfsfsfasfasfas
Operating System - File Management concepts
file management_osnotes.ppt
Filesth file handling in language dile
Operating System Unit 4(RTU Syllabus).pptx
File system
Unit 6 OSY.pptx aaaaaaaaaaaaaaaaaaaaaaaa
os unit-5-part2.ppt,Disk management file
operating system notes for file managment.pptx
Chapter 12.pptx
file_concept.pptx file presentation directories
Learn about the File Concept in operating systems ppt
file_concept.pptx file presentation directories
File structure

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
top salesforce developer skills in 2025.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Introduction to Artificial Intelligence
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
history of c programming in notes for students .pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Softaken Excel to vCard Converter Software.pdf
Understanding Forklifts - TECH EHS Solution
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
top salesforce developer skills in 2025.pdf
Transform Your Business with a Software ERP System
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PTS Company Brochure 2025 (1).pdf.......
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Operating system designcfffgfgggggggvggggggggg
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Which alternative to Crystal Reports is best for small or large businesses.pdf
Introduction to Artificial Intelligence
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo POS Development Services by CandidRoot Solutions
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
history of c programming in notes for students .pptx

Files

  • 2. What are files?  In general, a file is a sequence of bits, bytes, lines or records whose meaning is defined by the files creator and user.  The file can be indexed, structured, etc.  The file is an entry in a directory.  The file may have attributes (name, creator, date, type, permissions).
  • 3. File structure  File structure is a structure, which is according to a required format that operating system can understand.  A file has a certain defined structure according to its type.  A text file is a sequence of characters organized into lines.  A source file is a sequence of procedures and functions.  An object file is a sequence of bytes organized into blocks that are understandable by the machine.
  • 4. File attributes  Name – only information kept in human-readable form  Identifier – unique tag (number) identifies file within file system  Type – needed for systems that support different types  Location – pointer to file location on device  Size – current file size  Protection – controls who can do reading, writing, executing  Time, date, and user identification – data for protection, security, and usage monitoring  Information about files are kept in the directory structure, which is maintained on the disk
  • 5. File operations  Create Write  Read  Reposition within file  Delete  Truncate
  • 7. Functions of file system  File system in OS provide the way to create and access the files.  How the memory is allocated to files and how the addresses are saved regarding to each file.
  • 8. File access methods  File access refers to the manner in which the records of a file may be accessed.  There are several ways to access files  Sequential access  Direct/Random access  Indexed sequential access
  • 9. Sequential access  A sequential access is that in which the records are accessed in some sequence i.e the information in the file is processed in order, one record after the other.
  • 10.  This access method is the most common one.  Example: Compilers usually access files in this fashion.  Retrieving from sequential file:  To access records, it is necessary to read the file from beginning to examine each record in sequence until the desired record is located.  Appending a sequential file: The append operation refers to adding more records to an existing file. The following operations are done for the purpose of appending a file.  Open the file.  Read the file till EOF is encountered.  Read the data to be added.  Write the data on the file.  Close the file.
  • 11. Direct / random access  Random access file organization provides, accessing the records directly.  Each record has its own address on the file with by the help of which it can be directly accessed for reading or writing.  The records need not be in any sequence within the file and they need not be in adjacent locations on the storage medium.
  • 12.  Method useful for disks.  There are no restrictions on which blocks are read/written in any order.  User now says "read n" rather than "read next".
  • 14. Indexed sequential access  This approach combines the advantages of both sequential and direct file access.  An index is created for each file which contains pointers to various blocks.  Index is searched sequentially and its pointer is used to access the file directly.
  • 15. Example to understand Indexed Sequential Access (Prime Area)
  • 16. File allocation methods  Files are allocated disk spaces by operating system.  Allocation methods are for  Effective disk space utilization  Allow fast file access  Operating systems deploy following three main ways to allocate disk space to files.  Contiguous Allocation  Linked Allocation  Indexed Allocation
  • 17. Contiguous allocation  Each file occupies a set of contiguous blocks on the disk. Simple – only starting location (block ) and length (number of blocks) are required. Random access. Can be used for both sequential and direct files.
  • 18. Example:  If file is n block long and starts at location b, then, the blocks occupied are b, b+1, b+2…..b+n-1 .  The directory entry for file has  Name  Starting address  Length
  • 19. problems  Finding space for a new file or a resized file.  Determining size requirements.  External fragmentation of the hard disk.
  • 20. Linked allocation  Each file is a linked list of disk blocks, scattered anywhere on the disk.  Directory contains link / pointer to first block of a file.  There's no external fragmentation since each request is for one block.  Method can only be effectively used for sequential files.  This method is inefficient for direct files.
  • 22. Indexed allocation  Provides solutions to problems of contiguous and linked allocation.  A index block is created having all pointers to files.  Each file has its own index block which stores the addresses of disk space occupied by the file.  Directory contains the addresses of index blocks of files.
  • 24.  Method suffers from wasted space since, for small files, most of the index block is wasted  If the index block is too small, we can:  Link several together  Use a multilevel index  Combined scheme
  • 25. protection  We want to keep our information safe from physical damage(reliability) and improper access(protection).  We can protect our information by controlled access.  Types of access  Read  Write  Execute  Delete etc.
  • 26. Access control  This is the most common approach.  ALCs(access control lists) are maintained.  The main problem of ALCs is their length.  The technique has two undesirable consequences:  Construction of list is tedious.  Size of the directory once defined cannot be changed
  • 27.  This problem can be resolved by using condense access list.  Three classifications of users is defined:  OWNER: the user who creates the file.  GROUP: a set of user who are sharing the file and need similar access.  UNIVERSE: all other users in the system.  Eg. UNIX system defines three fields i.e. rwx  r- controls read access  w- controls write access  x- controls execution  DIFFICULTY: assigning the precedence when permission and ACLs conflict.
  • 28. Other methods of protection  PROTECTION THROUGH PASSWORD:  To associate password with each file.  Use a separate password for each file. But it would be a tedious job for the user to remember all the passwords.  Solution to this is to choose same password but if the password is once known to someone else than all the data will be revealed.  Hence, the security in this method is on all or nothing basis.