Cs8493 - Operating Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Sri Vidya College of Engineering & Technology Question Bank

UNIT IV FILE SYSTEMS AND I/O SYSTEMS


Part A
1) What is a file?
A file is a named collection of related information that is recorded on secondary storage. A file
contains either programs or data. A file has certain "structure" based on its type.
2) List the various file attributes.
A file has certain other attributes, which vary from one operating system to another, but typically
consist of these:
 Name
 Identifier
 Type
 Location
 Size
 Protection
 Time
 Date
 user identification

3) What are the various file operations?


The six basic file operations are:
 Creating a file
 Writing a file
 Reading a file
 Repositioning within a file
 Deleting a file
 Truncating a file

4) What are the information associated with an open file?


Several pieces of information are associated with an open file which may be:
 File pointer
 File open count
 Disk location of the file
 Access rights

5) What are the different accessing methods of a file?


The different types of accessing a file are:
Sequential access: Information in the file is accessed sequentially
Direct access: Information in the file can be accessed without any particular order.
Other access methods: Creating index for the file, indexed sequential access method (ISAM)
etc.

CS8493 - OPERATING SYSTEMS Page 1


Sri Vidya College of Engineering & Technology Question Bank

6) What is Directory?
The device directory or simply known as directory records information-such as name, location,
size, and type for all files on that particular partition. The directory can be viewed as a symbol
table that translates file names into their directory entries.

7) What are the operations that can be performed on a directory?


The operations that can be performed on a directory are
Search for a file Create a file Delete a file
Rename a file
List directory
Traverse the file system

8) What are the most common schemes for defining the logical structure of a
directory?
The most common schemes for defining the logical structure of directory
 Single-Level Directory
 Two-level Directory
 Tree-Structured Directories
 Acyclic-Graph Directories
 General Graph Directory

9) Define UFD and MFD.


In the two-level directory structure, each user has her own user file directory (UFD). Each UFD
has a similar structure, but lists only the files of a single user. When a job starts the system's
master file directory (MFD) is searched. The MFD is indexed by the user name or account
number, and each entry points to the UFD for that user.

10) What is a path name?


A pathname is the path from the root through all subdirectories to a specified file. In a two-level
directory structure a user name and a file name define a path name.

11) What are the various layers of a file system?


The file system is composed of many different levels. Each level in the design uses the feature of
the lower levels to create new features for use by higher levels.
b. Application programs
c. Logical file system
d. File-organization module
e. Basic file system
f. I/O control
g. Devices

CS8493 - OPERATING SYSTEMS Page 2


Sri Vidya College of Engineering & Technology Question Bank

12) What are the structures used in file-system implementation? Define File Control
Block.
a. Several on-disk and in-memory structures are used to implement a file system
b. On-disk structure include
Boot control block
Partition block
Directory structure used to organize the files
File control block (FCB)
In-memory structure include
In-memory partition table
In-memory directory structure
System-wide open file table
Per-process open table

13) What are the functions of virtual file system (VFS)?


1. It separates file-system-generic operations from their implementation defining a clean
VFS interface. It allows transparent access to different types of file systems mounted locally.
2. VFS is based on a file representation structure, called a vnode. It contains a numerical
value for a network-wide unique file .The kernel maintains one vnode structure for each active
file or directory.

14) Define seek time and latency time.


The time taken by the head to move to the appropriate cylinder or track is called seek time. Once
the head is at right track, it must wait until the desired block rotates under the read-write head.
This delay is latency time.

15) What are the allocation methods of a disk space?


a. Methods of allocating disk space which are widely in use are
b. Contiguous allocation
c. Linked allocation
d. Indexed allocation

16) What are the advantages of Contiguous allocation?


The advantages are
• Supports direct access
• Supports sequential access
• Number of disk seeks is minimal.

CS8493 - OPERATING SYSTEMS Page 3


Sri Vidya College of Engineering & Technology Question Bank

17) What are the drawbacks of contiguous allocation of disk space?


The disadvantages are
• Suffers from external fragmentation.
• Suffers from internal fragmentation.
• Difficulty in finding space for a new file.
• File cannot be extended.
• Size of the file is to be declared in advance.

18) What are the disadvantages of linked allocation?


The disadvantages are
1. Used only for sequential access of files.
2. Direct access is not supported.
3. Memory space required for the pointers.
4. Reliability is compromised if the pointers are lost or damaged

19) What are the advantages of Indexed allocation?


