You are on page 1of 1

Unit 2- FILE SUBSYSTEM

Learn algorithms, programs and sums

In "The Design of the Unix Operating System" book-


Internal Representation of Files- Chap 4 in text book - Pg 74- Pg 104

** Summary of alogorithms-
1. iget- Returns a previously identified inode, possibly reading it from disk via
the buffer cache

2. iput- Releases the inode

3. bmap- Sets kernel parameters for accessing a file

4. namei- Converts a user-level path name to-an inode, using the algorithms iget,
iput and bmap

5. alloc and free- Allocate and free disk blocks for files

6. ialloc and ifree- Assign and free inodes for files


---

- Inodes - Pg 75- Pg 81
(Sub topics: Definition, Accessing Inodes, Releasing Inodes)

- Structure of a Regular File- Pg 81- Pg 86

- Directories- Pg 87- Pg 88

- Conversion of a Path Name to an Inode- Pg 88- Pg 90

- Super Block- Pg 90 - Pg 91

- Inode Assignment to a New File- Pg 91- Pg 98

- Allocation of Disk Blocks- Pg 98- Pg 101

- SUMMARY- Pg 102- Read 1st para for definitions and algos

- EXERCISES- Pg 103- 104


--
Solve below from syllabus- (if required)
o Implement the five scenarios in the iget algorithm by using least recently used
scheme.
o Implement the bmap algorithm and find the block number and the byte offset
in file system for the given offset. Assume the disk block contain 1024 bytes.
96000
9999999
o Simulate the function of iput, ialloc, ifree, alloc and ifree.
o Write a program to display the directory entries(i.e, byte offset, inode
number and the file name).

You might also like