SlideShare a Scribd company logo
1 of 39
I/O AND FILE
MANAGEMENT IN O/S
V.V.SUBRAHMANYAM
SOCIS, IGNOU
DATE: 02-09-07
TIME: 15-30 TO 16-15
Introduction
 Input and output devices are components that form
part of the computer system.
 These devices are controlled by the operating
system.
 Input devices such as keyboard, mouse, and
sensors provide input signals such as commands to
the operating system.
 These commands received from input devices
instruct the operating system to perform some task
or control its behaviour.
 Output devices such as monitors, printers and
speakers are the devices that receive commands or
information from the operating system.
 The operating system implements the
abstract concept of the file by managing
mass storage devices, such as types and
disks.
 For convenient use of the computer system,
the operating system provides a uniform
logical view of information storage.
 The operating system abstracts from the
physical properties of its storage devices to
define a logical storage unit, the file.
 Files are mapped by the operating system,
onto physical devices.
File
 A file is a collection of related information
defined by its creator.
 Commonly, files represent programs (both
source and object forms) and data.
 Data files may be numeric, alphabetic or
alphanumeric. Files may be free-form, such
as text files, or may be rigidly formatted.
 In general, a file is a sequence of bits, bytes,
lines or records whose meaning is defined by
its creator and user.
File Management
 File management is one of the most
visible services of an operating system.
 Computers can store information in
several different physical forms among
which magnetic tape, disk, and drum
are the most common forms.
 Each of these devices has their own
characteristics and physical
organisation.
 The operating system is responsible
for the following activities in
connection with file management:
The creation and deletion of files.
The creation and deletion of directory.
The support of primitives for manipulating
files and directories.
The mapping of files onto disk storage.
Backup of files on stable (non volatile)
storage.
Speed Mismatch
 The most significant problem in I/O system is
the speed mismatch between I/O devices and
the memory and also with the processor.
 This is because I/O system involves both
H/W and S/W support and there is large
variation in the nature of I/O devices, so they
cannot compete with the speed of the
processor and memory.
 A well-designed file management
structure makes the file access quick
and easily movable to a new machine.
 Also it facilitates sharing of files and
protection of non-public files.
 For security and privacy, file system
may also provide encryption and
decryption capabilities. This makes
information accessible to the intended
user only.
I/O Buffering
 A buffer is an intermediate memory
area under operating system control
that stores data in transit between two
devices or between user’s work area
and device. It allows computation to
proceed in parallel with I/O.
Unbuffered situation
 In a typical unbuffered transfer
situation the processor is idle for most
of the time, waiting for data transfer to
complete and total read-processing
time is the sum of all the transfer/read
time and processor time.
Unbuffered transfer
User Work
Area Disk
OS
Single Buffering
 In case of single-buffered transfer, blocks are
first read into a buffer and then moved to the
user’s work area.
 When the move is complete, the next block is
read into the buffer and processed in parallel
with the first block.
 This helps in minimizing speed mismatch
between devices and the processor. Also,
this allows process computation in parallel
with input/output.
Single Buffering
OS
User
Work
Area
Buffer Disk
Double Buffering
 Double buffering is an improvement over this.
 A pair of buffers is used; blocks/records generated
by a running process are initially stored in the first
buffer until it is full.
 From this buffer it is transferred to the secondary
storage.
 During this transfer the other blocks generated are
deposited in the second buffer and when this
second buffer is also full and first buffer transfer is
complete, then transfer from the second buffer is
initiated. This process of alternation between buffers
continues which allows I/O to occur in parallel with a
process’s computation.
 This scheme increases the complexity but yields
improved performance.
Double Buffering
User
Work
Area
Buffer A
Disk
Buffer B
Disk Organisation
Platter with two
recording
surfaces
Head
Disk Scheduling
 The disk is a resource which has to be
shared.
 It is therefore has to be scheduled for use,
according to some kind of scheduling
system.
 Disks are the one, providing lot of the
