SlideShare a Scribd company logo
1 of 17
BITS Pilani
Pilani Campus
Data Storage Technologies
& Networks
Dr. Virendra Singh Shekhawat
Department of Computer Science and Information Systems
BITS Pilani, Pilani Campus
Topics
โ€ข File Store Organization
โ€ข OS Support for I/O
โ€“ Device Drivers
โ€“ Interrupt handling
โ€“ Device Interface
โ€“ Buffering
2
BITS Pilani, Pilani Campus
Organization of File store
โ€ข Berkeley Fast File System (FFS) model:
โ€“ A file system is described by its superblock
โ€ข Located at the beginning of the file system
โ€ข Possibly replicated for redundancy
โ€“ A disk partition is divided into one or more cylinder
groups i.e. a set of consecutive cylinders:
โ€ข Each group maintains book-keeping info. including
โ€“ a redundant copy of superblock
โ€“ Space for i-nodes
โ€“ A bitmap of available blocks and
โ€“ Summary usage info.
โ€ข Cylinder groups are used to create clusters of
allocated blocks to improve locality.
3
BITS Pilani, Pilani Campus
Local File Store- Storage
Utilization
โ€ข Data layout โ€“ Performance requirement
โ€“ Large blocks of data should be transferable in a single disk operation
โ€ข So, logical block size must be large.
โ€“ But, typical profiles primarily use small files.
โ€ข Internal Fragmentation:
โ€“ Increases from 1.1% for 512 bytes logical block size, 2.5% for 1KB, to
5.4% for 2KB, to an unacceptable 61% for 16KB
โ€ข I-nodes also add to the space overhead:
โ€“ But overhead due to i-nodes is about 6% for logical block sizes of
512B, 1KB and 2KB, reduces to about 3% for 4KB, and to 0.8% for
16KB.
โ€ข One option to balance internal fragmentation against
improved I/O performance is
โ€“ to maintain large logical blocks made of smaller fragments
4
BITS Pilani, Pilani Campus
Local File Store โ€“ Layout [1]
โ€ข Global Policies:
โ€“ Use summary information to make decisions
regarding placement of i-nodes and disk blocks.
โ€ข Routines responsible for deciding placement of new
directories and files.
โ€“ Layout policies rely on locality to cluster information
for improved performance.
โ€ข E.g. Cylinder group clustering
โ€ข Local Allocation Routines.
โ€“ Use locally optimal schemes for data block layouts.
5
BITS Pilani, Pilani Campus
Local File Store โ€“ Layout [2]
โ€ข Local allocators use a multi-level allocation strategy:
1. Use the next available block that is rotationally
closest to the requested block on the same cylinder
2. If no blocks are available in the same cylinder use
a block within the same cylinder group
3. If the cylinder group is full, choose another group
by quadratic hashing.
4. Search exhaustively.
6
BITS Pilani, Pilani Campus
OS Support for I/O
โ€ข System calls form the interface between applications
and OS (kernel)
โ€“ File System and I/O system are responsible for
โ€ข Implementing system calls related to file management and handling
input/output.
โ€ข Device drivers form the interface between the OS
(kernel) and the hardware
7
BITS Pilani, Pilani Campus
I/O in UNIX - Example
โ€ข Application level operation
โ€“ E.g. printf call
โ€ข OS (kernel) level
โ€“ System call bwrite
โ€ข Device Driver level
โ€“ Strategy entry point โ€“ code for write operation
โ€ข Device level
โ€“ E.g. SCSI protocol command for write
8
BITS Pilani, Pilani Campus
I/O in UNIX - Devices
โ€ข I/O system is used for
โ€“ Network communication and virtual memory (Swap
space)
โ€ข Two types of devices
โ€“ Character devices
โ€ข Terminals, line printers, main memory
โ€“ Block devices
โ€ข Disks and Tapes
โ€ข Buffering done by kernel
9
BITS Pilani, Pilani Campus
I/O in UNIX โ€“ Device Drivers
โ€ข Device Driver Sections
โ€“ Auto-configuration and initialization Routines
โ€ข Probe and initialize the device
โ€“ Routines for servicing I/O requests
โ€ข Invoked because of system calls or VM requests
โ€ข Referred to as the โ€œtop-halfโ€ of the driver
โ€“ Interrupt service routines
โ€ข Invoked by interrupt from a device
โ€“ Canโ€™t depend on per-process state
โ€“ Canโ€™t block
โ€ข Referred to as the โ€œbottom-halfโ€ of the driver
10
BITS Pilani, Pilani Campus
I/O Queuing and Interrupt
Handling
โ€ข Each device driver manages one or more queues
for I/O requests
โ€“ Shared among asynchronous routines โ€“ must be
synchronized.
โ€“ Multi-process synchronization also required.
โ€ข Interrupts are generated by devices
โ€“ Signal status change (or completion of operation)
โ€“ DD-ISR invoked through a glue routine that is
responsible for saving volatile registers.
โ€“ ISR removes request from queue, notifies requestor
that the command has been executed.
11
BITS Pilani, Pilani Campus
I/O in UNIX โ€“ Block Devices and I/O
โ€ข Disk sector sized read/write
โ€“ Conversion of random access to disk sector
read/write is known as block I/O
โ€“ Kernel buffering reduces latency for multiple reads
and writes.
12
BITS Pilani, Pilani Campus
Device Driver to Disk Interface
โ€ข Disk Interface:
โ€“ Disk access requires an address:
โ€ข device id, LBA OR
โ€ข device id, cylinder #, head#, sector #.
โ€“ Device drivers need to be aware of disk details for
address translation:
โ€ข i.e. converting a logical address (say file system level address
such as i-node number) to a physical address (i.e. CHS) on the
disk;
โ€ข they need to be aware of complete disk geometry if CHS
addressing is used.
โ€“ Early device drivers had hard-coded disk geometries.
โ€ข This results in reduced modularity โ€“
โ€“ disks cannot be moved (data mapping is with the device driver);
โ€“ device driver upgrades would require shutdowns and data copies.
13
BITS Pilani, Pilani Campus
Disk Labels
โ€ข Disk Geometry and Data mapping is stored on
the disk itself.
โ€“ Known as disk label.
โ€“ Must be stored in a fixed location โ€“ usually 0th
block i.e. 0th sector on head 0, cylinder 0.
โ€“ Usually this is where bootstrap code is stored
โ€ข In which case disk information is part of the bootstrap
code, because booting may require disk access.
14
BITS Pilani, Pilani Campus
Buffering
โ€ข Buffer Cache
โ€“ Memory buffer for data being transferred to and from
disks
โ€“ Cache for recently used blocks
โ€ข 85% hit rate is typical
โ€ข Typical buffer size = 64KB virtual memory
โ€ข Buffer pool โ€“ hundreds of buffers
โ€ข Consistency issue
โ€“ Each disk block mapped to at most one buffer
โ€“ Buffers have dirty bits associated
โ€“ When a new buffer is allocated and if its disk blocks
overlap with that of an existing buffer, then the old buffer
must be purged.
15
BITS Pilani, Pilani Campus
Buffer Pool Management
โ€ข Buffer pool is maintained as a (separately chained) hash table
indexed by a buffer id
โ€ข The buffers in the pool are also in one of four lists:
โ€“ Locked list:
โ€ข buffers that are currently used for I/O and therefore locked and cannot be
released until operation is complete
โ€“ LRU list:
โ€ข A queue of buffers โ€“ a recently used item is added at the rear of the queue
and when a buffer is needed one at the front of the queue is replaced.
โ€ข Buffers staying in this queue long enough are migrated to an Aged list
โ€“ Aged List:
โ€ข Maintained as a list and any element may be used for replacement.
โ€“ Empty List
โ€ข When a new buffer is needed check in the following order:
โ€“ Empty List, Aged List, LRU list
16
BITS Pilani, Pilani Campus
Thank You!
17

