Machine-translated by Google. Questions are authored in English.
Top

File System Interface and Implementation Questions and Answers

1.

The link system call in UNIX is called link (sfname tfname) :

Which of the following statements are true ?

(1) sfname and tfname have the same inode after the call.
(2) sfname and tfname have the same directory entry after the call.
(3) sfname is an existing file before the call.
(4) tfname is an existing file before the call.

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: A

The true statements are (1) and (3).

link(sfname, tfname) creates a new directory entry, tfname, pointing to the same inode as the existing file sfname, and increments the inode's link count. So after the call both names refer to the same inode (1), and sfname must already exist before the call (3).

Statement (2) is false: the call creates a second, separate directory entry, so the two names have different directory entries that share one inode. Statement (4) is false too: if tfname already exists the call fails, so any option containing (2) or (4) is wrong.

Please log in or register to report this question.

2.

Which command is used to manage hard disk partitions in a Linux system ?

Exam Year(s)

MH SET - 2019, SET Exam - 2019,

Answer: B

The command is fdisk.

fdisk is the Linux command-line utility for creating, deleting, resizing and listing partitions on a disk; for example, fdisk -l lists the partition tables of all disks.

df reports the free and used space of mounted file systems. dd copies and converts data block by block, for instance to clone a disk or write an image. iostat reports CPU and device input/output statistics. None of them manages partitions.

Please log in or register to report this question.

3.

Which of the following scenario most appropriately depicts the primary use of a distributed file system ?

Exam Year(s)

MH SET - 2020, SET Exam - 2020,

Answer: B

The primary use of a distributed file system is to Access data stored on remote computer systems.

A distributed file system such as NFS or AFS lets users and programs access files stored on other machines across a network as if they were on the local disk, with location transparency.

Replication for backup and splitting data across nodes are features some distributed file systems add, not their basic purpose, and multiple file systems on one computer is simply mounting, which needs no distribution.

Please log in or register to report this question.

4.

Which of the following is not a valid kernel data structure in Linux ?

Exam Year(s)

MH SET - 2021, SET Exam - 2021,

Answer: D

The structure that is not a Linux kernel data structure is the Sector table.

For open files the kernel keeps three levels of tables: a per-process file descriptor table, a system-wide open file table holding the file offset and access mode, and an in-memory inode table holding the inodes of the open files.

Sectors are handled by the block device layer and the disk driver, which address blocks directly; there is no kernel 'sector table' alongside the other three, so it is the odd one out.

Please log in or register to report this question.

5.

The 'read' system call returns :

Exam Year(s)

MH SET - 2021, SET Exam - 2021,

Answer: A

The read system call returns the total number of bytes read.

read(fd, buf, count) returns the number of bytes actually read into the buffer, which may be less than count; it returns 0 at end of file and -1 on an error. Programs loop on this value to read a whole file.

The file descriptor is what open() returns and what read takes as its first argument. read returns no separate success flag and no address of the file.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: File System Interface and Implementation Questions and Answers || File System Interface and Implementation MCQ Questions and Answers || File System Interface and Implementation GK Questions and Answers || File System Interface and Implementation GK MCQ Questions || File System Interface and Implementation Multiple Choice Questions and Answers || File System Interface and Implementation GK || GK on File System Interface and Implementation || Operating Systems Questions and Answers || Operating Systems MCQ Questions and Answers || Operating Systems GK Questions and Answers || GK on Operating Systems