SlideShare a Scribd company logo
1 of 34
Chapter 12:
File
Management
PRESENTED BY : ASMAA FARIED
12.1 Overview
12.2 File Organization
and Access
12.3 B-Trees
Overview
 FILES AND FILE SYSTEMS
 FILE STRUCTURE
 FILE MANAGEMENT SYSTEMS
Files and File Systems
The file system permits users to create data collections, called files, with desirable
properties, such as:
 Long-term existence:
Files are stored on disk or other secondary storage and do not disappear when a
user logs off.
 Sharable between processes:
Files have names and can have associated access permissions that permit
controlled sharing.
 Structure:
Depending on the file system, a file can:
 Have an internal structure that is convenient for particular applications.
 Be organized into a hierarchical or more complex structure to reflect the
relationships among files.
Files and File Systems
File system provides a collection of functions that can be performed on files. operations
include:
 Create:
A new file is defined and positioned within the structure of files.
 Delete:
A file is removed from the file structure and subsequently destroyed.
 Open:
An existing file is declared to be “opened” by a process, allowing the process to perform functions
on the file.
 Close:
The file is closed with respect to a process, so the process no longer may perform functions on
the file, until the process opens the file again.
 Read:
A process reads all or a portion of the data in a file.
 Write:
A process updates a file, either by
 adding new data that expands the size of the file.
 or by changing the values of existing data items in the file.
File structure
 Field
 Record
 File
 Database
Field
The basic element of data.

 Single value (such as an employee’s last name, a date, or the value of a
sensor reading).

Length (may be fixed length or variable length).
Data type (e.g., ASCII string, decimal).
In the case of variable length the field often consists of two or three subfields:
The actual value to be stored
The name of the field
In some cases, the length of the field
Contains
Characterized by
its
Record
 A collection of related fields that can be treated as a unit by some
application program. ( For example, an employee record would contain
such fields as name, social security number, job classification, date of
hire )
Records may be of fixed length or variable length.
A record will be of variable length if
Some of its fields are of variable length, or
The number of fields may vary.
File
A file is a collection of similar records.
Files have file names and may be created and deleted.
Access control restrictions usually apply at the file level.
In a shared system, users and programs are granted or denied access to entire
files.
Database
 Collection of related data.
The essential aspects of a database are that :
 The relationships that exist among elements of data are explicit.
 The database is designed for use by a number of different applications.
A database may contain all of the information related to an organization or a
project.
Consists of one or more types of files.
There is a separate database management system that is independent of
the operating system (may make use of some file management programs).
Operations performed on file
Retrieve_All:
Retrieve all the records of a file.
Required for an application that must process all of the information in
the file at one time.
This operation is often equated with the term sequential processing,
because all of the records are accessed in sequence.
Retrieve_One:
Requires the retrieval of just a single record.
Interactive, transaction-oriented applications need this operation.
Retrieve_Next:
Requires the retrieval of the record that is “next” in some logical
sequence to the most recently retrieved record.
Retrieve_Previous:
The record that is “previous” to the currently accessed record is
retrieved.
Insert_One:
Insert a new record into the file.
Delete_One:
 Delete an existing record.
Update_One:
Retrieve a record, update one or more of its fields, and rewrite the
updated record back into the file.
Retrieve_Few:
Retrieve a number of records.
File Management Systems
 Set of system software that provides services to users and applications