More Related Content

What's hot

07 input output
07 input output07 input output
07 input outputdilip kumar
ย 
27 multicore
27 multicore27 multicore
27 multicoressuser47ae65
ย 
01 introduction
01 introduction01 introduction
01 introductiondilip kumar
ย 
Multiprocessor
MultiprocessorMultiprocessor
MultiprocessorA B Shinde
ย 
Nehalem
NehalemNehalem
NehalemAjmal Ak
ย 
Driver development โ€“ memory management
Driver development โ€“ memory managementDriver development โ€“ memory management
Driver development โ€“ memory managementVandana Salve
ย 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory managementGokul Vasan
ย 
Structure And Role Of The Processor
Structure And Role Of The ProcessorStructure And Role Of The Processor
Structure And Role Of The Processorpy7rjs
ย 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systemsMybej Che
ย 
08 operating system support
08 operating system support08 operating system support
08 operating system supportSher Shah Merkhel
ย 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory managementBullz Musetsho
ย 
Operation System
Operation SystemOperation System
Operation SystemANANTHI1997
ย 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
ย 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsPeter Trรถger
ย 
Dynamic loading
Dynamic loadingDynamic loading
Dynamic loadingA. S. M. Shafi
ย 

What's hot (20)

07 input output
07 input output07 input output
07 input output
ย 
27 multicore
27 multicore27 multicore
27 multicore
ย 
Os
OsOs
Os
ย 
01 introduction
01 introduction01 introduction
01 introduction
ย 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
ย 
04 cache memory
04 cache memory04 cache memory
04 cache memory
ย 
Nehalem
NehalemNehalem
Nehalem
ย 
Driver development โ€“ memory management
Driver development โ€“ memory managementDriver development โ€“ memory management
Driver development โ€“ memory management
ย 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory management
ย 
Structure And Role Of The Processor
Structure And Role Of The ProcessorStructure And Role Of The Processor
Structure And Role Of The Processor
ย 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
ย 
Memory management early_systems
Memory management early_systemsMemory management early_systems
Memory management early_systems
ย 
08 operating system support
08 operating system support08 operating system support
08 operating system support
ย 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
ย 
Memory Management
Memory ManagementMemory Management
Memory Management
ย 
Operation System
Operation SystemOperation System
Operation System
ย 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
ย 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management Concepts
ย 
Dynamic loading
Dynamic loadingDynamic loading
Dynamic loading
ย 
01 introduction
01 introduction01 introduction
01 introduction
ย 

