SlideShare a Scribd company logo
1 of 21
www.techvilla.org.in
TECHVILLA
www.techvilla.org.in
www.techvilla.org.in
Linux File system
 Introduction
 File System Layout
 Metadata Concepts
 Indexing and Directories
 Journaling
 Example
 Conclusion
www.techvilla.org.in
Introduction
 Ext2 and Ext3 are the default Linux file system.
 Ext3 is the new version of Ext2 and adds journaling mechanism, but
the basic structures are the same.
 The metadata is stored throughout the file system, and the
metadata which is associated with a file are stored “near” it
www.techvilla.org.in
File System Layout
 The whole area is divided into several block groups, and block
groups contains several blocks.
 A block group is used to store file metadata and file content
Block Group 0 Block Group 1
Super
Block
Group
Desc
Table
Block
Bitmap
Inode
Bitmap
Inode
Table
File
Data
… File
Data
Block
Bitmap
Inode
Bitmap
www.techvilla.org.in
Metadata Concepts
 Superblock:
 The Ext2 superblock is located 1024 bytes from the start of the file system
and is 1024 bytes in size. ( The first two sectors are used to store boot
code if necessary)
 Back up copies are typically stored in the first file data block of each
block group
 It contains basic information of the file system, such as the block size, the
total number of blocks, etc.
www.techvilla.org.in
Metadata Concepts
 Block Group Descriptor Table:
 It contains a group descriptor data structure for every block group.
 The group descriptor stores the address of block bitmap and inode
bitmap for the block group.
 Bitmaps:
 The block bitmap manages the allocation status of the blocks in the
group.
 The inode bitmap manages the allocation status of the inodes in the
group
www.techvilla.org.in
Metadata Concepts
Super
Block
Block
Desc
Table
Block
Bitmap
Block
Bitmap
Block
Bitmap…
Group 0
Group 1
Group n
Inode
Bitmap
Inode
Table
Inode
Bitmap
Inode
Table
Inode
Bitmap
Inode
Table
www.techvilla.org.in
Metadata Concepts
 Inode Tables:
 Inode table contains the inodes that describes the files in the group
 Inodes:
 Each inode corresponds to one file, and it stores file’s primary metadata,
such as file’s size, ownership, and temporal information.
 Inode is typically 128 bytes in size and is allocated to each file and
directory
www.techvilla.org.in
Metadata Concepts
Inode Structure
www.techvilla.org.in
Metadata Concepts
 Inode Allocation:
 If a new inode is for a non-directory file, Ext2 allocates an inode in the
same block group as the parent directory.
 If that group has no free inode or block, Ext2 uses a quadratic search
(add powers of 2 to the current group)
 If quadratic search fails, Ext2 uses linear search.
www.techvilla.org.in
Metadata Concepts
 Inode Allocation:
 If a new inode is for a directory, Ext2 tries to place it in a group that has
not been used much.
 Using total number of free inodes and blocks in the superblock, Ext2
calculates the average free inodes and blocks per group.
 Ext2 searches each of the group and uses the first one whose free
inodes and blocks are less than the average.
 If the pervious search fails, the group with the smallest number of
directories is used.
www.techvilla.org.in
Metadata Concepts
 Ext2 uses blocks as its data unit and is similar to clusters in FAT and
NTFS.
 The default size of blocks is 4KB, and the size is given in the
superblock.
 When a block s allocated to an inode, Ext2 will try to allocate in the
same group as the inode and use first-available strategy.
www.techvilla.org.in
Indexing and Directories
 An Ext2 is just like a regular file except it has a special type value.
 The content of directories is a list of directory entry data
structure, which describes file name and inode address.
 The length of directory entry varies from 1 to 255 bytes.
 There are two fields in the directory entry:
 Name length: the length of the file name
 Record length: the length of this directory entry
www.techvilla.org.in
Indexing and Directories
When Ext2 wants to delete a directory entry, it just increase the record
length of the previous entry to the end to deleted entry.
www.techvilla.org.in
Indexing and Directories
 Directory entry allocation:
 Ext2 starts at the beginning of the directory and examines each
directory entry.
 Calculate the actual record length and compare with the record
length field.
 If they are different, Ext2 can insert the new directory entry at the end of
the current entry.
 Else, Ext2 appends the new entry to the end of the entry list.
www.techvilla.org.in
Journaling
 A file system journaling records updates to the file system can be