in the use of files.
The way a user or application may access files.
Objectives for a File Management
System
1.Meet the data management needs and requirements of the user.
2.Guarantee that the data in the file are valid.
3.Optimize performance.
4.Provide I/O support for a variety of storage device types.
5. Minimize or eliminate the potential for lost or destroyed data
6.Provide a standardized set of I/O interface routines to user processes.
7.Provide I/O support for multiple users.
Minimal set of requirements
1 • Should be able to create, delete, read, write, and modify files.
2 • May have controlled access to other users’ files.
3 • May control what types of accesses are allowed to the user’s files.
4 • Should be able to move data between files.
5
• Should be able to back up and recover the user’s files in case of
damage.
6
• Should be able to access his or her files by name rather than by
numeric identifier.
Each user:
Device drivers
At the lowest level.
Communicate directly with peripheral devices.
Responsible for starting I/O operations.
Processing the completion of an I/O request.
considered to be part of the operating system.
For file operations, the typical devices controlled are disk and tape
drives.
Basic file system
Also referred to as the physical I/O level.
Primary interface with the environment outside of the computer system.
Deals with exchanging blocks of data that are exchanged with disk or
tape systems.
Concerned with the placement of blocks on the secondary storage
device.
Concerned with buffering blocks in main memory.
Does not understand the content of the data or the structure of the files
involved.
Basic I/O supervisor
Responsible for all file I/O initiation and termination.
At this level, control structures are maintained that deal with device I/O,
scheduling, and file status.
Selects the device on which file I/O is to be performed.
Concerned with scheduling disk and tape accesses to optimize performance.
I/O buffers are assigned and secondary memory is allocated at this level.
Part of the operating system.
Logical I/O
Enables
users and
applications
to access
records.
Provides a
general-
purpose
record I/O
capability.
Maintains
basic data
about files.
Access method
Level of the file system closest to the user.
Provides a standard interface between applications and the file
systems and devices that hold the data.
Different access methods reflect different file structures and different
ways of accessing and processing the data.
File organization and access
File organization to refer to the logical structuring of the records as
determined by the way in which they are accessed.
In choosing a file organization, several criteria are important:
 Short access time
 Ease of update
 Economy of storage
 Simple maintenance
 Reliability
Priority of these criteria will depend on the applications that will use the
file.
File organizations types
Five of the
common
file
organizati
on are :
The
pile
The
sequenti
al file
The
indexed
sequenti
al file
The
indexed
file
The
direct, or
hashed,
file
The Pile
 Least complicated form of file
organization.
 Data are collected in the order
in which they arrive.
 Each record consists of one
burst of data.
 The purpose is simply to
accumulate the mass of data
and save it.
 Record access is by exhaustive
search.
The Sequential
File
 Most common form of file
structure.
 A fixed format is used for
records.
 The key field uniquely identifies
the record.
 The records are stored in key
sequence:
 Alphabetical order for a text key,
 Numerical order for a numerical
key.
 Typically used in batch
applications
(e.g., a billing or payroll
application)
The Indexed
Sequential File
 Records are organized in
sequence based on a key field.
 Two features are added:
 An index to the file to support
random access.
 an overflow file.
 The index in this case is a
simple sequential file.
 Greatly reduces the time
required to access a single
record.
 To provide even greater
efficiency in access, multiple
levels of indexing can be used.
The Indexed File
 Records are accessed only
through their indexes.
 Variable-length records can be
employed.
 An exhaustive index contains one
entry for every record in the main
file.
 A partial index contains entries to
records where the field of interest
exists.
 used mostly in applications where
timeliness of information is critical.
 Examples are airline reservation
The Direct or
Hashed File
Access directly any block of a known
address.
Key field is required in each record.
Makes use of hashing on the key value.
 Often used where:
Very rapid access is required.
Fixed length records are used
Records are always accessed one at a
time.
Examples are directories, pricing tables,
schedules, and name lists.
B-TREES
 A balanced tree structure, with all branches of equal length.
The standard method of organizing indexes for databases.
Commonly used in OS file systems.
 Provides for efficient searching, adding, and deleting of items.
A B-tree is a tree structure (no closed loops) with the following
characteristics (see Figure 12.4):
B-Tree
Characteristics
1. Every node has at most 2d - 1 keys and 2d
children or, equivalently, 2d pointers.
2. Every node, except for the root, has at least d
- 1 keys and d pointers.
3. The root has at least 1 key and 2 children.
4. All leaves appear on the same level and
contain no information. This is a logical
construct to terminate the tree; the actual
implementation may differ. For example, each
bottom-level node may contain keys
alternating with null pointers.
5. A nonleaf node with k pointers contains k - 1
keys.
A B-Tree is
characterized by its
minimum degree d and
satisfies the following
properties:
Search for a
key
1. The key you want is less then the
smallest key in this node. Take the
leftmost pointer down to the next level.
2. The key you want is greater than the
largest key in this node. Take the
rightmost pointer down to the next level.
3. The value of the key is between the
values of two adjacent keys in this node.
Take the pointer between these keys
down to the next level.
To search for a key, you start at the
root node.
If the key you want is in the node,
you’re done.
If not, you go down one level. There
are three cases:
B-Trees

