Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
×

of

9

Share

# How inodes Work

One of the tutorials I gave at University of Wollongong on inodes.

Describes direct, single, double and triple linking, and how that all ties together with addressable space.

See all

See all

### How inodes Work

1. 1. inodes explained Tutorial 3 - CSCI212 by: Roman Tarnavski
2. 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. 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. 4. Source: CSCI212 Lecture Notes by: Daniel Safﬁoti
5. 5. Your typical inode Mode Permissions Size Timestamps Direct Blocks Single Double Triple
6. 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. 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. 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
10. 10. All Together?
12. 12. Maximum Size of Direct Blocks
13. 13. Maximum Size of Direct Blocks Where did the 2048 Addresses come from?
14. 14. Maximum Size of Direct Blocks Where did the 2048 Addresses come from? Assuming 32-bit architectures
15. 15. Maximum Size of Direct Blocks Where did the 2048 Addresses come from? Assuming 32-bit architectures 32-bit = 4 bytes (32 / 8)
16. 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. 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. 18. Questions What is the maximum possible ﬁle size that can be represented via direct data blocks?
19. 19. Maximum Size of Direct Blocks block size blocks = 8192 x 12 = 98,304 bytes = 96Kb
20. 20. Maximum FileSize using First-Indirect Linking
21. 21. Maximum FileSize using First-Indirect Linking Direct: 12 blocks @ 8192 bytes (12 x 8192)
22. 22. Maximum FileSize using First-Indirect Linking Direct: 12 blocks @ 8192 bytes (12 x 8192) =96Kb
23. 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. 24. Maximum using Double Indirect 16,875,520 x 2048 addressable blocks = 34,561,064,960 bytes = 32,960 Mbytes
25. 25. Maximum Filesize [direct + single + double + triple] 2048 x 32.1875Gb = 64.375 Tb
27. 27. Overhead Wish to store: 8,437,760 bytes
28. 28. Overhead Wish to store: 8,437,760 bytes 8437760 / 8192 [bytes per block] = 1030 blocks x 4 bytes [per address] BUT
29. 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. 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. 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
• #### HanxiongChen

Dec. 15, 2017

Apr. 20, 2017
• #### NakulParmar

Feb. 26, 2017

Jan. 5, 2016
• #### anjalihake

Sep. 15, 2015
• #### 123bhu123

Jul. 21, 2015
• #### pzz2011

Sep. 27, 2014
• #### limchicken

Jun. 15, 2014
• #### jboutelle

Jan. 20, 2009

One of the tutorials I gave at University of Wollongong on inodes. Describes direct, single, double and triple linking, and how that all ties together with addressable space.

Total views

13,949

On Slideshare

0

From embeds

0

Number of embeds

155

332

Shares

0