secondary storage.
 As compared to magnetic tapes, disks have
very fast access time and disk bandwidth.
 The access time has two major constituents:
seek time and the rotational latency.
Seek Time and Rotational Latency
 The seek time is the time required for
the disk arm to move the head to the
cylinder with the desired sector.
 The rotational latency is the time
required for the disk to rotate the
desired sector until it is under the read-
write head.
 The disk bandwidth is the total number
of bytes transferred per unit time.
Disk Scheduling policies
 A scheduling policy should attempt to
maximize throughput (defined as the
number of requests serviced per unit
time) and also to minimize mean
response time (i.e., average waiting
time plus service time).
Various Scheduling Algorithms
 FCFS
 SSTF
 Scan Scheduling
C-Scan Scheduling
Look and C-Look Scheduling
FCFS Scheduling
Suppose the requests for inputting/ outputting to blocks on the cylinders have arrived, forming
the following disk queue:
50, 91, 150, 42, 130, 18, 140, 70, 60
Suppose the disk is initially at cylinder 50,
SSTF (Shortest seek time first)
The basis for this algorithm is Shortest-Seek-Time-First (SSTF) i.e., service all the
requests close to the current head position and with minimum seeks time from
current head position
SCAN scheduling
The disk arm starts at one end of the disk and service all the requests in its way towards the
other end, i.e., until it reaches the other end of the disk where the head movement is reversed
and continue servicing in this reverse direction. This scanning is done back and forth by the
head continuously.
C-SCAN Scheduling
 C-SCAN also moves head from one end to
the other servicing all the requests in its way.
The difference here is that after the head
reaches the end it immediately returns to
beginning, skipping all the requests on the
return trip. The servicing of the requests is
done only along one path.
 Thus comparatively this scheme gives
uniform wait time because cylinders are like
circular lists that wrap around from the last
cylinder to the first one.
RAID
 Disks have high failure rates and hence there
is the risk of loss of data and lots of
downtime for restoring and disk replacement.
 To improve disk usage many techniques
have been implemented.
 One such technology is RAID (Redundant
Array of Inexpensive Disks).
 Its organisation is based on disk striping (or
interleaving), which uses a group of disks as
one storage unit.
Disk Cache
 Disk caching is an extension of buffering.
 Cache is derived from the French word
cacher, meaning to hide.
 In this context, a cache is a collection of
blocks that logically belong on the disk, but
are kept in memory for performance reasons.
 It is used in multiprogramming environment
or in disk file servers, which maintain a
separate section of main memory called disk
cache.
Contd…
 These are sets of buffers (cache) that contain
the blocks that are recently used.
 The cached buffers in memory are copies of
the disk blocks and if any data here is
modified only its local copy is updated. So,
to maintain integrity, updated blocks must be
transferred back to the disk. Caching is
based on the assumption that most shortly
accessed blocks are likely to be accessed
again soon.
OS’s view of File Management
 The files are mapped by the operating
system onto physical devices.
 Many factors are considered for file
management by the operating system
like directory structure, disk
scheduling and management, file
related system services, input/output
etc.
 Most operating systems take a different
approach to storing information.
Contd…
 Three common file organisations are byte
sequence, record sequence and tree of disk
blocks.
 UNIX files are structured in simple byte
sequence form.
 In record sequence, arbitrary records can be
read or written, but a record cannot be
inserted or deleted in the middle of a file.
CP/M works according to this scheme.
 In tree organisation, each block hold n keyed