Similar to M2 212-unix fs-rl_2.1.2

M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1MrudulaJoshi10
ย 
M3 nas architecture-3.1.1
M3 nas architecture-3.1.1M3 nas architecture-3.1.1
M3 nas architecture-3.1.1MrudulaJoshi10
ย 
M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2MrudulaJoshi10
ย 
M4 fc stack-4.1.1
M4 fc stack-4.1.1M4 fc stack-4.1.1
M4 fc stack-4.1.1MrudulaJoshi10
ย 
M4 san features-4.3.1
M4 san features-4.3.1M4 san features-4.3.1
M4 san features-4.3.1MrudulaJoshi10
ย 
11-IOManagement.ppt
11-IOManagement.ppt11-IOManagement.ppt
11-IOManagement.pptUmesh Hengaju
ย 
11-IOManagement.ppt
11-IOManagement.ppt11-IOManagement.ppt
11-IOManagement.pptansariparveen06
ย 
18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptxAdarshMohanty16
ย 
Presentation recovery manager (rman) configuration and performance tuning ...
Presentation    recovery manager (rman) configuration and performance tuning ...Presentation    recovery manager (rman) configuration and performance tuning ...
Presentation recovery manager (rman) configuration and performance tuning ...xKinAnx
ย 
M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1MrudulaJoshi10
ย 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessornarendra kumar
ย 
Buffer cache unix ppt Mrs.Sowmya Jyothi
Buffer cache unix ppt Mrs.Sowmya JyothiBuffer cache unix ppt Mrs.Sowmya Jyothi
Buffer cache unix ppt Mrs.Sowmya JyothiSowmya Jyothi
ย 
Chapter01-rev.pptx
Chapter01-rev.pptxChapter01-rev.pptx
Chapter01-rev.pptxTanishaKochak
ย 

