SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
inodes explained
   Tutorial 3 - CSCI212

    by: Roman Tarnavski
Data Blocks

A ïŹle system contains ‘blocks’ which hold
data called inodes. A inode describes a
single ïŹle in the ïŹle system. Typical
information described includes, ownership,
modiïŹcation times, size and permissions. We
call this information meta-data.
                             Source: CSCI212 Lecture Notes
                                   by: Daniel SafïŹoti
Data Blocks


Data Blocks

The remainder of the ïŹle system (larger proportion)
contains data blocks. These store the contents of
ïŹles.

                                 Source: CSCI212 Lecture Notes
                                       by: Daniel SafïŹoti
Source: CSCI212 Lecture Notes
      by: Daniel SafïŹoti
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
Direct     Address 1

Direct     Address 2

Direct        .
              .
Direct        .
Direct    Address 2048

Direct
Single
Double
Triple
Double
Direct                                    Data Block 1

Direct                                    Data Block 2

Direct
Direct                     Address 1
Direct                     Address 2     Data Block 2048

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
Direct                                    Address 1
                                          Address 2     Data Block 2048
Direct
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                                    Address 1
Direct                                    Address 2     Data Block 2048

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


                                          Address 1
                                          Address 2     Data Block 2048

                                             .
                           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

Direct                                     Data Block 1

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

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

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

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

                                                 Address 1
                                                 Address 2    Data Block 2048

                                                    .
                                                    .
                            Address 1               .
                            Address 2          Address 2048

                                  .
                                  .                            Data Block 1
                                  .
                                                               Data Block 2
                          Address 2048


                                                 Address 1
                                                 Address 2    Data Block 2048

                                                    .
                            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   [block size]   /4   [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   [block size]   /4   [bytes per addressable block]



   = 2048 Addressable Blocks
Questions



What is the maximum possible ïŹle 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

Weitere Àhnliche Inhalte

Andere mochten auch

Unix File System
Unix File SystemUnix File System
Unix File System
student(MCA)
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structure
Teja Bheemanapally
 
Linux file system
Linux file systemLinux file system
Linux file system
Burhan Abbasi
 
File management
File managementFile management
File management
Mohd Arif
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
Piyush Rochwani
 

Andere mochten auch (19)

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 training session 1
Unix training   session 1Unix training   session 1
Unix training session 1
 
SO-08 Sistemas de Arquivos
SO-08 Sistemas de ArquivosSO-08 Sistemas de Arquivos
SO-08 Sistemas de Arquivos
 
NTFS and Inode
NTFS and InodeNTFS and Inode
NTFS and Inode
 
The linux file system structure
The linux file system structureThe linux file system structure
The linux file system structure
 
Mca ii os u-5 unix linux file system
Mca  ii  os u-5 unix linux file systemMca  ii  os u-5 unix linux file system
Mca ii os u-5 unix linux file system
 
Linux file system
Linux file systemLinux file system
Linux file system
 
ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 - 4부. í”„ëĄœì„žìŠ€ 읎핎하Ʞ
ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 - 4부. í”„ëĄœì„žìŠ€ ìŽí•Ží•˜êž°ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 - 4부. í”„ëĄœì„žìŠ€ 읎핎하Ʞ
ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 - 4부. í”„ëĄœì„žìŠ€ 읎핎하Ʞ
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 8부 - 1,2,3임
ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 8부 - 1,2,3ìž„ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 8부 - 1,2,3임
ì‹€ëŹŽëĄœ 배우는 시슀템 성늄 씜적화 8부 - 1,2,3임
 
á„‰á…”á†Żá„†á…źá„…á…©á„‡á…ąá„‹á…źá„‚á…łá†«á„‰á…”á„‰á…łá„á…Šá†·á„‰á…„á†Œá„‚á…łá†Œá„Žá…Źá„Œá…„á†šá„’á…Ș Ch1
á„‰á…”á†Żá„†á…źá„…á…©á„‡á…ąá„‹á…źá„‚á…łá†«á„‰á…”á„‰á…łá„á…Šá†·á„‰á…„á†Œá„‚á…łá†Œá„Žá…Źá„Œá…„á†šá„’á…Ș Ch1á„‰á…”á†Żá„†á…źá„…á…©á„‡á…ąá„‹á…źá„‚á…łá†«á„‰á…”á„‰á…łá„á…Šá†·á„‰á…„á†Œá„‚á…łá†Œá„Žá…Źá„Œá…„á†šá„’á…Ș Ch1
á„‰á…”á†Żá„†á…źá„…á…©á„‡á…ąá„‹á…źá„‚á…łá†«á„‰á…”á„‰á…łá„á…Šá†·á„‰á…„á†Œá„‚á…łá†Œá„Žá…Źá„Œá…„á†šá„’á…Ș Ch1
 
System calls
System callsSystem calls
System calls
 
Introduction to System Calls
Introduction to System CallsIntroduction to System Calls
Introduction to System Calls
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tables
 
File management
File managementFile management
File management
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 

KĂŒrzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

KĂŒrzlich hochgeladen (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Inode explanation

  • 1. inodes explained Tutorial 3 - CSCI212 by: Roman Tarnavski
  • 2. Data Blocks A ïŹle system contains ‘blocks’ which hold data called inodes. A inode describes a single ïŹle in the ïŹle system. Typical information described includes, ownership, modiïŹcation times, size and permissions. We call this information meta-data. Source: CSCI212 Lecture Notes by: Daniel SafïŹoti
  • 3. Data Blocks Data Blocks The remainder of the ïŹle system (larger proportion) contains data blocks. These store the contents of ïŹles. Source: CSCI212 Lecture Notes by: Daniel SafïŹoti
  • 4. Source: CSCI212 Lecture Notes by: Daniel SafïŹoti
  • 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 Direct Address 1 Direct Address 2 Direct . . Direct . Direct Address 2048 Direct Single Double Triple
  • 8. Double Direct Data Block 1 Direct Data Block 2 Direct Direct Address 1 Direct Address 2 Data Block 2048 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 Direct Address 1 Address 2 Data Block 2048 Direct 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 Address 1 Direct Address 2 Data Block 2048 Direct . . Single Address 1 . Double Address 2 Address 2048 Triple . . Data Block 1 . Data Block 2 Address 2048 Address 1 Address 2 Data Block 2048 . 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 Direct Data Block 1 Direct Address 1 Data Block 2 Address 1 Direct Address 2 Data Block 2048 Address 2 Direct . . . Direct . . . Direct Address 2048 Data Block 1 Address 2048 Direct Data Block 2 Single Double Address 1 Triple Data Block 2048 Address 2 Address 1 . Data Block 1 Address 2 . . Data Block 2 . . Address 2048 . Address 2048 Address 1 Address 2 Data Block 2048 . . Address 1 Address 1 . Address 2 Address 2 Address 2048 . . Data Block 1 . . . . Data Block 2 Address 2048 Address 2048 Address 1 Address 2 Data Block 2048 . . Address 1 . Address 2 Address 2048 . . Data Block 1 . Data Block 2 Address 2048 Address 1 Address 2 Data Block 2048 . 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 [block size] /4 [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 [block size] /4 [bytes per addressable block] = 2048 Addressable Blocks
  • 18. Questions What is the maximum possible ïŹle 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