The advantages are
a. No external-fragmentation problems.
b. Solves the size-declaration problems.
c. Supports direct access.

20) How can the index blocks be implemented in the indexed allocation scheme?
The index block can be implemented as follows
1. Linked scheme
2. Multilevel scheme
3. Combined scheme

21) What is garbage collection?


Garbage Collection (GC) is a form of automatic memory management. The garbage collector, or
just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in
use by the program.

22) Mention the objectives of File Management System.


The system that an operating system or program uses to organize and keep track of files. For
example, a hierarchical file system is one that uses directories to organize files into a tree
structure.

CS8493 - OPERATING SYSTEMS Page 4


Sri Vidya College of Engineering & Technology Question Bank

23) What is the content of a typical file control block?


File Control Block (FCB) is a file system structure in which the state of an open file is
maintained.
 File permissions
 File dates (create, access, write)
 File owner, group, ACL
 File size
 File data blocks

24) What are the two types of system directories?


Device directory, describing physical properties of files.
File directory, giving logical properties of the files.

25) What is meant by polling?


Polling is the process where the computer waits for an external device to check for its readiness.
The computer does not do anything else than checking the status of the device .Polling is often
used with low-level hardware. Example: when a printer connected via a parallel port the
computer waits until the next character has been received by the printer. These processes can be
as minute as only reading 1 Byte. Polling is the continuous (or frequent) checking by a
controlling device or process of other devices, processes, queues, etc.

26) State any three disadvantages of placing functionality in a device controller , rather
than in the kernel.
Three advantages:-
a.Bugs are less likely to cause an operating system crash.
b.Performance can be improved by utilizing dedicated hardware and hard-coded algorithms.
The kernel is simplified by moving algorithms out of it.
Three disadvantages:
a.Bugs are harder to fix - a new firmware version or new hardware is needed
b.Improving algorithms likewise require a hardware update rather than just kernel or device
driver update
c.Embedded algorithms could conflict with application’s use of the device, causing decreased
performance.

27) How free-space is managed using bit vector implementation?


The free-space list is implemented as a bit map or bit vector. Each block is represented by 1 bit.
If the block is free, the bit is 1; if the block is allocated, the bit is 0.

28) List the attributes of a file


Name, Identifier, Type, Location, Size, Protection, Time ,Date and User authentication.

CS8493 - OPERATING SYSTEMS Page 5


Sri Vidya College of Engineering & Technology Question Bank

29) What are the information contained in a boot control block and partition control
block?
Boot control block:
Contain information needed by the system to boot an operating from that partition. If the disk
does not contain an operating system,this block can be empty.It is typically the first block of a
partition.In UFS, this is called the boot block.
Partition Control block:
Contains partition details , such as number of blocks in the partition , size of the blocks ,free
block count and free block pointers, and free FCB count and FCB pointers.
30) Define buffering.
A buffer is a memory area that stores data while they are transferred between two devices or
between a device and an application. Buffering is done for three reasons
a. To cope with a speed mismatch between the producer and consumer of a data stream
b. To adapt between devices that have different data transfer sizes
c. To support copy semantics for application I/O

31) Define caching.


A cache is a region of fast memory that holds copies of data. Access to the cached copy is more
efficient than access to the original. Caching and buffering are distinct functions, but sometimes
a region of memory can be used for both purposes.

32) Define spooling.


A spool is a buffer that holds output for a device, such as printer, that cannot accept interleaved
data streams. When an application finishes printing, the spooling system queues the
corresponding spool file for output to the printer. The spooling system copies the queued spool
files to the printer one at a time.

33) Define rotational latency and disk bandwidth.


 Rotational latency is the additional time waiting for the disk to rotate the desired sector to
the disk head.
 Disk bandwidth is the total number of bytes transferred, divided by the time between the
first request for service and the completion of the last transfer.

34) What are the various disk-scheduling algorithms?


The various disk-scheduling algorithms are
 First Come First Served Scheduling
 Shortest Seek Time First Scheduling
 SCAN Scheduling
 C-SCAN Scheduling
 LOOK scheduling

CS8493 - OPERATING SYSTEMS Page 6


Sri Vidya College of Engineering & Technology Question Bank

35) What is the need for disk scheduling?


In operating systems, seek time is very important. Since all device requests are linked in queues,
the seek time is increased causing the system to slow down.
Disk Scheduling Algorithms are used to reduce the total seek time of any request.

36) What is low-level formatting?


Before a disk can store data, it must be divided into sectors that the disk controller can read and
write. This process is called low-level formatting or physical formatting. Low-level formatting
fills the disk with a special data structure for each sector. The data structure for a sector consists
of a header, a data area, and a trailer.

37) What is the use of boot block?


For a computer to start running when powered up or rebooted it needs to have an initial program
to run. This bootstrap program tends to be simple. It finds the operating system on the disk loads
that kernel into memory and jumps to an initial address to begin the operating system execution.
The full bootstrap program is stored in a partition called the boot blocks, at fixed location on the
disk. A disk that has boot partition is called boot disk or system disk.

38) What is sector sparing?


Low-level formatting also sets aside spare sectors not visible to the operating system. The
controller can be told to replace each bad sector logically with one of the spare sectors. This
scheme is known as sector sparing or forwarding.

39) What is seek time ?


Seek time: the time to position heads over a cylinder (~8 msec on average).

40) What is storage area networks?


A storage area network (SAN) is a dedicated network that provides access to consolidated, block
level data storage. SANs are primarily used to make storage devices, such as disk arrays, tape
libraries, and optical jukeboxes, accessible to servers so that the devices appear like locally
attached devices to the operating system.

41) Write a brief note on RAID.


RAID (redundant array of independent disks; originally redundant array of inexpensive disks) is
a way of storing the same data in different places (thus, redundantly) on multiple hard disks. By
placing data on multiple disks, I/O (input/output) operations can overlap in a balanced way,
improving performance. Since multiple disks increases the mean time between failures (MTBF),
storing data redundantly also increases fault tolerance.

CS8493 - OPERATING SYSTEMS Page 7


Sri Vidya College of Engineering & Technology Question Bank

42) What Characteristics determine the disk access speed?


• Seek time
• Rotational latency
• Other

43) Give the importance of Swap space Management.


Swap-space management: Swap-space management is low- level task of the operating system.
The main goal for the design and implementation of swap space is to provide the best throughput
for the virtual memory system.
Swap-space use: The operating system needs to release sufficient main memory to bring in a
process that is ready to execute. Operating system uses this swap space in various way. Paging
systems may simply store pages that have been pushed out of main memory. Unix operating
system allows the use of multiple swap spaces. These swap space are usually put on separate
disks, so the load placed on the I/O system by paging and swapping can be spread over the
systems I/O devices.
Swap-space location: Swap space can reside in two places:
1. Separate disk partition
2. Normal file system

44) Write three basic functions which are provided by the hardware clocks and timers.
• OSTickInit()
• OSTimeSet()
• OSTimeGet()

45) What are the advantages of Linked allocation?


The advantages are
 No external fragmentation.
 Size of the file does not need to be declared.

46) Define FAT


FAT is a much older file-system format that is understood by many systems besides Windows,
such as the software running on cameras. A disadvantage is that the FAT file system does not
restrict file access to authorized users. The only solution for securing data with FAT is to run an
application to encrypt the data before storing it on the file system.

47) What is Relative block number?


Relative block number is an index relative to the beginning of a file. Thus the 1st relative block
of the file is 0,the next is 1, and so on.

CS8493 - OPERATING SYSTEMS Page 8


Sri Vidya College of Engineering & Technology Question Bank

48) What is double buffering?


OS can use various kinds of buffering:
 single buffering — OS assigns a system buffer to the user request
 double buffering — process consumes from one buffer while system fills the next
 circular buffers — most useful for bursty I/O

PART-B
1) Explain the different disk scheduling algorithms with examples.
2) Explain and compare FCFS, SSTF, C-SCAN and C-LOOK disk scheduling algorithms
with examples.
3) How do you choose a optimal technique among the various disk scheduling techniques?
Explain.
4) Write short notes on disk management.
5) Explain in detail the disk structure and implementation
6) Discuss how free space is managed by operating system?
7) Explain the process scheduling in Linux.
8) Write in detail the memory management in Linux.
9) Discuss in-detail the disk performance with suitable expressions.
10) Write short notes on swap space management.
11) Write short notes on file system in Linux.
12) Explain about the various components and salient features in Linux.
13) Write an elaborate note on RAID and RAID Levels.
14) Explain the file allocation methods.
15) i) Explain the issues in designing a file system. (8)
ii) Explain the various file directory structures. (8)

CS8493 - OPERATING SYSTEMS Page 9

You might also like