records and a new record can be inserted
anywhere in the tree. The mainframes use
this approach.
Single-level Directory
Abc Test Xyz Hello ……… Data
File
Two-level Directory
Files
User 1 User 2 User 3 User 4Master
file
Directory
Test Hello 1
Hello2 Abc 1
Abc Xyz Hello Data
User file
Directory
Tree-structured directory
Hello Test
Programs
Test 1
Test 2
F
6
F
7
Hello 1 Hello 2
Hello 3
F
1
Trial 1
Test 2
Trial 1
Test 2
F
4
F
2
F
3
F
5
Oct Hex
Dec
Trial 1
Test 2
F
8
F
9 Oct Hex
Dec
F
10
F
11
F
12
F
13
Acyclic Graph Directory
Hello Test Test1
Xyz1 Xyz2Abc 1 Abc2 Abc3
F
5
F
6
Trial 1 Test 2
F
3
F
4
F
1
F
2
Figure 11: Acyclic-graph directory
General Graph Directory
Hello Test Test1
F2
Xyz1 Xyz2Abc1 Abc2 Abc3
F8 F9F5 F6F1
Trial Test2
F8 F9F3 F4
Disk Space Management
 Continuous
 Non-Continuous (Indexing and Chaining)
Continuous Allocation on the disk
Linked Allocation on the disk
Indexing Allocation on the Disk
Thank You

More Related Content

What's hot

Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
Piyush Rochwani
 
File management
File managementFile management
File management
Mohd Arif
 

What's hot (20)

Process management in os
Process management in osProcess management in os
Process management in os
 
File system.
File system.File system.
File system.
 
Linux file system
Linux file systemLinux file system
Linux file system
 
File system Os
File system OsFile system Os
File system Os
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
File system
File systemFile system
File system
 
Files
FilesFiles
Files
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Memory management
Memory managementMemory management
Memory management
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
File management
File managementFile management
File management
 
Disk structure
Disk structureDisk structure
Disk structure
 
Memory management
Memory managementMemory management
Memory management
 

Similar to File Management in Operating Systems

Ch14 OS
Ch14 OSCh14 OS
Ch14 OS
C.U
 

Similar to File Management in Operating Systems (20)

I/O System and Case study
I/O System and Case studyI/O System and Case study
I/O System and Case study
 
Storage management in operating system
Storage management in operating systemStorage management in operating system
Storage management in operating system
 
Ch14 OS
Ch14 OSCh14 OS
Ch14 OS
 
OSCh14
OSCh14OSCh14
OSCh14
 
OS_Ch14
OS_Ch14OS_Ch14
OS_Ch14
 
Cs8493 unit 4
Cs8493 unit 4Cs8493 unit 4
Cs8493 unit 4
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
 
Pandi
PandiPandi
Pandi
 
Massstorage
MassstorageMassstorage
Massstorage
 
Mass storage systemsos
Mass storage systemsosMass storage systemsos
Mass storage systemsos
 
Chapter13
Chapter13Chapter13
Chapter13
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Operating system
Operating systemOperating system
Operating system
 
Operation System
Operation SystemOperation System
Operation System
 
The Storage Systems
The Storage Systems The Storage Systems
The Storage Systems
 
Filesystemimplementationpre final-160919095849
Filesystemimplementationpre final-160919095849Filesystemimplementationpre final-160919095849
Filesystemimplementationpre final-160919095849
 
Os
OsOs
Os
 
Os
OsOs
Os
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Operation System
Operation SystemOperation System
Operation System
 

More from vampugani

Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)
vampugani
 

More from vampugani (18)

Social media presentation
Social media presentationSocial media presentation
Social media presentation
 
Creating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OERCreating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OER
 
Arithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement NotationArithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement Notation
 
Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
Processes
ProcessesProcesses
Processes
 
Introduction to OS
Introduction to OSIntroduction to OS
Introduction to OS
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
Strings in c
Strings in cStrings in c
Strings in c
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
 
Introduction to C Programming
Introduction to C Programming Introduction to C Programming
Introduction to C Programming
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 

Recently uploaded

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

