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".
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

What's hot

File management
File managementFile management
File management
Vishal Singh
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating System
Meghaj Mallick
 
Process management
Process managementProcess management
Process management
Birju Tank
 
File organization 1
File organization 1File organization 1
File organization 1
Rupali Rana
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
priyadeosarkar91
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
Vimalanathan D
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
Database File operation
Database File operationDatabase File operation
Database File operation
Dr. C.V. Suresh Babu
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMS
Abhishek Dutta
 
Disk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibonDisk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibon
Jayed Hossain Jibon
 
File system
File systemFile system
File system
Harleen Johal
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating system
DeepikaT13
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
rajshreemuthiah
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
Damian T. Gordon
 
Basic dos-commands
Basic dos-commandsBasic dos-commands
Basic dos-commands
parag dhok
 
Difference between File system And DBMS.pptx
Difference between File system And DBMS.pptxDifference between File system And DBMS.pptx
Difference between File system And DBMS.pptx
ShayanMujahid2
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
Venkata Sreeram
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems
Maurvi04
 

What's hot (20)

File management
File managementFile management
File management
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating System
 
Process management
Process managementProcess management
Process management
 
File organization 1
File organization 1File organization 1
File organization 1
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Windows file system
Windows file systemWindows file system
Windows file system
 
Database File operation
Database File operationDatabase File operation
Database File operation
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMS
 
Disk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibonDisk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibon
 
File system
File systemFile system
File system
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating system
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
 
Basic dos-commands
Basic dos-commandsBasic dos-commands
Basic dos-commands
 
Difference between File system And DBMS.pptx
Difference between File system And DBMS.pptxDifference between File system And DBMS.pptx
Difference between File system And DBMS.pptx
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems
 

Viewers also liked

Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
Beat Signer
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 
Concept of computer files
Concept of computer filesConcept of computer files
Concept of computer files
Samuel Igbanogu
 
Indexing and hashing
Indexing and hashingIndexing and hashing
Indexing and hashingJeet Poria
 
File Management
File ManagementFile Management
File Management
Ramasubbu .P
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMSkoolkampus
 
File Organization
File OrganizationFile Organization
File OrganizationManyi Man
 
File system.
File system.File system.
File system.
elyza12
 

Viewers also liked (11)

Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
Access Methods - Lecture 9 - Introduction to Databases (1007156ANR)
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
Concept of computer files
Concept of computer filesConcept of computer files
Concept of computer files
 
Indexing and hashing
Indexing and hashingIndexing and hashing
Indexing and hashing
 
File Management
File ManagementFile Management
File Management
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
File Organization
File OrganizationFile Organization
File Organization
 
File system.
File system.File system.
File system.
 
File Systems
File SystemsFile Systems
File Systems
 
File organization
File organizationFile organization
File organization
 
Chapter 9-METHODS OF DATA COLLECTION
Chapter 9-METHODS OF DATA COLLECTIONChapter 9-METHODS OF DATA COLLECTION
Chapter 9-METHODS OF DATA COLLECTION
 

Similar to Files

Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File System
SanthiNivas
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
Kalai Selvi
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
Kalai Selvi
 
Dude.pptx
Dude.pptxDude.pptx
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
HelalMirzad
 
File system
File systemFile system
File system
lodhran-hayat
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
AsmaaFaried1
 
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
 
File structure
File structureFile structure
File structure
A. S. M. Shafi
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
donny101
 
File Systems
File SystemsFile Systems
File Systems
Shipra Swati
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
Ankit Dubey
 
file management
 file management file management
file management
Sweta Kumari Barnwal
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
ImranKhan880955
 
File management
File managementFile management
File management
sangrampatil81
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OSC.U
 
Model of file system
Model of file systemModel of file system
Model of file system
Ishucs
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1rohassanie
 

Similar to Files (20)

Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File System
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
Dude.pptx
Dude.pptxDude.pptx
Dude.pptx
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
File system
File systemFile system
File system
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
 
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
 
File structure
File structureFile structure
File structure
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
File Systems
File SystemsFile Systems
File Systems
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
file management
 file management file management
file management
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
File management
File managementFile management
File management
 
OS_Ch11
OS_Ch11OS_Ch11
OS_Ch11
 
OSCh11
OSCh11OSCh11
OSCh11
 
Ch11 OS
Ch11 OSCh11 OS
Ch11 OS
 
Model of file system
Model of file systemModel of file system
Model of file system
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
 

Recently uploaded

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
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
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
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
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 

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".
  • 13.
  • 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.