Showing posts with label I/O SYSTEMS. Show all posts
Showing posts with label I/O SYSTEMS. Show all posts

Friday, December 18, 2015

I/O SYSTEMS



1.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.

2.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

3.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.

4.Define spooling.

A spool is a buffer that holds output for a device, such as printer, that cannot accept interleaved data streams. When anapplication 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.

5.What are the various disk-scheduling algorithms?

The various disk-scheduling algorithms are
a.  First Come First Served Scheduling
b.  Shortest Seek Time First Scheduling
c.  SCAN Scheduling
d. C-SCAN Scheduling
f. LOOK scheduling

Thursday, December 17, 2015

I/O SYSTEMS



1.What are the allocation methods of a disk space?
Methods of allocating disk space which are widely in use are
a.  Contiguous allocation
b.  Linked allocation
c.  Indexed allocation

2.What are the advantages of Contiguous allocation?

The advantages are
a.  Supports direct access
b.  Supports sequential access
c.  Number of disk seeks is minimal.

3.What are the drawbacks of contiguous allocation of disk space?

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

4.What are the advantages of Linked allocation?

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

5.What are the disadvantages of linked allocation?

The disadvantages are
a.  Used only for sequential access of files.
b.  Direct access is not supported
c.  Memory space required for the pointers.
d. Reliability is compromised if the pointers are lost or damaged