SlideShare a Scribd company logo
1 of 31
Download to read offline
inodes explained
   Tutorial 3 - CSCI212

    by: Roman Tarnavski
Data Blocks

A file system contains ‘blocks’ which hold
data called inodes. A inode describes a
single file in the file system. Typical
information described includes, ownership,
modification times, size and permissions. We
call this information meta-data.
                             Source: CSCI212 Lecture Notes
                                   by: Daniel Saffioti
Data Blocks


Data Blocks

The remainder of the file system (larger proportion)
contains data blocks. These store the contents of
files.

                                 Source: CSCI212 Lecture Notes
                                       by: Daniel Saffioti
Source: CSCI212 Lecture Notes
      by: Daniel Saffioti
Your typical inode
          Mode
       Permissions
           Size
       Timestamps




       Direct Blocks




          Single
         Double
          Triple
Direct
         Data Block 1
         Data Block 2

             .
             .
             .
Direct
Direct   Data Block 3
Direct
Direct
Direct
Direct
Direct
Direct
Direct
Direct
Direct
Direct
Single
Double
Triple
Single
Direct                    Data Block 1
Direct                    Data Block 2
Direct
Direct
Direct                   Data Block 2048

Direct
           Address 1
Direct
           Address 2
Direct
              .
Direct
              .
              .
Direct
          Address 2048
Direct
Direct
Single
Double
Triple
Double
                                          Data Block 1
Direct
                                          Data Block 2
Direct
Direct
Direct                     Address 1
                                         Data Block 2048
Direct                     Address 2
Direct                        .
                              .
                              .
Direct    Address 1
Direct    Address 2       Address 2048
Direct       .                            Data Block 1
             .
             .
Direct                                    Data Block 2
Direct   Address 2048
Direct
                           Address 1
Single                                   Data Block 2048
                           Address 2
Double
                              .
                              .
Triple
                              .
                          Address 2048
Triple
                                                         Data Block 1
                                                         Data Block 2

Direct
                                          Address 1
Direct
                                                        Data Block 2048
                                          Address 2
Direct
                                             .
Direct                                       .
                                             .
          Address 1        Address 1
Direct
          Address 2        Address 2     Address 2048
Direct
             .                .                          Data Block 1
Direct       .                .
             .                .                          Data Block 2
Direct
         Address 2048     Address 2048
Direct
Direct                                    Address 1
                                                        Data Block 2048
Direct                                    Address 2

                                             .
Direct
                                             .
                                             .
Single                     Address 1
Double                                   Address 2048
                           Address 2
Triple                        .
                              .                          Data Block 1
                              .
                                                         Data Block 2
                          Address 2048


                                          Address 1
                                                        Data Block 2048
                                          Address 2

                                             .
                                             .
                           Address 1
                                             .
                           Address 2
                                         Address 2048
                              .
                              .
                              .
                          Address 2048
All Together?
Data Block 1
         Data Block 2

             .
             .
             .
Direct                   Data Block 1
Direct   Data Block 3    Data Block 2
Direct
Direct
Direct                  Data Block 2048

                                           Data Block 1
Direct
          Address 1                        Data Block 2
Direct
                          Address 1
          Address 2
Direct                                    Data Block 2048
                          Address 2
             .
Direct
             .                .
             .
Direct                        .
                              .
         Address 2048                      Data Block 1
Direct
                        Address 2048
                                           Data Block 2
Direct
Single
Double                    Address 1
                                          Data Block 2048
Triple                    Address 2
          Address 1
                              .                                Data Block 1
                              .
          Address 2
                              .                                Data Block 2
             .
             .          Address 2048
             .
                                                 Address 1
         Address 2048
                                                              Data Block 2048
                                                 Address 2

                                                    .
                                                    .
                                                    .
          Address 1         Address 1
          Address 2         Address 2          Address 2048

             .                    .                            Data Block 1
             .                    .
             .                    .                            Data Block 2
         Address 2048     Address 2048

                                                 Address 1
                                                              Data Block 2048
                                                 Address 2

                                                    .
                                                    .
                                                    .
                            Address 1
                                               Address 2048
                            Address 2

                                  .
                                  .                            Data Block 1
                                  .
                                                               Data Block 2
                          Address 2048


                                                 Address 1
                                                              Data Block 2048
                                                 Address 2

                                                    .
                                                    .
                            Address 1
                                                    .
                            Address 2
                                               Address 2048
                                  .
                                  .
                                  .
                          Address 2048