More Related Content

What's hot

File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learningLavanya Sharma
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systemsdonny101
 
Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...NoorMustafaSoomro
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53myrajendra
 
Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File SystemSanthiNivas
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationJafar Nesargi
 
old file system/traditional file sysytem
old file system/traditional file sysytemold file system/traditional file sysytem
old file system/traditional file sysytemjizaka
 
Os10
Os10Os10
Os10issbp
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemSneh Prabha
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 
Introduction to file systems
Introduction to file systemsIntroduction to file systems
Introduction to file systemsAbadala Ali
 
File system interface
File system interfaceFile system interface
File system interfaceDayan Ahmed
 
File management in OS
File management in OSFile management in OS
File management in OSBhavik Vashi
 
overview of storage and indexing BY-Pratik kadam
overview of storage and indexing BY-Pratik kadam overview of storage and indexing BY-Pratik kadam
overview of storage and indexing BY-Pratik kadam pratikkadam78
 

What's hot (20)

File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
File structure
File structureFile structure
File structure
 
Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...Report blocking ,management of files in secondry memory , static vs dynamic a...
Report blocking ,management of files in secondry memory , static vs dynamic a...
 
Files concepts.53
Files concepts.53Files concepts.53
Files concepts.53
 
Introduction to File System
Introduction to File SystemIntroduction to File System
Introduction to File System
 
File
FileFile
File
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
old file system/traditional file sysytem
old file system/traditional file sysytemold file system/traditional file sysytem
old file system/traditional file sysytem
 
Os10
Os10Os10
Os10
 
ITFT_File system interface in Operating System
ITFT_File system interface in Operating SystemITFT_File system interface in Operating System
ITFT_File system interface in Operating System
 
Types of files
Types of filesTypes of files
Types of files
 
OSCh11
OSCh11OSCh11
OSCh11
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
Introduction to file systems
Introduction to file systemsIntroduction to file systems
Introduction to file systems
 
File system interface
File system interfaceFile system interface
File system interface
 
File management in OS
File management in OSFile management in OS
File management in OS
 
10 File System
10 File System10 File System
10 File System
 
overview of storage and indexing BY-Pratik kadam
overview of storage and indexing BY-Pratik kadam overview of storage and indexing BY-Pratik kadam
overview of storage and indexing BY-Pratik kadam
 

Similar to 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 pptgeethasenthil2706
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file managementKalai Selvi
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file managementKalai Selvi
 
File System in Operating System
File System in Operating SystemFile System in Operating System
File System in Operating SystemMeghaj Mallick
 
File Management – File Concept, access methods, File types and File Operation
File Management – File Concept, access methods,  File types and File OperationFile Management – File Concept, access methods,  File types and File Operation
File Management – File Concept, access methods, File types and File OperationDhrumil Panchal
 
Ch12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptxCh12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptxudithaisur
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.pptHelalMirzad
 
Degonto file management
Degonto file managementDegonto file management
Degonto file managementDegonto Islam
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System InterfaceWayne Jones Jnr
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 

Similar to Chapter 12.pptx (20)

File Systems
File SystemsFile Systems
File Systems
 
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 Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Files
FilesFiles
Files
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
Ch10
Ch10Ch10
Ch10
 
File management
File managementFile management
File management
 
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
 
File Management – File Concept, access methods, File types and File Operation
File Management – File Concept, access methods,  File types and File OperationFile Management – File Concept, access methods,  File types and File Operation
File Management – File Concept, access methods, File types and File Operation
 
Ch12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptxCh12-OS9e-modified (1).pptx
Ch12-OS9e-modified (1).pptx
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
file management
 file management file management
file management
 
FILE MANAGEMENT.pptx
FILE MANAGEMENT.pptxFILE MANAGEMENT.pptx
FILE MANAGEMENT.pptx
 
Degonto file management
Degonto file managementDegonto file management
Degonto file management
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 

