TUTORIAL 5 :
3.0 File Management
Learning Outcomes
By the end of this lab, students should be able to:
1. Explain file management in operating system.
2. Explain the protection of file in operating system
Activity 5A
1. Give 3(THREE) reasons, why we need file management? [3 marks]
i. To store the files.
ii. To access the files easily.
iii. To store the files and protect the files from loss data.
2. Describe 3(THREE) of the following file access technique by your own words? [3 marks]
Sequential
i. It is the simplest access method and process by one record after another.
ii. Direct
With flexibility of accessing any record in any order without searching from start.
Indexed
iii. It a Combines best of sequential & direct access.
3. What is directory structure in file management? [2 marks]
Directory structure is the way an operating system's file system and its files are
displayed to the user.
4. Draw an example of single-level directory and two-level directory?
i. Single-level directory [2 marks]
ii. Two-level directory [2 marks]
5. Give 3(THREE) advantages for single-level directory and two-level directory? [6 marks]
Single-level Directory Two-level Directory
1. 1.
2. 2.
3. 3.
6. Based on the Table Directory 5.0 and Table Directory 5.1 below, draw a contiguous file
allocation. [6 marks]
File Start Length
i. Doc 3 7
Cpp 19 3
Jsl 36 2
Java 13 5
Html 25 9
Directory Table 5.0
ii. File Start Length
Raw 2 5
Gif 33 3
Bmp 7 10
Png 18 1
Hdr 26 5
Directory Table 5.1
7. Show how file mapping using Linked Allocation based on Directory Table 5.2 and
Directory Table 5.3 below. [6 marks]
i.
File Start End
Fat32 22 2
Directory Table 5.2
Sequence of nod: Start ---> 1 ---> 21 ---> 31 ---> 11 ---> 13 ---> 12 --->EOF
[6 marks]
ii.
File Start End
NTFS 15 26
Directory Table 5.3
Sequence of nod: Start ---> 20 ---> 22 ---
> 16 ---> 31 ---> 5 ---> 9 --->EOF
8. Show file mapping using Indexed File Allocation based on Directory Table 5.4 and
Directory Table 5.5 below. [6 marks]
i.
File Index-Block
NTFS 18
Directory Table 5.4
Index Point Nod: 8, 0, 31, 27, 14, 22, EOF
[6 marks]
ii. File Index-Block
NTFS 7
Directory Table 5.5
Index Point Nod: 29, 16, 2, 11, 21, 34, EOF
Activity 5B
1. Refer to Figure 5.6 below, please write the correct Access Control List? [4 marks]
Erni R R
Widya R/W -
Erinasari R R/W
Archive Military
Figure 5.6
2. Refer to Figure 5.7 below, draw the correct Capability List? [4 marks]
Ali -- aaa:R/W, bbb:R, ccc:R Bala -- aaa:R, bbb:R/W, ddd:R
Carol -- aaa:R, bbb:R, ccc:R/W, ddd:R David -- bbb:R/W, ccc:R/W, ddd:R
Figure 5.7
3. Describe the technique used to prevent data loss?
Physical Backup [2 marks]
i.
ii. Logical Backup [2 marks]