Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.What does it mean to have execution permission on a directory? 2.What is the c

ID: 3855708 • Letter: 1

Question

1.What does it mean to have execution permission on a directory?

2.What is the chmod command for changing the file a.out’s permissions so that the owner can read, write, and execute; the file’s group can read and execute; and everyone else can only execute.

3. Assuming the block size is 4096 bytes and physical disk block addresses are 32 bits, how many blocks can we address using the triple indirection pointer in the UFS pointer structure?

4. Consider a file system similar to the one used by UNIX with indexed allocation. How many disk I/O operations might be required to read the contents of a small local file, which fits within one block, at the directory /users/jae125/cs410/? Assume that none of the disk blocks is currently being cached.

5. What is the advantage of using a file-allocation table (FAT) to chain together the blocks of a file in linked allocation?

Explanation / Answer

1. Execution permission allows the user to enter the directory and access the files in it manually and programmatically . i.e. we can use cd command and ls -l command on it.

2. for this part, we can use following table permission: -

Permission

Action

chmod option

read

(view)

r or 4

write

(edit)

w or 2

execute

(execute)

x or 1

and in the question it is mentioned that the permisison needed is rwx-rx-x i.e. 751

So command is chmod 751 a.out

3.

block size = 4096 bytes

block address bits = 32 bits = 4 bytes

number of blocks addressable using triple indirection pointer = (4096/4)^3 = 1073741824

4.

Reading the contents of the small local file /users/jae125/cs410/ involves 4 separate disk operations:

(1) Reading in the disk block containing the root directory /,

(2) & (3) reading in the disk block containing the directories b and c, and reading in the disk block containing the file c.

So 4 I/O operations are needed.

5.

in the linked allocation generally if we want to access a block present in middle of the file, we need to move there sequentially , but using this variation of linked allocation , we can chase the pointer stored in FAT and determine its location. As FAT can be cached easily, the pointers can be determined using memory access only instead of accessing the disk blocks

Permission

Action

chmod option

read

(view)

r or 4

write

(edit)

w or 2

execute

(execute)

x or 1