Maximum Size of Direct
       Blocks
Maximum Size of Direct
       Blocks
 Where did the 2048 Addresses come from?
Maximum Size of Direct
       Blocks
 Where did the 2048 Addresses come from?

 Assuming 32-bit architectures
Maximum Size of Direct
       Blocks
 Where did the 2048 Addresses come from?

 Assuming 32-bit architectures

   32-bit = 4 bytes (32 / 8)
Maximum Size of Direct
       Blocks
 Where did the 2048 Addresses come from?

 Assuming 32-bit architectures

   32-bit = 4 bytes (32 / 8)

   Thus 8192                  /4
               [block size]        [bytes per addressable block]
Maximum Size of Direct
       Blocks
 Where did the 2048 Addresses come from?

 Assuming 32-bit architectures

   32-bit = 4 bytes (32 / 8)

   Thus 8192                  /4
               [block size]        [bytes per addressable block]



   = 2048 Addressable Blocks
Questions



What is the maximum possible file size that
can be represented via direct data blocks?
Maximum Size of Direct
       Blocks

    block size
             blocks

 = 8192 x 12 = 98,304 bytes = 96Kb
Maximum FileSize using
 First-Indirect Linking
Maximum FileSize using
 First-Indirect Linking

 Direct: 12 blocks @ 8192 bytes (12 x 8192)
Maximum FileSize using
 First-Indirect Linking

 Direct: 12 blocks @ 8192 bytes (12 x 8192)

   =96Kb
Maximum FileSize using
 First-Indirect Linking

 Direct: 12 blocks @ 8192 bytes (12 x 8192)

    =96Kb

 Indirect: 2048 @ 8192 (2048 x 8192) =
 16,384 Kb = 16,480 [Inclusive of Direct] = 16.09Mb
Maximum using Double
      Indirect

16,875,520 x 2048 addressable blocks

= 34,561,064,960 bytes

= 32,960 Mbytes
Maximum Filesize
        [direct + single + double + triple]




2048 x 32.1875Gb

= 64.375 Tb
Overhead
Overhead
Wish to store: 8,437,760 bytes
Overhead
Wish to store: 8,437,760 bytes

8437760 / 8192   [bytes per block]




= 1030 blocks x 4 bytes              [per address]



BUT
Overhead
Wish to store: 8,437,760 bytes

8437760 / 8192   [bytes per block]




= 1030 blocks x 4 bytes              [per address]



BUT

12 Blocks are stored directly
Overhead
Wish to store: 8,437,760 bytes

8437760 / 8192   [bytes per block]




= 1030 blocks x 4 bytes              [per address]



BUT

12 Blocks are stored directly

Hence we only have 1018 blocks
Overhead
Wish to store: 8,437,760 bytes

8437760 / 8192   [bytes per block]




= 1030 blocks x 4 bytes              [per address]



BUT

12 Blocks are stored directly

Hence we only have 1018 blocks

1018 x 4 bytes = 4072 bytes = 3.98Kbytes

More Related Content

What's hot

System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlocksangrampatil81
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solvingPrabhakaran V M
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Languagefasihuddin90
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory pptRITULDE
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexityAnaya Zafar
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic NotationsRishabh Soni
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208Ameer Mehmood
 

What's hot (20)

System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
 
Demand paging
Demand pagingDemand paging
Demand paging
 
FORESTS
FORESTSFORESTS
FORESTS
 
operating system structure
operating system structureoperating system structure
operating system structure
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Memory management
Memory managementMemory management
Memory management
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solving
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
 
Cache memory
Cache memoryCache memory
Cache memory
 
B trees dbms
B trees dbmsB trees dbms
B trees dbms
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Lec 2 algorithms efficiency complexity
Lec 2 algorithms efficiency  complexityLec 2 algorithms efficiency  complexity
Lec 2 algorithms efficiency complexity
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
 

Viewers also liked

Inode explanation
Inode explanationInode explanation
Inode explanationashishkb
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1Amir Payberah
 
PhD Consortium ADBIS presetation.
PhD Consortium ADBIS presetation.PhD Consortium ADBIS presetation.
PhD Consortium ADBIS presetation.Giuseppe Ricci
 
Unix files
Unix filesUnix files
Unix filesSunil Rm
 
Operating Systems (printouts)
Operating Systems (printouts)Operating Systems (printouts)
Operating Systems (printouts)wx672
 
Unit 8
Unit 8Unit 8
Unit 8siddr
 
Linux shell env
Linux shell envLinux shell env
Linux shell envRahul Pola
 
Unix processes
Unix processesUnix processes
Unix processesSunil Rm
 
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
 
Unit 1
Unit 1Unit 1
Unit 1siddr
 

Viewers also liked (20)

Inode explanation
Inode explanationInode explanation
Inode explanation
 
NTFS and Inode
NTFS and InodeNTFS and Inode
NTFS and Inode
 
Linux
LinuxLinux
Linux
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
Unit 2 ppt
Unit 2 pptUnit 2 ppt
Unit 2 ppt
 
PhD Consortium ADBIS presetation.
PhD Consortium ADBIS presetation.PhD Consortium ADBIS presetation.
PhD Consortium ADBIS presetation.
 
Unix files
Unix filesUnix files
Unix files
 
Operating Systems (printouts)
Operating Systems (printouts)Operating Systems (printouts)
Operating Systems (printouts)
 
Unit 8
Unit 8Unit 8
Unit 8
 
Linux shell env
Linux shell envLinux shell env
Linux shell env
 
Unix processes
Unix processesUnix processes
Unix processes
 
Wafl overview
Wafl overviewWafl overview
Wafl overview
 
Unix ch03-03(2)
Unix ch03-03(2)Unix ch03-03(2)
Unix ch03-03(2)
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
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
 
Unix kernal
Unix kernalUnix kernal
Unix kernal
 
Unix training session 1
Unix training   session 1Unix training   session 1
Unix training session 1
 
Ch2
Ch2Ch2
Ch2
 
Unit 1
Unit 1Unit 1
Unit 1
 

Recently uploaded

Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 

Recently uploaded (20)

Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 

