[Solved] CS314 Lab 6

$25

File Name: CS314_Lab_6.zip
File Size: 103.62 KB

SKU: [Solved] CS314 Lab 6 Category: Tag:
5/5 - (1 vote)

Rate this product

In this assignment, /home is a separate file system of type mfs. With this trace the working on the mfs file system, only for the file system mounted at /home has to be taken care of.

1.1 File Created

For the file creation, the file open.c at location: minix/servers/vfs/open.c was changed. It was used in function common open().

printf(file created: %llu
, vp->v_inode_nr);Figure 1 shows the implementation in Minix. A simple file named newFile was created

using touch newFile. 1.2 File Read

For the file read, the file read.c at location: minix/servers/vfs/read.c was changed. It was used in function read write().

printf("file read: %llu; nbytes = %zu; offset = %llu
", vp->v_inode_nr,size, f->filp_pos);

Figure 2 & 3 shows the implementation in Minix. In order to read the file, cat newFile was used after some strings were written in file using Nano.

1.3 File Write

For the file write, the file read.c at location: minix/servers/vfs/read.c was changed. It was used in function read write().

printf("file written: %llu; nbytes = %zu; offset = %llu
", vp->v_inode_nr,size, f->filp_pos);

Figure 4 shows the implementation for the file write case. Using, echo Writing new Line > newFile to write into the file.

1

Figure 1: File Created

Figure 2: Write using Nano 2

Figure 3: File Read

Figure 4: File Write 3

1.4 File Deleted

Figure 5: File Delete

For the file delete, the file link.c at location: minix/servers/vfs/link.c was changed. It was used in function do unlink().

    printf("file deleted: %llu
", vp->v_inode_nr);

Figure 5 shows the implementation for the file delete case. In order to delete the file, rm newFile was used.

Shopping Cart

No products in the cart.

No products in the cart.

[Solved] CS314 Lab 6
$25