Link Links a file to a new name in the file system directory structure, creating a new directory entry for an existing node.
Two Marks Questions with Answers
Q.1
What are the essential requirements for long term information
Ans.
Name, type, location, size, protection and time,
date for file.
Q.2
State the typical bad sector transactions.
Ans.
:
a.
O.S. tries to read logical block 87.
b.
The controller calculates the ECC and finds that the sector is bad. It reports
this finding to the O.S.
c. Next time the system is rebooted, a
special command is run to tell the SCSI controller to replace the bad sector
with a spare.
d. After that, whenever the system
requests logical block 87, the request is translated into the replacement
sectors address by the controller.
Q.3
What are link and unlink directory operations?
Ans. Link Links a file to a new name in
the file system directory structure, creating a new directory entry for an
existing node.
Unlink : It removes a directory entry
for a file.
Q.4
What data type is file ?
Ans. A file is an
abstract data type.
Q.5
Give an example of an application that could benefit from operating system
support for random access to indexed files.
Ans: An application that maintains a
database of entries could benefit from such support. For instance, if a program
is maintaining a student database, then accesses to the database cannot be
modeled by any predetermined access pattern. The accesses to records are random
and locating the records would be more efficient if the operating system were
to provide some form of tree based index.
Q.6
What is the content of a typical file control block ?
Ans. FCB contains in formation about
the file, including ownership, permissions and location of the file contents.
Q.7
What are the functions of file organization module in file system?
Ans. File organization module can
translate logical block addresses to physical block addresses for the basic
file system to transfer.
Q.8
Discuss about file descriptor and access control matrix.
Ans. Protection mechanisms provide
controlled access by limiting the types of file access that can be made.
Protection can be viewed abstractly as a matrix, called an access control
matrix. A file descriptor is an index into a small table of open files for the
process. Descriptors start at 0 and seldom get higher than 6 or 7 for
programs,
depending on the maximum number of simultaneously open files typical
Q.9
What is a file? List some operations on it.
Ans. File is an
unstructured sequence of data, File operations are read, write, create, delete
etc.
Q.10
What are the various file accessing methods?
Ans. Sequential access,
direct, indexed etc.
Q.11
Write the attributes of a file.
Ans.
Name, identifier, type, location,
size, time and date.
Q.12
Mention any four file attributes.
Ans. Name, type,
size and location.
Q.13
Differentiate absolute path from relative path.
Ans. An absolute path name begins at the
root and follows a path down to the specified file, giving the directory names
on the path. A relative path name defines a path from the current directory.
Q.14
What are the two types of system directories ?
Ans.A tree structured directory that
allows a user to create subdirectories to organize the files.
A
general graph structure that allows complete flexibility in the sharing of
files and directories.
Q.15 What
is garbage collection?
Ans. Garbage
collection is the process of automatically freeing objects that are no longer
referenced by the program.
Q.16
Mention the major attributes and operations of a file.
Ans. Major attributes of file is name,
identification, type, location, size and protection. Operation on a file is to
create, write, read, reposition, delete and truncate files.
Q.17
What is meant by free-space management ?
Ans. To keep track of free disk space,
the system maintains a free space list. Free space list. Free space list
records all free disks blocks i.e. those not allocated to some file or
directory.
Q.18
Name any four common file types.
Ans.File types are text file, source
file, object file and executable file.
Q.19
What is NFS ?
Ans. The Network File System (NFS) is
probably the most prominent network service using RPC. It allows you to access
files on remote hosts in exactly the same way you would access local files. A
mixture of kernel support and user-space daemons on the client side, along with
an NFS server on the server side, makes this possible. This file access is
completely transparent t to the client and works across
Q.20
What is virtual file system? W
Ans. Virtual File Systems (VFS) provide
an object-oriented way of implementing file systems. VFS allows the same system
call interface to be used for different types of the systems.
Q.21
Write short note on file system mounting.
Ans. Mounting a file system, means
taking that storage and connecting it to the operating system in a way that
it's usable as a hierarchical storage device with directories and files. This
could be the initial file system or another file system that connects to the
root file system at a mount point.
Q.22
What is file management system ?
Ans. File management system consists of
system utility programs that run as privileged applications. The way a user or
application may access files and programmer does not need to develop file
management software.
Q.23
What are the disadvantages of log structured file systems?
Ans. It requires
cleaning demon to produce clean space, which takes additional CPU time. Reads
that are not handled by buffer cache are same performance as normal file
system.
Q.24
List the objectives for a file management system.
Ans.Objectives are :
1.
Meet the data management needs and requirements of the users
2. Guarantee that the data in the file
are valid
3. Optimize performance
4. Provide I/O support for a variety of
storage device types
5. Provide I/O support for multiple
users.
Q.25
What is a file management system ?
Ans. It is a set of
system software that provide services to user and applications in the use of
files.
Q.26
What are the disadvantages of log-structured file systems ?
Ans.
It decreases head contention and seek times.
Q.27
Define log structured file.
Ans.
Log structured file is used for file system meta
data updates.
Q.28
List out the major attributes and operations of a file.
Ans.
Attributes of
file: Name, identifier, type, location and size.
Operation on
file : read, write, create, delete.
Q.29
Do FAT file system is advantageous? Why?
Ans. The FAT file
system protects files by storing two copies of the file allocation table on the
FAT volume. FAT contains the FAT structure, which is a map of the data region.
File size is no longer fixed. We do not need to know the size of the file at
the beginning.
Q.30
Identify the two important functions of Virtual File System (VFS) layer in the
concept of file system implementation.
Ans. : Two important
functions :
1. It separates file system generic
operations from their implementation by defining a clean VFS interface.
2. VFS
provides a mechanism for uniquely representing a file throughout a network.
Q.31
Differentiate between file and directory.
Ans. The basic difference between the
two is that files store data, while directory store files and other directory.
File is a sequence of logical records. Directory lists the file by name and
includes the file location on the disk, length, type etc.
Q.32
Write about swapping. Let us assume the user process is of size 1 MB and the
backing store is a standard hard disk with a transfer rate of 6 MBPS. Calculate
the transfer rate.
Ans. :
Q.33
What is the advantages of bit vector approach in free space management
Ans.: Advantages: It is simple and its
efficiency in finding the first free block on the disk is high.
Introduction to Operating Systems: Unit IV(b): File System : Tag: : File System - Introduction to Operating Systems - Two marks Questions with Answers
Introduction to Operating Systems
CS3451 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation