Вы находитесь на странице: 1из 7

Question 1: Enlist a few objectives of the file management system

Answer 1: A file is defined as collection of related information that’s is recorded on


secondary storag.A file is the smalles allotment of logical secondary storage.

A file system is a method of storing and organizing computer files and their data.
Essentially, it organizes these files into a database for the storage, organization,
manipulation, and retrieval by the computer's operating system.File management
system means the the operating system manages reading and writing in the file
system and the user and application file access authorisations.

The various objectives of File management system are as follows:

• The main objective of file management system is to free the user of the
details of storing the information in the physical devices.

• One of the objective of file management system is used to keep track of


different files for the optimum use of cpu.

• File management system has objective of storing the files in an orderly


fashion, access the stored files and append the stored files and protecting the
source file from loss of data.

• File management system also make it easy to share the files among number
of users, File access mechanism make this possible.

• File managemet system also provides an efficient technique to serach any file
from number of stored files.

• It is very important for an operating system to have an efficient file


management system to protect files from unexpected loss.

Question 2: Discuss the type of directory structure implemented in Linux. Is it


same as the one implemented in MS Windows? If not, what type of directory
structure is implemented in Windows?

Answer 2: The Directory Structure in Linux are a unified Directory Structure where in
all the directories are unified under the “/” Root file system. Irrespective of where
the File System is physically mounted all the directories are arranged hierarchically
under the Root file system. The Linux Directory Structure follows the “Filesystem
Hierarchy Structure (FHS)” maintained by the Free Standards Group although most
of the distributions sometimes tend to deviate from the standards.

In linux different directories under root looks as:

No, linux directory structure is not simillar to windows directory structure Not only is
the format different, but the logic of where to find things is different.

In Windows, you use this format to access a directory

D:\Folder\subfolder\file.txt

In Linux, this is the basic format is:


/Folder/subfolder/file.txt

In Windows directory structure is of tree type where files are stored in a hierarchy in
a tree form, the root directory is "drive:\", for example, the root directory is usually
"C:\". The directory separator is usually a "\", but the operating system also internally
recognizes a "/". Physical and virtual drives are named by a drive letter, as opposed
to being combined as one. This means that there is no "formal" root directory, but
rather that there are independent root directories on each drive. However, it is
possible to combine two drives into one virtual drive letter, by setting a hard drive
into a raid setting of 0

Question 3: “MS DOS uses a simple and efficient disk-space allocation method
called FAT, which is a variation on Linked Allocation Method.” Discuss the
variation brought by FAT into the basic Linked allocation method.

Answer 3: MS DOS uses a simple and efficient disk-space allocation method called
FAT, which is a variation on Linked Allocation Method.The variation bought by FAT
into the basic linked alloctaion method by its use which is simple and efficient
method of disk allocation used by MS-DOS, As in Linked allocation method files are
linked together by pointer scattered over all the disk if pointer were lost or
damaged.A bug in operating system software or disk failure might result in picking
up the wrong pointer.This error could result in linking into the free list space list or
another file,

But in File allocation table the table has one entry for each disk block, and is indexed
by block number.The Fat is used much as linked list.The directory entry contains the
block number of the first block of the file.The table indexed by that block number
then contain block number of the next block of the file.This chain continues until last
block, which has a special end of file value as the table entry.Unused block are
indicated by a 0 table value.Allocating new block to a file is a simple matter of finding
the first 0 valued table entry and replacing the previous end of file with the address
of the new block.The 0 is then replaced with the end of file value.
So as in linked list file allocation the FAT system as used by MS dos is easy to
implement and required low disk space and structure is easy to implement.

PART B

Question 4: Differentiate between the concepts of Buffering, Caching and


Spooling

Answer 4:

Buffering Caching Spooling

1) A buffer is a region of 1) Caching is defined as a 1) spooling refers to a


memoryusedto temporarily componentthattransparently process of transferring data
hold data while it is being stores data so that future by placing it in a temporary
moved from one place to requests for that data can be working area where another
another. It temporarily stores served faster. The data that program may access it for
input or output data in an is stored within a cache processing at a later point in
attempt to better match the might be values that have time.
speeds of two devices such been computed earlier or
as a fast CPU and a slow duplicates of original values
disk drive.. that are stored elsewhere

2)Bufferis a programmable 2) While cache is in real a 2) In spooling, the disk is


cache managed by the hardware that the CPU uses used as a very large buffer.
operating system in the main to reduced the effective Usually complete jobs are
storage and is used to have memory access time. queued on disk to be
the most necessary data completed later
from disk, so that they don't
have to be gotten again from
the memory.

3)TheCPUoverlaps 3)In caching Jobs are 3)In Spooling,CPU Allows


input,outputandprocessing of maintained in memory until overlap of one Job with the
a single Job. its required by CPU computation and output of
other job

