What is the biggest size we can have for a file with SFS? (b)Provide data block numbers in sequence that will be read from the disk (only data blocks that contain file data) when read_t (inum, offset, buf1, count) is called in a user program, where inum is the corresponding inode number for the above inode, and buf1 is a pointer that points to a user-defined buffer.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Topic Video
Question

(a)What is the biggest size we can have for a file with SFS?

(b)Provide data block numbers in sequence that will be read from the disk (only data blocks that contain file data) when read_t (inum, offset, buf1, count) is called in a user program, where inum is the corresponding inode number for the above inode, and buf1 is a pointer that points to a user-defined buffer.

Suppose that there is a file with SFS and we have read the contents of its inode and related data
blocks into the memory as shown below.
The content of data block in memory
(each cell represent 4-byte memory space)
data block 33
Cell 0
34
Cell 1
35
Cell 2
36
Cell 3
40
1st direct pointer
Cell 4
41
2nd direct pointer
Cell 5
42
indirect pointer
33
Cell 6
50
Cell 7
56
Cell 8
57
Cell 9
61
Cell 10
68
Cell 11
69
Here, each cell represents a 4-byte memory space and the decimal number inside is the unsigned
integer stored correspondingly.
Transcribed Image Text:Suppose that there is a file with SFS and we have read the contents of its inode and related data blocks into the memory as shown below. The content of data block in memory (each cell represent 4-byte memory space) data block 33 Cell 0 34 Cell 1 35 Cell 2 36 Cell 3 40 1st direct pointer Cell 4 41 2nd direct pointer Cell 5 42 indirect pointer 33 Cell 6 50 Cell 7 56 Cell 8 57 Cell 9 61 Cell 10 68 Cell 11 69 Here, each cell represents a 4-byte memory space and the decimal number inside is the unsigned integer stored correspondingly.
read_t (inum, offset, bufl, count)
The data block numbers in
sequence that will be read
from (only list the data
blocks that contain file data)
Example 1
read_t(inum, 133, bufl, 400);
read_t(inum, 133, bufl, 6000);
read t(inum, 7000, buf1, 10000);
Example 2
5 9
(i)
(ii)
read_t(inum, 12000, bufl, 26000);
(iii)
read_t(inum, 10000, buf1, 36000);
(iv)
read_t(inum, 1000, bufl, 31000);
Transcribed Image Text:read_t (inum, offset, bufl, count) The data block numbers in sequence that will be read from (only list the data blocks that contain file data) Example 1 read_t(inum, 133, bufl, 400); read_t(inum, 133, bufl, 6000); read t(inum, 7000, buf1, 10000); Example 2 5 9 (i) (ii) read_t(inum, 12000, bufl, 26000); (iii) read_t(inum, 10000, buf1, 36000); (iv) read_t(inum, 1000, bufl, 31000);
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage