SlideShare a Scribd company logo
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 forensics
Gaurav Ragtah
 
Fat File Systems
Fat File SystemsFat File Systems
Fat File Systems
ArthyR3
 
Alternate Data Streams
Alternate Data StreamsAlternate Data Streams
Alternate Data Streams
nephijohnson
 
Fat 32 file system
Fat 32 file systemFat 32 file system
Fat 32 file system
keshav546
 
Root file system
Root file systemRoot file system
Root file system
Bindu U
 
File system security
File system securityFile system security
File system security
AmmAr mobark
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
MythiliA5
 
Ntfs forensics
Ntfs forensicsNtfs forensics
Ch12 OS
Ch12 OSCh12 OS
Ch12 OS
C.U
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne 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
 
OSCh21
OSCh21OSCh21
File system.
File system.File system.
File system.
elyza12
 
NTFS vs FAT
NTFS vs FATNTFS vs FAT
NTFS vs FAT
Tanveer Ahmed
 
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
IJNSA Journal
 
File system interface Pre Final
File system interface Pre FinalFile system interface Pre Final
File system interface Pre Final
marangburu42
 

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 10
Techvilla
 
Rasperry pi Part 13
Rasperry pi Part 13Rasperry pi Part 13
Rasperry pi Part 13
Techvilla
 
Robotics part-1
Robotics part-1Robotics part-1
Robotics part-1
Techvilla
 
Serial Communication Part-16
Serial Communication Part-16Serial Communication Part-16
Serial Communication Part-16
Techvilla
 
Raspberry pi Part 23
Raspberry pi Part 23Raspberry pi Part 23
Raspberry pi Part 23
Techvilla
 
Raspberry pi Part 25
Raspberry pi Part 25Raspberry pi Part 25
Raspberry pi Part 25
Techvilla
 
Raspberry pi Part 17
Raspberry pi Part 17Raspberry pi Part 17
Raspberry pi Part 17
Techvilla
 
Motor Part 12
Motor Part 12Motor Part 12
Motor Part 12
Techvilla
 
EEPROM Part-21
EEPROM Part-21EEPROM Part-21
EEPROM Part-21
Techvilla
 
Raspberry pi Part 26
Raspberry pi Part 26Raspberry pi Part 26
Raspberry pi Part 26
Techvilla
 
Raspberry pi Part 1
 Raspberry pi Part 1 Raspberry pi Part 1
Raspberry pi Part 1
Techvilla
 
Rasperry pi Part 9
Rasperry pi Part 9Rasperry pi Part 9
Rasperry pi Part 9
Techvilla
 
Raspberry pi Part 22
Raspberry pi Part 22Raspberry pi Part 22
Raspberry pi Part 22
Techvilla
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
Techvilla
 
RF MODULE Part-15
RF MODULE Part-15RF MODULE Part-15
RF MODULE Part-15
Techvilla
 
Raspberry pi Part 3
Raspberry pi Part 3Raspberry pi Part 3
Raspberry pi Part 3
Techvilla
 
Bluetooth Part-17
Bluetooth Part-17Bluetooth Part-17
Bluetooth Part-17
Techvilla
 
RFID Part-19
RFID Part-19RFID Part-19
RFID Part-19
Techvilla
 

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

why we need ext4
why we need ext4why we need ext4
why we need ext4
Hao(Robin) Dong
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
Neha Kulkarni
 
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
Sowmya Jyothi
 
Lucene indexing
Lucene indexingLucene indexing
Lucene indexing
Lucky Sharma
 
Internal representation of files ppt
Internal representation of files pptInternal representation of files ppt
Internal representation of files ppt
Abhaysinh 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-phpapp02
Hao(Robin) Dong
 
OS_Ch12
OS_Ch12OS_Ch12
OSCh12
OSCh12OSCh12
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
donny101
 
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
 
Filepointers1 1215104829397318-9
Filepointers1 1215104829397318-9Filepointers1 1215104829397318-9
Filepointers1 1215104829397318-9
AbdulghafarStanikzai
 
File management
File managementFile management
File management
sangrampatil81
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methods
sangrampatil81
 
TLPI Chapter 14 File Systems
TLPI Chapter 14 File SystemsTLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
Shu-Yu Fu
 
Elasticsearch Architechture
Elasticsearch ArchitechtureElasticsearch Architechture
Elasticsearch Architechture
Anurag Sharma
 
DBMS-Unit5-PPT.pptx important for revision
DBMS-Unit5-PPT.pptx important for revisionDBMS-Unit5-PPT.pptx important for revision
DBMS-Unit5-PPT.pptx important for revision
yuvivarmaa
 
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
susannr
 
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
susannr
 
Directory structure
Directory structureDirectory structure
Directory structure
sangrampatil81
 

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
 
OS_Ch12
OS_Ch12OS_Ch12
OS_Ch12
 
OSCh12
OSCh12OSCh12
OSCh12
 
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
 
DBMS-Unit5-PPT.pptx important for revision
DBMS-Unit5-PPT.pptx important for revisionDBMS-Unit5-PPT.pptx important for revision
DBMS-Unit5-PPT.pptx important for revision
 
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
 

More from Techvilla

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

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

basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 

Recently uploaded (20)

basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 

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.