recovered after a crash.
 There are two modes of journaling:
 Only metadata updates are recorded
 All updates are recorded
 Journaling in Ext3 is done at block level
 The first block in the journal is journal superblock, and it contains the
first logging data address and its sequence number.
www.techvilla.org.in
Journaling
 Updates are done in transactions, and each transaction has a
sequence number.
 Each transaction starts with a descriptor block that contains the
transaction sequence number and a list of what blocks are being
updated.
 Following the descriptor block are the updated blocks.
 When the updates have been written to disk, a commit block is
written with the same sequence number.
www.techvilla.org.in
Journaling
www.techvilla.org.in
Example
 Suppose we create a file1.dat under /dir/ in Ext3.
www.techvilla.org.in
www.techvilla.org.in
Conclusion
 Ext2/3 separates the file system into several block groups, and each
group has its own metadata blocks.
 Inode is the primary metadata structure for a file in Ext2.
 Ext3 adds transaction-based journaling mechanism.

More Related Content

What's hot

Ntfs and computer forensics
Ntfs and computer forensicsNtfs and computer forensics
Ntfs and computer forensicsGaurav Ragtah
 
Fat File Systems
Fat File SystemsFat File Systems
Fat File SystemsArthyR3
 
Alternate Data Streams
Alternate Data StreamsAlternate Data Streams
Alternate Data Streamsnephijohnson
 
Fat 32 file system
Fat 32 file systemFat 32 file system
Fat 32 file systemkeshav546
 
Root file system
Root file systemRoot file system
Root file systemBindu U
 
File system security
File system securityFile system security
File system securityAmmAr mobark
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and outputMythiliA5
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OSC.U
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System InterfaceWayne Jones Jnr
 
A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)Parang Saraf
 
File system.
File system.File system.
File system.elyza12
 
KVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSE
KVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSEKVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSE
KVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSEIJNSA Journal
 
File system interface Pre Final
File system interface Pre FinalFile system interface Pre Final
File system interface Pre Finalmarangburu42
 

What's hot (16)

Ntfs and computer forensics
Ntfs and computer forensicsNtfs and computer forensics
Ntfs and computer forensics
 
Fat File Systems
Fat File SystemsFat File Systems
Fat File Systems
 
Alternate Data Streams
Alternate Data StreamsAlternate Data Streams
Alternate Data Streams
 
Fat 32 file system
Fat 32 file systemFat 32 file system
Fat 32 file system
 
Root file system
Root file systemRoot file system
Root file system
 
File system security
File system securityFile system security
File system security
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
 
Ntfs forensics
Ntfs forensicsNtfs forensics
Ntfs forensics
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OS
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)A fast file system for unix presentation by parang saraf (cs5204 VT)
A fast file system for unix presentation by parang saraf (cs5204 VT)
 
OSCh21
OSCh21OSCh21
OSCh21
 
File system.
File system.File system.
File system.
 
NTFS vs FAT
NTFS vs FATNTFS vs FAT
NTFS vs FAT
 
KVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSE
KVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSEKVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSE
KVEFS: Encrypted File System based on Distributed Key-Value Stores and FUSE
 
File system interface Pre Final
File system interface Pre FinalFile system interface Pre Final
File system interface Pre Final
 

Viewers also liked

Light & humidity Part 10
Light & humidity Part 10Light & humidity Part 10
Light & humidity Part 10Techvilla
 
Rasperry pi Part 13
Rasperry pi Part 13Rasperry pi Part 13
Rasperry pi Part 13Techvilla
 
Robotics part-1
Robotics part-1Robotics part-1
Robotics part-1Techvilla
 
Serial Communication Part-16
Serial Communication Part-16Serial Communication Part-16
Serial Communication Part-16Techvilla
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23Techvilla
 
Raspberry pi Part 25
Raspberry pi Part 25Raspberry pi Part 25
Raspberry pi Part 25Techvilla
 
Raspberry pi Part 17
Raspberry pi Part 17Raspberry pi Part 17
Raspberry pi Part 17Techvilla
 
Motor Part 12
Motor Part 12Motor Part 12
Motor Part 12Techvilla
 
EEPROM Part-21
EEPROM Part-21EEPROM Part-21
EEPROM Part-21Techvilla
 
Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26Techvilla
 
Raspberry pi Part 1
 Raspberry pi Part 1 Raspberry pi Part 1
Raspberry pi Part 1Techvilla
 
Rasperry pi Part 9
Rasperry pi Part 9Rasperry pi Part 9
Rasperry pi Part 9Techvilla
 
Raspberry pi Part 22
Raspberry pi Part 22Raspberry pi Part 22
Raspberry pi Part 22Techvilla
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23Techvilla
 
RF MODULE Part-15
RF MODULE Part-15RF MODULE Part-15
RF MODULE Part-15Techvilla
 
Raspberry pi Part 3
Raspberry pi Part 3Raspberry pi Part 3
Raspberry pi Part 3Techvilla
 
Bluetooth Part-17
Bluetooth Part-17Bluetooth Part-17
Bluetooth Part-17Techvilla
 
RFID Part-19
RFID Part-19RFID Part-19
RFID Part-19Techvilla
 

Viewers also liked (18)

Light & humidity Part 10
Light & humidity Part 10Light & humidity Part 10
Light & humidity Part 10
 
Rasperry pi Part 13
Rasperry pi Part 13Rasperry pi Part 13
Rasperry pi Part 13
 
Robotics part-1
Robotics part-1Robotics part-1
Robotics part-1
 
Serial Communication Part-16
Serial Communication Part-16Serial Communication Part-16
Serial Communication Part-16
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23
 
Raspberry pi Part 25
Raspberry pi Part 25Raspberry pi Part 25
Raspberry pi Part 25
 
Raspberry pi Part 17
Raspberry pi Part 17Raspberry pi Part 17
Raspberry pi Part 17
 
Motor Part 12
Motor Part 12Motor Part 12
Motor Part 12
 
EEPROM Part-21
EEPROM Part-21EEPROM Part-21
EEPROM Part-21
 
Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26
 
Raspberry pi Part 1
 Raspberry pi Part 1 Raspberry pi Part 1
Raspberry pi Part 1
 
Rasperry pi Part 9
Rasperry pi Part 9Rasperry pi Part 9
Rasperry pi Part 9
 
Raspberry pi Part 22
Raspberry pi Part 22Raspberry pi Part 22
Raspberry pi Part 22
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
RF MODULE Part-15
RF MODULE Part-15RF MODULE Part-15
RF MODULE Part-15
 
Raspberry pi Part 3
Raspberry pi Part 3Raspberry pi Part 3
Raspberry pi Part 3
 
Bluetooth Part-17
Bluetooth Part-17Bluetooth Part-17
Bluetooth Part-17
 
RFID Part-19
RFID Part-19RFID Part-19
RFID Part-19
 

Similar to Raspberry pi Part 5

Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiSowmya Jyothi
 
Internal representation of files ppt
Internal representation of files pptInternal representation of files ppt
Internal representation of files pptAbhaysinh Surve
 
The Storage Systems
The Storage Systems The Storage Systems
The Storage Systems Dhaivat Zala
 
ext2-110628041727-phpapp02
ext2-110628041727-phpapp02ext2-110628041727-phpapp02
ext2-110628041727-phpapp02Hao(Robin) Dong
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systemsdonny101
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems senthilamul
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methodssangrampatil81
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsShu-Yu Fu
 
Elasticsearch Architechture
Elasticsearch ArchitechtureElasticsearch Architechture
Elasticsearch ArchitechtureAnurag Sharma
 
There are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docxThere are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docxsusannr
 
There are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxThere are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxsusannr
 
File management
File managementFile management
File managementMohd Arif
 

Similar to Raspberry pi Part 5 (20)

why we need ext4
why we need ext4why we need ext4
why we need ext4
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya Jyothi
 
Lucene indexing
Lucene indexingLucene indexing
Lucene indexing
 
Internal representation of files ppt
Internal representation of files pptInternal representation of files ppt
Internal representation of files ppt
 
The Storage Systems
The Storage Systems The Storage Systems
The Storage Systems
 
ext2-110628041727-phpapp02
ext2-110628041727-phpapp02ext2-110628041727-phpapp02
ext2-110628041727-phpapp02
 
OSCh12
OSCh12OSCh12
OSCh12
 
OS_Ch12
OS_Ch12OS_Ch12
OS_Ch12
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems
 
Filepointers1 1215104829397318-9
Filepointers1 1215104829397318-9Filepointers1 1215104829397318-9
Filepointers1 1215104829397318-9
 
File management
File managementFile management
File management
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methods
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
 
Elasticsearch Architechture
Elasticsearch ArchitechtureElasticsearch Architechture
Elasticsearch Architechture
 
There are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docxThere are 4 parts for the project. The question may be long to r.docx
There are 4 parts for the project. The question may be long to r.docx
 
There are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docxThere are 4 parts for the project. The question may be long to read .docx
There are 4 parts for the project. The question may be long to read .docx
 
Directory structure
Directory structureDirectory structure
Directory structure
 
File management
File managementFile management
File management
 

More from Techvilla

Raspberry pi Part 24
Raspberry pi Part 24Raspberry pi Part 24
Raspberry pi Part 24Techvilla
 
Raspberry pi Part 21
Raspberry pi Part 21Raspberry pi Part 21
Raspberry pi Part 21Techvilla
 
Raspberry pi Part 20
Raspberry pi Part 20Raspberry pi Part 20
Raspberry pi Part 20Techvilla
 
Raspberry pi Part 19
Raspberry pi Part 19Raspberry pi Part 19
Raspberry pi Part 19Techvilla
 
Raspberry pi Part 18
Raspberry pi Part 18Raspberry pi Part 18
Raspberry pi Part 18Techvilla
 
Raspberry pi Part 16
Raspberry pi Part 16Raspberry pi Part 16
Raspberry pi Part 16Techvilla
 
Rasperry pi Part 15
Rasperry pi Part 15Rasperry pi Part 15
Rasperry pi Part 15Techvilla
 
Rasperry pi Part 12
Rasperry pi Part 12Rasperry pi Part 12
Rasperry pi Part 12Techvilla
 
Rasperry pi Part 10
Rasperry pi Part 10Rasperry pi Part 10
Rasperry pi Part 10Techvilla
 
Rasperry pi Part 8
Rasperry pi Part 8Rasperry pi Part 8
Rasperry pi Part 8Techvilla
 
Rasperry pi Part 7
Rasperry pi Part 7Rasperry pi Part 7
Rasperry pi Part 7Techvilla
 
Raspberry pi Part 6
Raspberry pi Part 6Raspberry pi Part 6
Raspberry pi Part 6Techvilla
 
Raspberry pi Part 4
Raspberry pi Part 4Raspberry pi Part 4
Raspberry pi Part 4Techvilla
 
WIFI MODEM Part-22
WIFI MODEM Part-22WIFI MODEM Part-22
WIFI MODEM Part-22Techvilla
 

More from Techvilla (15)

Raspberry pi Part 24
Raspberry pi Part 24Raspberry pi Part 24
Raspberry pi Part 24
 
Raspberry pi Part 21
Raspberry pi Part 21Raspberry pi Part 21
Raspberry pi Part 21
 
Raspberry pi Part 20
Raspberry pi Part 20Raspberry pi Part 20
Raspberry pi Part 20
 
Raspberry pi Part 19
Raspberry pi Part 19Raspberry pi Part 19
Raspberry pi Part 19
 
Raspberry pi Part 18
Raspberry pi Part 18Raspberry pi Part 18
Raspberry pi Part 18
 
Raspberry pi Part 16
Raspberry pi Part 16Raspberry pi Part 16
Raspberry pi Part 16
 
Rasperry pi Part 15
Rasperry pi Part 15Rasperry pi Part 15
Rasperry pi Part 15
 
Rasperry pi Part 12
Rasperry pi Part 12Rasperry pi Part 12
Rasperry pi Part 12
 
Rasperry pi Part 10
Rasperry pi Part 10Rasperry pi Part 10
Rasperry pi Part 10
 
Rasperry pi Part 8
Rasperry pi Part 8Rasperry pi Part 8
Rasperry pi Part 8
 
Rasperry pi Part 7
Rasperry pi Part 7Rasperry pi Part 7
Rasperry pi Part 7
 
Raspberry pi Part 6
Raspberry pi Part 6Raspberry pi Part 6
Raspberry pi Part 6
 
Raspberry pi Part 4
Raspberry pi Part 4Raspberry pi Part 4
Raspberry pi Part 4
 
WIFI MODEM Part-22
WIFI MODEM Part-22WIFI MODEM Part-22
WIFI MODEM Part-22
 
GSM Part-20
GSM Part-20GSM Part-20
GSM Part-20
 

Recently uploaded

High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