File Management in Operating Systems

  • 1. I/O AND FILE MANAGEMENT IN O/S V.V.SUBRAHMANYAM SOCIS, IGNOU DATE: 02-09-07 TIME: 15-30 TO 16-15
  • 2. Introduction  Input and output devices are components that form part of the computer system.  These devices are controlled by the operating system.  Input devices such as keyboard, mouse, and sensors provide input signals such as commands to the operating system.  These commands received from input devices instruct the operating system to perform some task or control its behaviour.  Output devices such as monitors, printers and speakers are the devices that receive commands or information from the operating system.
  • 3.  The operating system implements the abstract concept of the file by managing mass storage devices, such as types and disks.  For convenient use of the computer system, the operating system provides a uniform logical view of information storage.  The operating system abstracts from the physical properties of its storage devices to define a logical storage unit, the file.  Files are mapped by the operating system, onto physical devices.
  • 4. File  A file is a collection of related information defined by its creator.  Commonly, files represent programs (both source and object forms) and data.  Data files may be numeric, alphabetic or alphanumeric. Files may be free-form, such as text files, or may be rigidly formatted.  In general, a file is a sequence of bits, bytes, lines or records whose meaning is defined by its creator and user.
  • 5. File Management  File management is one of the most visible services of an operating system.  Computers can store information in several different physical forms among which magnetic tape, disk, and drum are the most common forms.  Each of these devices has their own characteristics and physical organisation.
  • 6.  The operating system is responsible for the following activities in connection with file management: The creation and deletion of files. The creation and deletion of directory. The support of primitives for manipulating files and directories. The mapping of files onto disk storage. Backup of files on stable (non volatile) storage.
  • 7. Speed Mismatch  The most significant problem in I/O system is the speed mismatch between I/O devices and the memory and also with the processor.  This is because I/O system involves both H/W and S/W support and there is large variation in the nature of I/O devices, so they cannot compete with the speed of the processor and memory.
  • 8.  A well-designed file management structure makes the file access quick and easily movable to a new machine.  Also it facilitates sharing of files and protection of non-public files.  For security and privacy, file system may also provide encryption and decryption capabilities. This makes information accessible to the intended user only.
  • 9. I/O Buffering  A buffer is an intermediate memory area under operating system control that stores data in transit between two devices or between user’s work area and device. It allows computation to proceed in parallel with I/O.
  • 10. Unbuffered situation  In a typical unbuffered transfer situation the processor is idle for most of the time, waiting for data transfer to complete and total read-processing time is the sum of all the transfer/read time and processor time.
  • 12. Single Buffering  In case of single-buffered transfer, blocks are first read into a buffer and then moved to the user’s work area.  When the move is complete, the next block is read into the buffer and processed in parallel with the first block.  This helps in minimizing speed mismatch between devices and the processor. Also, this allows process computation in parallel with input/output.
  • 14. Double Buffering  Double buffering is an improvement over this.  A pair of buffers is used; blocks/records generated by a running process are initially stored in the first buffer until it is full.  From this buffer it is transferred to the secondary storage.  During this transfer the other blocks generated are deposited in the second buffer and when this second buffer is also full and first buffer transfer is complete, then transfer from the second buffer is initiated. This process of alternation between buffers continues which allows I/O to occur in parallel with a process’s computation.  This scheme increases the complexity but yields improved performance.
  • 16. Disk Organisation Platter with two recording surfaces Head
  • 17. Disk Scheduling  The disk is a resource which has to be shared.  It is therefore has to be scheduled for use, according to some kind of scheduling system.  Disks are the one, providing lot of the secondary storage.  As compared to magnetic tapes, disks have very fast access time and disk bandwidth.  The access time has two major constituents: seek time and the rotational latency.
  • 18. Seek Time and Rotational Latency  The seek time is the time required for the disk arm to move the head to the cylinder with the desired sector.  The rotational latency is the time required for the disk to rotate the desired sector until it is under the read- write head.  The disk bandwidth is the total number of bytes transferred per unit time.
  • 19. Disk Scheduling policies  A scheduling policy should attempt to maximize throughput (defined as the number of requests serviced per unit time) and also to minimize mean response time (i.e., average waiting time plus service time).
  • 20. Various Scheduling Algorithms  FCFS  SSTF  Scan Scheduling C-Scan Scheduling Look and C-Look Scheduling
  • 21. FCFS Scheduling Suppose the requests for inputting/ outputting to blocks on the cylinders have arrived, forming the following disk queue: 50, 91, 150, 42, 130, 18, 140, 70, 60 Suppose the disk is initially at cylinder 50,
  • 22. SSTF (Shortest seek time first) The basis for this algorithm is Shortest-Seek-Time-First (SSTF) i.e., service all the requests close to the current head position and with minimum seeks time from current head position
  • 23. SCAN scheduling The disk arm starts at one end of the disk and service all the requests in its way towards the other end, i.e., until it reaches the other end of the disk where the head movement is reversed and continue servicing in this reverse direction. This scanning is done back and forth by the head continuously.
  • 24. C-SCAN Scheduling  C-SCAN also moves head from one end to the other servicing all the requests in its way. The difference here is that after the head reaches the end it immediately returns to beginning, skipping all the requests on the return trip. The servicing of the requests is done only along one path.  Thus comparatively this scheme gives uniform wait time because cylinders are like circular lists that wrap around from the last cylinder to the first one.
  • 25. RAID  Disks have high failure rates and hence there is the risk of loss of data and lots of downtime for restoring and disk replacement.  To improve disk usage many techniques have been implemented.  One such technology is RAID (Redundant Array of Inexpensive Disks).  Its organisation is based on disk striping (or interleaving), which uses a group of disks as one storage unit.
  • 26. Disk Cache  Disk caching is an extension of buffering.  Cache is derived from the French word cacher, meaning to hide.  In this context, a cache is a collection of blocks that logically belong on the disk, but are kept in memory for performance reasons.  It is used in multiprogramming environment or in disk file servers, which maintain a separate section of main memory called disk cache.
  • 27. Contd…  These are sets of buffers (cache) that contain the blocks that are recently used.  The cached buffers in memory are copies of the disk blocks and if any data here is modified only its local copy is updated. So, to maintain integrity, updated blocks must be transferred back to the disk. Caching is based on the assumption that most shortly accessed blocks are likely to be accessed again soon.
  • 28. OS’s view of File Management  The files are mapped by the operating system onto physical devices.  Many factors are considered for file management by the operating system like directory structure, disk scheduling and management, file related system services, input/output etc.  Most operating systems take a different approach to storing information.
  • 29. Contd…  Three common file organisations are byte sequence, record sequence and tree of disk blocks.  UNIX files are structured in simple byte sequence form.  In record sequence, arbitrary records can be read or written, but a record cannot be inserted or deleted in the middle of a file. CP/M works according to this scheme.  In tree organisation, each block hold n keyed records and a new record can be inserted anywhere in the tree. The mainframes use this approach.
  • 30. Single-level Directory Abc Test Xyz Hello ……… Data File
  • 31. Two-level Directory Files User 1 User 2 User 3 User 4Master file Directory Test Hello 1 Hello2 Abc 1 Abc Xyz Hello Data User file Directory
  • 32. Tree-structured directory Hello Test Programs Test 1 Test 2 F 6 F 7 Hello 1 Hello 2 Hello 3 F 1 Trial 1 Test 2 Trial 1 Test 2 F 4 F 2 F 3 F 5 Oct Hex Dec Trial 1 Test 2 F 8 F 9 Oct Hex Dec F 10 F 11 F 12 F 13
  • 33. Acyclic Graph Directory Hello Test Test1 Xyz1 Xyz2Abc 1 Abc2 Abc3 F 5 F 6 Trial 1 Test 2 F 3 F 4 F 1 F 2 Figure 11: Acyclic-graph directory
  • 34. General Graph Directory Hello Test Test1 F2 Xyz1 Xyz2Abc1 Abc2 Abc3 F8 F9F5 F6F1 Trial Test2 F8 F9F3 F4
  • 35. Disk Space Management  Continuous  Non-Continuous (Indexing and Chaining)