4) Buffering can be used to 4) Caching can be used to 4) Spooling could be used to


hold data while in transit from hold disk-resident data stage data to the device
user space to the disk, and forimprovedperfor- mance when multiple users desire to
visa versa. read from or write to it

Question 5: Compute the total head movement using FCFS and SSTF
algorithms (assuming the head is initially positioned at track 26) for the
following disk accesses (in order): 26,37,100,14,88,33,99,12.

Answer 5: FCFS (First come first serve) algorithm:

Disk accesses: 26,37,100,14,88,33,99,12.

If the disk head initially positioned at track 26,it will first move from 26 to 37 and then
37 to 100,14,88,33,99 and finally to 12 and total head movements will be:

11 + 63 + 86 +64 + 55 + 66 + 87 = 432

Total head movement in case of FCFS algorith is 432

SSTF(Short Seek Time First Algorithm):The SSTF algorithm selects the request
with the minimum seek time from the current head position,Since seek time
increases with the number of cylinders traversed by the head,SSTF chooses the
pending request closest to the current head position.

Disk Accesses: 26,37,100,14,88,33,99,12.

Now in above disk access the closest request to initial head position (26) is at
cylinder 33.Once we are at cylinder 33 the next closest request is at cylinder 37 and
when head pointer is at 37 then it will move to 14.now we serve request at position
14 after that 12 will served next and after that 88,99,100 will served.
The total head movemement in case of SSTF can be calculated by:

7 + 4 + 23 + 2 + 76 + 11 + 1 = 124.

Total head movement in case of SSTF algorith is 124


Question 6: Briefly demonstrate the different levels of RAID structure. Also
discuss why RAID systems are considered more reliable (on the same time,
expensive).
Answer 6: RAID means redundant array of independent 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. A
RAID appears to the operating system to be a single logical hard disk. RAID
employs the technique of disk striping, which involves partitioning each drive's
storage space into units ranging from a sector (512 bytes) up to several megabytes.
The stripes of all the disks are interleaved and addressed in order. n a single-user
system where large records, such as medical or other scientific images, are stored,
the stripes are typically set up to be small (perhaps 512 bytes) so that a single
record spans all disks and can be accessed quickly by reading all disks at the same
time.

In a multi-user system, better performance requires establishing a stripe wide


enough to hold the typical or maximum size record. This allows overlapped disk I/O
across drives.
Different Levels of RAID are as follows:

RAID 0: RAID0 is simply data striped over several disks. This gives a performance
advantage, as it is possible to read parts of a file in parallel. However not only is
there no data protection, it is actually less reliable than a single disk, as all the data
is lost if a single disk in the array stripe fails.
In RAID 0 Files are broken into stripes of a size dictated by the user-defined stripe
size of the array, and stripes are sent to each disk in the array. Giving up
redundancy allows this RAID level the best overall performance characteristics of the
single RAID levels, especially for its cost. For this reason, it is becoming increasingly
popular by performance-seekers, especially in the lower end of the marketplace.

RAID 1: This type is also known as disk mirroring and consists of at least two
drives that duplicate the storage of data. There is no striping. Read performance is
improved since either disk can be read at the same time. Write performance is the
same as for single disk storage. RAID-1 provides the best performance and the best
fault-tolerance in a multi-user system.

RAID 2: This type uses striping across disks with some disks storing error checking
and correcting (ECC) information.
RAID 3: This type uses striping and dedicates one drive to storing parity information.
The embedded error checking (ECC) information is used to detect errors. Data
recovery is accomplished by calculating the exclusive OR (XOR) of the information
recorded on the other drives. Since an I/O operation addresses all drives at the
same time, RAID-3 cannot overlap I/O. For this reason, RAID-3 is best for single-
user systems with long record applications.
RAID 4: This type uses large stripes, which means you can read records from any
single drive. This allows you to take advantage of overlapped I/O for read
operations. Since all write operations have to update the parity drive, no I/O
overlapping is possible.
RAID-5: This type includes a rotating parity array, thus addressing the write
limitation in RAID-4. Thus, all read and write operations can be overlapped. RAID-5
stores parity information but not redundant data (but parity information can be used
to reconstruct data). RAID-5 requires at least three and usually five disks for the
array. It's best for multi-user systems in which performance is not critical or which do
few write operations.
RAID-6: This type is similar to RAID-5 but includes a second parity scheme that is
distributed across different drives and thus offers extremely high fault- and drive-
failure tolerance.
RAID-7: This type includes a real-time embedded operating system as a controller,
caching via a high-speed bus, and other characteristics of a stand-alone computer.
One vendor offers this system.
RAID system are considered as reliable but on the same they considered as
expensive because reaosn is all data for duplicacy required more disk storage that
means due to mirroring of disk it will increased the cost,that why due to increase in
cost of disk for storage RAID system are considered as more expensive.

Вам также может понравиться