Raspberry pi Part 5

  • 2. www.techvilla.org.in Linux File system  Introduction  File System Layout  Metadata Concepts  Indexing and Directories  Journaling  Example  Conclusion
  • 3. www.techvilla.org.in Introduction  Ext2 and Ext3 are the default Linux file system.  Ext3 is the new version of Ext2 and adds journaling mechanism, but the basic structures are the same.  The metadata is stored throughout the file system, and the metadata which is associated with a file are stored “near” it
  • 4. www.techvilla.org.in File System Layout  The whole area is divided into several block groups, and block groups contains several blocks.  A block group is used to store file metadata and file content Block Group 0 Block Group 1 Super Block Group Desc Table Block Bitmap Inode Bitmap Inode Table File Data … File Data Block Bitmap Inode Bitmap
  • 5. www.techvilla.org.in Metadata Concepts  Superblock:  The Ext2 superblock is located 1024 bytes from the start of the file system and is 1024 bytes in size. ( The first two sectors are used to store boot code if necessary)  Back up copies are typically stored in the first file data block of each block group  It contains basic information of the file system, such as the block size, the total number of blocks, etc.
  • 6. www.techvilla.org.in Metadata Concepts  Block Group Descriptor Table:  It contains a group descriptor data structure for every block group.  The group descriptor stores the address of block bitmap and inode bitmap for the block group.  Bitmaps:  The block bitmap manages the allocation status of the blocks in the group.  The inode bitmap manages the allocation status of the inodes in the group
  • 7. www.techvilla.org.in Metadata Concepts Super Block Block Desc Table Block Bitmap Block Bitmap Block Bitmap… Group 0 Group 1 Group n Inode Bitmap Inode Table Inode Bitmap Inode Table Inode Bitmap Inode Table
  • 8. www.techvilla.org.in Metadata Concepts  Inode Tables:  Inode table contains the inodes that describes the files in the group  Inodes:  Each inode corresponds to one file, and it stores file’s primary metadata, such as file’s size, ownership, and temporal information.  Inode is typically 128 bytes in size and is allocated to each file and directory
  • 10. www.techvilla.org.in Metadata Concepts  Inode Allocation:  If a new inode is for a non-directory file, Ext2 allocates an inode in the same block group as the parent directory.  If that group has no free inode or block, Ext2 uses a quadratic search (add powers of 2 to the current group)  If quadratic search fails, Ext2 uses linear search.
  • 11. www.techvilla.org.in Metadata Concepts  Inode Allocation:  If a new inode is for a directory, Ext2 tries to place it in a group that has not been used much.  Using total number of free inodes and blocks in the superblock, Ext2 calculates the average free inodes and blocks per group.  Ext2 searches each of the group and uses the first one whose free inodes and blocks are less than the average.  If the pervious search fails, the group with the smallest number of directories is used.
  • 12. www.techvilla.org.in Metadata Concepts  Ext2 uses blocks as its data unit and is similar to clusters in FAT and NTFS.  The default size of blocks is 4KB, and the size is given in the superblock.  When a block s allocated to an inode, Ext2 will try to allocate in the same group as the inode and use first-available strategy.
  • 13. www.techvilla.org.in Indexing and Directories  An Ext2 is just like a regular file except it has a special type value.  The content of directories is a list of directory entry data structure, which describes file name and inode address.  The length of directory entry varies from 1 to 255 bytes.  There are two fields in the directory entry:  Name length: the length of the file name  Record length: the length of this directory entry
  • 14. www.techvilla.org.in Indexing and Directories When Ext2 wants to delete a directory entry, it just increase the record length of the previous entry to the end to deleted entry.
  • 15. www.techvilla.org.in Indexing and Directories  Directory entry allocation:  Ext2 starts at the beginning of the directory and examines each directory entry.  Calculate the actual record length and compare with the record length field.  If they are different, Ext2 can insert the new directory entry at the end of the current entry.  Else, Ext2 appends the new entry to the end of the entry list.
  • 16. www.techvilla.org.in Journaling  A file system journaling records updates to the file system can be recovered after a crash.  There are two modes of journaling:  Only metadata updates are recorded  All updates are recorded  Journaling in Ext3 is done at block level  The first block in the journal is journal superblock, and it contains the first logging data address and its sequence number.
  • 17. www.techvilla.org.in Journaling  Updates are done in transactions, and each transaction has a sequence number.  Each transaction starts with a descriptor block that contains the transaction sequence number and a list of what blocks are being updated.  Following the descriptor block are the updated blocks.  When the updates have been written to disk, a commit block is written with the same sequence number.
  • 19. www.techvilla.org.in Example  Suppose we create a file1.dat under /dir/ in Ext3.
  • 21. www.techvilla.org.in Conclusion  Ext2/3 separates the file system into several block groups, and each group has its own metadata blocks.  Inode is the primary metadata structure for a file in Ext2.  Ext3 adds transaction-based journaling mechanism.