Recently uploaded

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Chapter 12.pptx

  • 2. 12.1 Overview 12.2 File Organization and Access 12.3 B-Trees
  • 3. Overview  FILES AND FILE SYSTEMS  FILE STRUCTURE  FILE MANAGEMENT SYSTEMS
  • 4. Files and File Systems The file system permits users to create data collections, called files, with desirable properties, such as:  Long-term existence: Files are stored on disk or other secondary storage and do not disappear when a user logs off.  Sharable between processes: Files have names and can have associated access permissions that permit controlled sharing.  Structure: Depending on the file system, a file can:  Have an internal structure that is convenient for particular applications.  Be organized into a hierarchical or more complex structure to reflect the relationships among files.
  • 5. Files and File Systems File system provides a collection of functions that can be performed on files. operations include:  Create: A new file is defined and positioned within the structure of files.  Delete: A file is removed from the file structure and subsequently destroyed.  Open: An existing file is declared to be “opened” by a process, allowing the process to perform functions on the file.  Close: The file is closed with respect to a process, so the process no longer may perform functions on the file, until the process opens the file again.  Read: A process reads all or a portion of the data in a file.  Write: A process updates a file, either by  adding new data that expands the size of the file.  or by changing the values of existing data items in the file.
  • 6. File structure  Field  Record  File  Database
  • 7. Field The basic element of data.   Single value (such as an employee’s last name, a date, or the value of a sensor reading).  Length (may be fixed length or variable length). Data type (e.g., ASCII string, decimal). In the case of variable length the field often consists of two or three subfields: The actual value to be stored The name of the field In some cases, the length of the field Contains Characterized by its
  • 8. Record  A collection of related fields that can be treated as a unit by some application program. ( For example, an employee record would contain such fields as name, social security number, job classification, date of hire ) Records may be of fixed length or variable length. A record will be of variable length if Some of its fields are of variable length, or The number of fields may vary.
  • 9. File A file is a collection of similar records. Files have file names and may be created and deleted. Access control restrictions usually apply at the file level. In a shared system, users and programs are granted or denied access to entire files.
  • 10. Database  Collection of related data. The essential aspects of a database are that :  The relationships that exist among elements of data are explicit.  The database is designed for use by a number of different applications. A database may contain all of the information related to an organization or a project. Consists of one or more types of files. There is a separate database management system that is independent of the operating system (may make use of some file management programs).
  • 11. Operations performed on file Retrieve_All: Retrieve all the records of a file. Required for an application that must process all of the information in the file at one time. This operation is often equated with the term sequential processing, because all of the records are accessed in sequence. Retrieve_One: Requires the retrieval of just a single record. Interactive, transaction-oriented applications need this operation. Retrieve_Next: Requires the retrieval of the record that is “next” in some logical sequence to the most recently retrieved record.
  • 12. Retrieve_Previous: The record that is “previous” to the currently accessed record is retrieved. Insert_One: Insert a new record into the file. Delete_One:  Delete an existing record. Update_One: Retrieve a record, update one or more of its fields, and rewrite the updated record back into the file. Retrieve_Few: Retrieve a number of records.
  • 13. File Management Systems  Set of system software that provides services to users and applications in the use of files. The way a user or application may access files.
  • 14. Objectives for a File Management System 1.Meet the data management needs and requirements of the user. 2.Guarantee that the data in the file are valid. 3.Optimize performance. 4.Provide I/O support for a variety of storage device types. 5. Minimize or eliminate the potential for lost or destroyed data 6.Provide a standardized set of I/O interface routines to user processes. 7.Provide I/O support for multiple users.
  • 15. Minimal set of requirements 1 • Should be able to create, delete, read, write, and modify files. 2 • May have controlled access to other users’ files. 3 • May control what types of accesses are allowed to the user’s files. 4 • Should be able to move data between files. 5 • Should be able to back up and recover the user’s files in case of damage. 6 • Should be able to access his or her files by name rather than by numeric identifier. Each user:
  • 16.
  • 17. Device drivers At the lowest level. Communicate directly with peripheral devices. Responsible for starting I/O operations. Processing the completion of an I/O request. considered to be part of the operating system. For file operations, the typical devices controlled are disk and tape drives.
  • 18. Basic file system Also referred to as the physical I/O level. Primary interface with the environment outside of the computer system. Deals with exchanging blocks of data that are exchanged with disk or tape systems. Concerned with the placement of blocks on the secondary storage device. Concerned with buffering blocks in main memory. Does not understand the content of the data or the structure of the files involved.
  • 19. Basic I/O supervisor Responsible for all file I/O initiation and termination. At this level, control structures are maintained that deal with device I/O, scheduling, and file status. Selects the device on which file I/O is to be performed. Concerned with scheduling disk and tape accesses to optimize performance. I/O buffers are assigned and secondary memory is allocated at this level. Part of the operating system.
  • 20. Logical I/O Enables users and applications to access records. Provides a general- purpose record I/O capability. Maintains basic data about files.
  • 21. Access method Level of the file system closest to the user. Provides a standard interface between applications and the file systems and devices that hold the data. Different access methods reflect different file structures and different ways of accessing and processing the data.
  • 22.
  • 23. File organization and access File organization to refer to the logical structuring of the records as determined by the way in which they are accessed. In choosing a file organization, several criteria are important:  Short access time  Ease of update  Economy of storage  Simple maintenance  Reliability Priority of these criteria will depend on the applications that will use the file.
  • 24. File organizations types Five of the common file organizati on are : The pile The sequenti al file The indexed sequenti al file The indexed file The direct, or hashed, file
  • 25. The Pile  Least complicated form of file organization.  Data are collected in the order in which they arrive.  Each record consists of one burst of data.  The purpose is simply to accumulate the mass of data and save it.  Record access is by exhaustive search.
  • 26. The Sequential File  Most common form of file structure.  A fixed format is used for records.  The key field uniquely identifies the record.  The records are stored in key sequence:  Alphabetical order for a text key,  Numerical order for a numerical key.  Typically used in batch applications (e.g., a billing or payroll application)
  • 27. The Indexed Sequential File  Records are organized in sequence based on a key field.  Two features are added:  An index to the file to support random access.  an overflow file.  The index in this case is a simple sequential file.  Greatly reduces the time required to access a single record.  To provide even greater efficiency in access, multiple levels of indexing can be used.
  • 28. The Indexed File  Records are accessed only through their indexes.  Variable-length records can be employed.  An exhaustive index contains one entry for every record in the main file.  A partial index contains entries to records where the field of interest exists.  used mostly in applications where timeliness of information is critical.  Examples are airline reservation
  • 29. The Direct or Hashed File Access directly any block of a known address. Key field is required in each record. Makes use of hashing on the key value.  Often used where: Very rapid access is required. Fixed length records are used Records are always accessed one at a time. Examples are directories, pricing tables, schedules, and name lists.
  • 30. B-TREES  A balanced tree structure, with all branches of equal length. The standard method of organizing indexes for databases. Commonly used in OS file systems.  Provides for efficient searching, adding, and deleting of items.
  • 31. A B-tree is a tree structure (no closed loops) with the following characteristics (see Figure 12.4):
  • 32. B-Tree Characteristics 1. Every node has at most 2d - 1 keys and 2d children or, equivalently, 2d pointers. 2. Every node, except for the root, has at least d - 1 keys and d pointers. 3. The root has at least 1 key and 2 children. 4. All leaves appear on the same level and contain no information. This is a logical construct to terminate the tree; the actual implementation may differ. For example, each bottom-level node may contain keys alternating with null pointers. 5. A nonleaf node with k pointers contains k - 1 keys. A B-Tree is characterized by its minimum degree d and satisfies the following properties:
  • 33. Search for a key 1. The key you want is less then the smallest key in this node. Take the leftmost pointer down to the next level. 2. The key you want is greater than the largest key in this node. Take the rightmost pointer down to the next level. 3. The value of the key is between the values of two adjacent keys in this node. Take the pointer between these keys down to the next level. To search for a key, you start at the root node. If the key you want is in the node, you’re done. If not, you go down one level. There are three cases:

Editor's Notes

  1. 1. The tree consists of a number of nodes and leaves. 2. Each node contains at least one key which uniquely identifies a file record, and more than one pointer to child nodes or leaves. 3. Each node is limited to the same number of maximum keys. 4. The keys in a node are stored in nondecreasing order. Each key has an associated child that is the root of a subtree containing all nodes with keys less than or equal to the key but greater than the preceding key. A node also has an additional rightmost child that is the root for a subtree containing all keys greater than any keys in the node. Thus, each node has one more pointer than keys.