Exploring Inodes and Data Blocks in File Systems

  • 1. inodes explained Tutorial 3 - CSCI212 by: Roman Tarnavski
  • 2. Data Blocks A file system contains ‘blocks’ which hold data called inodes. A inode describes a single file in the file system. Typical information described includes, ownership, modification times, size and permissions. We call this information meta-data. Source: CSCI212 Lecture Notes by: Daniel Saffioti
  • 3. Data Blocks Data Blocks The remainder of the file system (larger proportion) contains data blocks. These store the contents of files. Source: CSCI212 Lecture Notes by: Daniel Saffioti
  • 4. Source: CSCI212 Lecture Notes by: Daniel Saffioti
  • 5. Your typical inode Mode Permissions Size Timestamps Direct Blocks Single Double Triple
  • 6. Direct Data Block 1 Data Block 2 . . . Direct Direct Data Block 3 Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Single Double Triple
  • 7. Single Direct Data Block 1 Direct Data Block 2 Direct Direct Direct Data Block 2048 Direct Address 1 Direct Address 2 Direct . Direct . . Direct Address 2048 Direct Direct Single Double Triple
  • 8. Double Data Block 1 Direct Data Block 2 Direct Direct Direct Address 1 Data Block 2048 Direct Address 2 Direct . . . Direct Address 1 Direct Address 2 Address 2048 Direct . Data Block 1 . . Direct Data Block 2 Direct Address 2048 Direct Address 1 Single Data Block 2048 Address 2 Double . . Triple . Address 2048
  • 9. Triple Data Block 1 Data Block 2 Direct Address 1 Direct Data Block 2048 Address 2 Direct . Direct . . Address 1 Address 1 Direct Address 2 Address 2 Address 2048 Direct . . Data Block 1 Direct . . . . Data Block 2 Direct Address 2048 Address 2048 Direct Direct Address 1 Data Block 2048 Direct Address 2 . Direct . . Single Address 1 Double Address 2048 Address 2 Triple . . Data Block 1 . Data Block 2 Address 2048 Address 1 Data Block 2048 Address 2 . . Address 1 . Address 2 Address 2048 . . . Address 2048
  • 11. Data Block 1 Data Block 2 . . . Direct Data Block 1 Direct Data Block 3 Data Block 2 Direct Direct Direct Data Block 2048 Data Block 1 Direct Address 1 Data Block 2 Direct Address 1 Address 2 Direct Data Block 2048 Address 2 . Direct . . . Direct . . Address 2048 Data Block 1 Direct Address 2048 Data Block 2 Direct Single Double Address 1 Data Block 2048 Triple Address 2 Address 1 . Data Block 1 . Address 2 . Data Block 2 . . Address 2048 . Address 1 Address 2048 Data Block 2048 Address 2 . . . Address 1 Address 1 Address 2 Address 2 Address 2048 . . Data Block 1 . . . . Data Block 2 Address 2048 Address 2048 Address 1 Data Block 2048 Address 2 . . . Address 1 Address 2048 Address 2 . . Data Block 1 . Data Block 2 Address 2048 Address 1 Data Block 2048 Address 2 . . Address 1 . Address 2 Address 2048 . . . Address 2048
  • 12. Maximum Size of Direct Blocks
  • 13. Maximum Size of Direct Blocks Where did the 2048 Addresses come from?
  • 14. Maximum Size of Direct Blocks Where did the 2048 Addresses come from? Assuming 32-bit architectures
  • 15. Maximum Size of Direct Blocks Where did the 2048 Addresses come from? Assuming 32-bit architectures 32-bit = 4 bytes (32 / 8)
  • 16. Maximum Size of Direct Blocks Where did the 2048 Addresses come from? Assuming 32-bit architectures 32-bit = 4 bytes (32 / 8) Thus 8192 /4 [block size] [bytes per addressable block]
  • 17. Maximum Size of Direct Blocks Where did the 2048 Addresses come from? Assuming 32-bit architectures 32-bit = 4 bytes (32 / 8) Thus 8192 /4 [block size] [bytes per addressable block] = 2048 Addressable Blocks
  • 18. Questions What is the maximum possible file size that can be represented via direct data blocks?
  • 19. Maximum Size of Direct Blocks block size blocks = 8192 x 12 = 98,304 bytes = 96Kb
  • 20. Maximum FileSize using First-Indirect Linking
  • 21. Maximum FileSize using First-Indirect Linking Direct: 12 blocks @ 8192 bytes (12 x 8192)
  • 22. Maximum FileSize using First-Indirect Linking Direct: 12 blocks @ 8192 bytes (12 x 8192) =96Kb
  • 23. Maximum FileSize using First-Indirect Linking Direct: 12 blocks @ 8192 bytes (12 x 8192) =96Kb Indirect: 2048 @ 8192 (2048 x 8192) = 16,384 Kb = 16,480 [Inclusive of Direct] = 16.09Mb
  • 24. Maximum using Double Indirect 16,875,520 x 2048 addressable blocks = 34,561,064,960 bytes = 32,960 Mbytes
  • 25. Maximum Filesize [direct + single + double + triple] 2048 x 32.1875Gb = 64.375 Tb
  • 27. Overhead Wish to store: 8,437,760 bytes
  • 28. Overhead Wish to store: 8,437,760 bytes 8437760 / 8192 [bytes per block] = 1030 blocks x 4 bytes [per address] BUT
  • 29. Overhead Wish to store: 8,437,760 bytes 8437760 / 8192 [bytes per block] = 1030 blocks x 4 bytes [per address] BUT 12 Blocks are stored directly
  • 30. Overhead Wish to store: 8,437,760 bytes 8437760 / 8192 [bytes per block] = 1030 blocks x 4 bytes [per address] BUT 12 Blocks are stored directly Hence we only have 1018 blocks
  • 31. Overhead Wish to store: 8,437,760 bytes 8437760 / 8192 [bytes per block] = 1030 blocks x 4 bytes [per address] BUT 12 Blocks are stored directly Hence we only have 1018 blocks 1018 x 4 bytes = 4072 bytes = 3.98Kbytes