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

EC-2 Regular Sample Solutions

Q.1 a) How SCSI bus protocol enhance performance for large data transfers with long delays?
Explain.
Sol:
SCSI bus have “Selection / Reselection phase”
Initiator asserts BUS BUSY signal and places target’s address on the bus thus establishing a
connection/session
Re-selection applies for a target resuming an interrupted operation: target asserts BUS BUSY
signal and places initiator’s address on the bus.
This allows interleaved I/O operations. Due to data unavailability during a large data transfer
then target can interrupt the operation and resume again when data is available.

b) What are the limitations of synchronous buses? How these limitations are overcome by

m
asynchronous buses? [2+3=5]

er as
Sol:

co
Limitations of synchronous bus:

eH w
All the devices must run at the same speed.

o.
The bus must be short due to clock skew.
Asynchronous bus benefits:
rs e
ou urc
Since the bus is not clocked devices of varying speeds can be on the same bus.
There is no problem with clock skew (since there is no clock).
o

Q.2 a) What is the significance of vnode in unix file system? Explain. [3+2=5]
Sol: It is in memory abstractions and are not filesystem specific. They can be used interchangeably
aC s
vi y re

in UFS, ext4, and whatever else. In contrast, inodes are stored on disk and are specific to the exact
filesystem being used. Vnodes are meant to provide an abstraction across all possible filesystems
so that the OS can interface with them and so that kernel functions don't have to specifically
support every filesystem; they only have to have knowledge of how to interact with the file's vnode.
ed d
ar stu

b) What is the maximum possible file size achieved using a double indirect pointer of inode in
UNIX operating system? Assume block size as 512 Bytes.
Sol: Each inode pointer requires 4 bytes of memory.
So maximum file size can be 128x128x512 = 2^23 or 8 MBytes
sh is
Th

Q.3 a) Why Solid State Devices (SSDs) require wear leveling? Explain. [2+3=5]
Sol: Flash memory cells have maximum P/E cycles limitations. During R/W operations, some
cells may be written more number of times than other cells. This makes such memory cells to
wear out and not usable to store the data.

Wear leveling is processes through writes are spread evenly across all blocks of the device to
prolong the life of the device.

Q.3 b) How Journaling Flash File System (JFFS) provides wear leveling? Explain.
Sol: JFFS Weal levelling Process: File data and metadata stored as nodes. Blocks are filled with
nodes. Data stored on medium in no particular location. Nodes of data are written sequentially to
a log, which records all changes. To read the file system, the log nodes are played back in version

https://www.coursehero.com/file/30388437/EC-2-Regular-Sols-uploadpdf/
order, to recreate a map of where each range of data is located on the physical medium. Soon the
log reaches the end of the medium. At this point we need to start to reclaim some of the dirty space
(i.e. obsolete nodes). It requires copying the still-valid data from the beginning of the log to the
remaining space at the end until a block can be erased at the start.

Q.4 Multiple clients can access the data over the network through NFS protocol. Consider a
scenario in which one client writes the data that is later read by another client. Assume client side
caching is enabled to improve the NFS performance. Explain, the possibilities of reading stale data
for the scenario? Suggest solutions to avoid these possibilities. [5]
Sol: Possibilities of reading stale data are-
1. Second client has stale data in its cache and does not know that modified data are available.
Server should intimate to the clients about all modifications. When a client receives such
information, it checks against its cache and invalidate the cache data if client caches modified data.

m
er as
2. First client has modified data in its cache but has not written those data back to the server.
Synchronous writing solves the second problem. Client should intimate any modification of data

co
to the server immediately.

eH w
o.
Q.5 Buffer cache is used to improve disk performance and Operating System manages buffer pool
rs e
for that purpose. There are four different types of buffer lists managed, named as Locked List,
ou urc
LRU List, Aged List, and an Empty List. Explain the purpose of each of them. [4]
Sol:
Locked list: buffers that are currently used for I/O and therefore locked and cannot be released
o

until operation is complete


aC s

LRU list: A queue of buffers – a recently used item is added at the rear of the queue and when a
vi y re

buffer is needed one at the front of the queue is replaced.


Buffers staying in this queue long enough are migrated to an Aged list
Aged List: Maintained as a list and any element may be used for replacement.
Empty List: Empty buffers
ed d
ar stu

Q.6 The common I/O techniques can be used by processor to access the data in a computer system
are Programmed I/O, Interrupt and DMA (Direct Memory Access). Give a comparative
performance analysis of these techniques to use for the following applications. [3+3]
sh is

a) A hard real time application that requires to read few bytes of data from a sensor device
Th

Sol: Programmed I/O: In this technique, CPU continuously polls the device for data. Once device
is ready with the data, it can be immediately transferred by CPU. Because CPU is always engaged
with the device and not doing any other task during that period of time. Thus it is more suitable
for such application.
Interrupt: Once the device is ready for data transfer then it signals (i.e. Interrupt) to the CPU. The
CPU requires context switching. The CPU may take some time (delay) to process the Interrupt
which may lead to data loss in this case.

DMA: In general DMA is used for large data transfer. Before that system bus control is transferred
to DMA by CPU. Once data transfer is over then system bus control is given back to CPU by
DMA. Hence this technique is not suitable for real time application because delay in data transfer
cause data loss.

https://www.coursehero.com/file/30388437/EC-2-Regular-Sols-uploadpdf/
b) A data intensive application that requires to read and write large chunks of data from a disk
storage.
Sol: DMA is best option among others. Reasoning can be worked out based on part (a) sol.

Q.7 Answer the following questions: [2+1+2]


a) What techniques are used in RAID (Redundant Array of Independent Disks) for achieving
high I/O rate and fault tolerance?
Sol: Mirroring (fault tolerance), storing parity info./parity information distribution across
multiple disks(fault tolerance) data striping or distribution across multiple disks (high I/O rate)
b) How RAID 5 offers superior performance than RAID 4? Explain.
Sol: RAID 4 have one dedicated parity disk whereas RAID 5 distributes parity blocks over multiple
disks. In case of frequent writes, RAID for dedicated parity disk becomes bottleneck and RAID 5
don’t have problem due to distribution of parity blocks over multiple disks.
c) What are the limitations of software RAID as compared to hardware RAID?

m
Sol: In software RAID data unprotected during boot time, load on CPU, limited OS migration.

er as
Whereas in hardware RAID there is a RAID controller card used (a plug-in expansion card) that

co
usually has a built-in RAID processor (I/O processor) and its own interfaces to the drives.

eH w
*****

o.
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
sh is
Th

https://www.coursehero.com/file/30388437/EC-2-Regular-Sols-uploadpdf/

Powered by TCPDF (www.tcpdf.org)

You might also like