
Practice Question 1:
In a system using an inode-based filing system, each inode contains 10 direct pointers, 1 single-indirect,
1 double-indirect , and 1 triple indirect.
Part A:
If each disk block was 8 KB and each pointer was 16 bytes, how many i-nodes would need to be created
to write a new, 89 KB file?
Part B:
In the same system as [Part A], how many blocks would need to be used to write that new, 89 KB file?
(Include all blocks, including those of i-nodes.)
Part C:
In a different system, the size of a disk pointer is 32 bytes. If a file used exactly 9 direct pointers and
nothing more to store the contents of a 144 KB large file, what is the size of each disk block?
Practice Question 2:
In Homework #3, you ran four different disk arm scheduling algorithms (FIFO, SSTF, SCAN, and C-SCAN)
and found that three of the algorithms resulted in the same access pattern (SSTF, SCAN, and C-SCAN)?
What situations will result in these algorithms all resulting in the same access patterns?
Practice Question 3:
The following two segments of code perform the exact same functionality:
for (j = 0; j < m; j++)
for (k = 0; k < p; k++)
C[i][j] = C[i][j] + A[i][k] * B[k][j];
for (k = 0; k < p; k++)
for (j = 0; j < m; j++)
C[i][j] = C[i][j] + A[i][k] * B[k][j];
However, while running the programs, you notice that [Code Block B] runs slightly faster. When doing
more experiments, you find the [Code Block B] runs significantly faster in memory-constrained
environments where the system often is paging out physical memory to disk.
What is the name of the principle causes the observed effects? Give a general definition of that
principle.