Similar to M2 212-unix fs-rl_2.1.2 (20)

M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1
ย 
M3 nas architecture-3.1.1
M3 nas architecture-3.1.1M3 nas architecture-3.1.1
M3 nas architecture-3.1.1
ย 
M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2
ย 
M1 rl 1.4.1
M1 rl 1.4.1M1 rl 1.4.1
M1 rl 1.4.1
ย 
kerch04.ppt
kerch04.pptkerch04.ppt
kerch04.ppt
ย 
M1 rl 1.3.1
M1 rl 1.3.1M1 rl 1.3.1
M1 rl 1.3.1
ย 
M4 fc stack-4.1.1
M4 fc stack-4.1.1M4 fc stack-4.1.1
M4 fc stack-4.1.1
ย 
M1 rl 1.1.1
M1 rl 1.1.1M1 rl 1.1.1
M1 rl 1.1.1
ย 
M4 san features-4.3.1
M4 san features-4.3.1M4 san features-4.3.1
M4 san features-4.3.1
ย 
11-IOManagement.ppt
11-IOManagement.ppt11-IOManagement.ppt
11-IOManagement.ppt
ย 
11-IOManagement.ppt
11-IOManagement.ppt11-IOManagement.ppt
11-IOManagement.ppt
ย 
M1 rl 1.2.1
M1 rl 1.2.1M1 rl 1.2.1
M1 rl 1.2.1
ย 
18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx
ย 
OS Unit5.pptx
OS Unit5.pptxOS Unit5.pptx
OS Unit5.pptx
ย 
Presentation recovery manager (rman) configuration and performance tuning ...
Presentation    recovery manager (rman) configuration and performance tuning ...Presentation    recovery manager (rman) configuration and performance tuning ...
Presentation recovery manager (rman) configuration and performance tuning ...
ย 
M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1
ย 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
ย 
Buffer cache unix ppt Mrs.Sowmya Jyothi
Buffer cache unix ppt Mrs.Sowmya JyothiBuffer cache unix ppt Mrs.Sowmya Jyothi
Buffer cache unix ppt Mrs.Sowmya Jyothi
ย 
Chapter01-rev.pptx
Chapter01-rev.pptxChapter01-rev.pptx
Chapter01-rev.pptx
ย 
OS UNIT4.pptx
OS UNIT4.pptxOS UNIT4.pptx
OS UNIT4.pptx
ย 

More from MrudulaJoshi10

M4 rdma 4.5.1
M4 rdma 4.5.1M4 rdma 4.5.1
M4 rdma 4.5.1MrudulaJoshi10
ย 
M4 f co-e_4.4.2
M4 f co-e_4.4.2M4 f co-e_4.4.2
M4 f co-e_4.4.2MrudulaJoshi10
ย 
M4 fc san-4.2.1
M4 fc san-4.2.1M4 fc san-4.2.1
M4 fc san-4.2.1MrudulaJoshi10
ย 
M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1MrudulaJoshi10
ย 
M3 nfs fs-3.2.1
M3 nfs fs-3.2.1M3 nfs fs-3.2.1
M3 nfs fs-3.2.1MrudulaJoshi10
ย 
M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2MrudulaJoshi10
ย 
M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1MrudulaJoshi10
ย 
M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1MrudulaJoshi10
ย 

More from MrudulaJoshi10 (8)

M4 rdma 4.5.1
M4 rdma 4.5.1M4 rdma 4.5.1
M4 rdma 4.5.1
ย 
M4 f co-e_4.4.2
M4 f co-e_4.4.2M4 f co-e_4.4.2
M4 f co-e_4.4.2
ย 
M4 fc san-4.2.1
M4 fc san-4.2.1M4 fc san-4.2.1
M4 fc san-4.2.1
ย 
M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1
ย 
M3 nfs fs-3.2.1
M3 nfs fs-3.2.1M3 nfs fs-3.2.1
M3 nfs fs-3.2.1
ย 
M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2
ย 
M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1
ย 
M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1
ย 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
ย 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
ย 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
ย 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
ย 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
ย 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
ย 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
ย 
Top Rated Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...Call Girls in Nagpur High Profile
ย 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
ย 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
ย 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
ย 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
ย 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
ย 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
ย 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
ย 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
ย 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
ย 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
ย 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
ย 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
ย 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
ย 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
ย 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
ย 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
ย 
Top Rated Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
ย 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
ย 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
ย 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
ย 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
ย 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
ย 

M2 212-unix fs-rl_2.1.2

  • 1. BITS Pilani Pilani Campus Data Storage Technologies & Networks Dr. Virendra Singh Shekhawat Department of Computer Science and Information Systems
  • 2. BITS Pilani, Pilani Campus Topics โ€ข File Store Organization โ€ข OS Support for I/O โ€“ Device Drivers โ€“ Interrupt handling โ€“ Device Interface โ€“ Buffering 2
  • 3. BITS Pilani, Pilani Campus Organization of File store โ€ข Berkeley Fast File System (FFS) model: โ€“ A file system is described by its superblock โ€ข Located at the beginning of the file system โ€ข Possibly replicated for redundancy โ€“ A disk partition is divided into one or more cylinder groups i.e. a set of consecutive cylinders: โ€ข Each group maintains book-keeping info. including โ€“ a redundant copy of superblock โ€“ Space for i-nodes โ€“ A bitmap of available blocks and โ€“ Summary usage info. โ€ข Cylinder groups are used to create clusters of allocated blocks to improve locality. 3
  • 4. BITS Pilani, Pilani Campus Local File Store- Storage Utilization โ€ข Data layout โ€“ Performance requirement โ€“ Large blocks of data should be transferable in a single disk operation โ€ข So, logical block size must be large. โ€“ But, typical profiles primarily use small files. โ€ข Internal Fragmentation: โ€“ Increases from 1.1% for 512 bytes logical block size, 2.5% for 1KB, to 5.4% for 2KB, to an unacceptable 61% for 16KB โ€ข I-nodes also add to the space overhead: โ€“ But overhead due to i-nodes is about 6% for logical block sizes of 512B, 1KB and 2KB, reduces to about 3% for 4KB, and to 0.8% for 16KB. โ€ข One option to balance internal fragmentation against improved I/O performance is โ€“ to maintain large logical blocks made of smaller fragments 4
  • 5. BITS Pilani, Pilani Campus Local File Store โ€“ Layout [1] โ€ข Global Policies: โ€“ Use summary information to make decisions regarding placement of i-nodes and disk blocks. โ€ข Routines responsible for deciding placement of new directories and files. โ€“ Layout policies rely on locality to cluster information for improved performance. โ€ข E.g. Cylinder group clustering โ€ข Local Allocation Routines. โ€“ Use locally optimal schemes for data block layouts. 5
  • 6. BITS Pilani, Pilani Campus Local File Store โ€“ Layout [2] โ€ข Local allocators use a multi-level allocation strategy: 1. Use the next available block that is rotationally closest to the requested block on the same cylinder 2. If no blocks are available in the same cylinder use a block within the same cylinder group 3. If the cylinder group is full, choose another group by quadratic hashing. 4. Search exhaustively. 6
  • 7. BITS Pilani, Pilani Campus OS Support for I/O โ€ข System calls form the interface between applications and OS (kernel) โ€“ File System and I/O system are responsible for โ€ข Implementing system calls related to file management and handling input/output. โ€ข Device drivers form the interface between the OS (kernel) and the hardware 7
  • 8. BITS Pilani, Pilani Campus I/O in UNIX - Example โ€ข Application level operation โ€“ E.g. printf call โ€ข OS (kernel) level โ€“ System call bwrite โ€ข Device Driver level โ€“ Strategy entry point โ€“ code for write operation โ€ข Device level โ€“ E.g. SCSI protocol command for write 8
  • 9. BITS Pilani, Pilani Campus I/O in UNIX - Devices โ€ข I/O system is used for โ€“ Network communication and virtual memory (Swap space) โ€ข Two types of devices โ€“ Character devices โ€ข Terminals, line printers, main memory โ€“ Block devices โ€ข Disks and Tapes โ€ข Buffering done by kernel 9
  • 10. BITS Pilani, Pilani Campus I/O in UNIX โ€“ Device Drivers โ€ข Device Driver Sections โ€“ Auto-configuration and initialization Routines โ€ข Probe and initialize the device โ€“ Routines for servicing I/O requests โ€ข Invoked because of system calls or VM requests โ€ข Referred to as the โ€œtop-halfโ€ of the driver โ€“ Interrupt service routines โ€ข Invoked by interrupt from a device โ€“ Canโ€™t depend on per-process state โ€“ Canโ€™t block โ€ข Referred to as the โ€œbottom-halfโ€ of the driver 10
  • 11. BITS Pilani, Pilani Campus I/O Queuing and Interrupt Handling โ€ข Each device driver manages one or more queues for I/O requests โ€“ Shared among asynchronous routines โ€“ must be synchronized. โ€“ Multi-process synchronization also required. โ€ข Interrupts are generated by devices โ€“ Signal status change (or completion of operation) โ€“ DD-ISR invoked through a glue routine that is responsible for saving volatile registers. โ€“ ISR removes request from queue, notifies requestor that the command has been executed. 11
  • 12. BITS Pilani, Pilani Campus I/O in UNIX โ€“ Block Devices and I/O โ€ข Disk sector sized read/write โ€“ Conversion of random access to disk sector read/write is known as block I/O โ€“ Kernel buffering reduces latency for multiple reads and writes. 12
  • 13. BITS Pilani, Pilani Campus Device Driver to Disk Interface โ€ข Disk Interface: โ€“ Disk access requires an address: โ€ข device id, LBA OR โ€ข device id, cylinder #, head#, sector #. โ€“ Device drivers need to be aware of disk details for address translation: โ€ข i.e. converting a logical address (say file system level address such as i-node number) to a physical address (i.e. CHS) on the disk; โ€ข they need to be aware of complete disk geometry if CHS addressing is used. โ€“ Early device drivers had hard-coded disk geometries. โ€ข This results in reduced modularity โ€“ โ€“ disks cannot be moved (data mapping is with the device driver); โ€“ device driver upgrades would require shutdowns and data copies. 13
  • 14. BITS Pilani, Pilani Campus Disk Labels โ€ข Disk Geometry and Data mapping is stored on the disk itself. โ€“ Known as disk label. โ€“ Must be stored in a fixed location โ€“ usually 0th block i.e. 0th sector on head 0, cylinder 0. โ€“ Usually this is where bootstrap code is stored โ€ข In which case disk information is part of the bootstrap code, because booting may require disk access. 14
  • 15. BITS Pilani, Pilani Campus Buffering โ€ข Buffer Cache โ€“ Memory buffer for data being transferred to and from disks โ€“ Cache for recently used blocks โ€ข 85% hit rate is typical โ€ข Typical buffer size = 64KB virtual memory โ€ข Buffer pool โ€“ hundreds of buffers โ€ข Consistency issue โ€“ Each disk block mapped to at most one buffer โ€“ Buffers have dirty bits associated โ€“ When a new buffer is allocated and if its disk blocks overlap with that of an existing buffer, then the old buffer must be purged. 15
  • 16. BITS Pilani, Pilani Campus Buffer Pool Management โ€ข Buffer pool is maintained as a (separately chained) hash table indexed by a buffer id โ€ข The buffers in the pool are also in one of four lists: โ€“ Locked list: โ€ข buffers that are currently used for I/O and therefore locked and cannot be released until operation is complete โ€“ LRU list: โ€ข A queue of buffers โ€“ a recently used item is added at the rear of the queue and when a buffer is needed one at the front of the queue is replaced. โ€ข Buffers staying in this queue long enough are migrated to an Aged list โ€“ Aged List: โ€ข Maintained as a list and any element may be used for replacement. โ€“ Empty List โ€ข When a new buffer is needed check in the following order: โ€“ Empty List, Aged List, LRU list 16
  • 17. BITS Pilani, Pilani Campus Thank You! 17