CS604 Mid Term Solved paper 2011

CS604 Operating System Solved Paper 

Midterm 2011

SPRING 2011 (12 MAY 2011)
CS604 - OPERATING SYSTEMS
Time: 60 min
M a r k s: 38

CS604 - Operating System - Question No: 1 ( M a r k s: 1 ) http://vuzs.net

Linux is a version of _______ operating system.
Select correct option:

► OS/2

► Windows
Unix
► None of the above

CS604 - Operating System - Question No: 2 ( M a r k s: 1 ) http://vuzs.net

Current working directory can be accessed using --------- Command.
Select correct option:

►. (dot)

► # ( hash )
► / (slash)
► ~ (tilt)

CS604 - Operating System - Question No: 3 ( M a r k s: 1 ) http://vuzs.net

Mkfifo() is a _______.
Select correct option:

System Call

► Command
► Directory
► None of Above

CS604 - Operating System - Question No: 4 ( M a r k s: 1 ) http://vuzs.net

-------- command gives a snapshot of the current processes.
Select correct option:

ps

► top
► who
► ls

CS604 - Operating System - Question No: 5 ( M a r k s: 1 ) http://vuzs.net

Time interval when the I/O Devices are accessed is known as --------.
Select correct option:

► CPU Burst

► IO Burst
► Time Slice
► None of Above

CS604 - Operating System - Question No: 6 ( M a r k s: 1 ) http://vuzs.net

The process of switching from one process to another is called ---------------.
Select correct option:

► context switching

► scheduling
► quantum period
► latency

CS604 - Operating System - Question No: 7 ( M a r k s: 1 ) http://vuzs.net

__________ directory includes essential system boot files including the kernel image.
Select correct option:

► /bin

► /boot
► /dev
► /etc

CS604 - Operating System - Question No: 8 ( M a r k s: 1 ) http://vuzs.net

________ scheduling algorithm is sometimes called shortest remaining time first scheduling algorithm.
Select correct option:

► Non-preemptive SJF

► Priority Scheduling
Preemptive Shortest Job First
► FCFS

CS604 - Operating System - Question No: 9 ( M a r k s: 1 ) http://vuzs.net

A semaphore that cause Busy-Waiting is termed as ___________.
Select correct option:

Spinlock

► Monitor
► Critical region
► Critical section

CS604 - Operating System - Question No: 10 ( M a r k s: 1 ) http://vuzs.net

Progress and Bounded Waiting are some of the characteristics to solve the critical section problems.
Select correct option:

True

► False

CS604 - Operating System - Question No: 11 ( M a r k s: 1 ) http://vuzs.net

In ---------addressing, the recipient is not required to name the sender.
Select correct option:

► Symmetric

► Asymmetric
► Both symmetric and asymmetric
► None of the given options

CS604 - Operating System - Question No: 12 ( M a r k s: 1 ) http://vuzs.net

The execution of critical sections must NOT be mutually exclusive
Select correct option:

► True

► False

CS604 - Operating System - Question No: 13 ( M a r k s: 1 ) http://vuzs.net

A program in execution is called a _______________.
Select correct option:

► Command

► Process
► Software
► Compiler

CS604 - Operating System - Question No: 14 ( M a r k s: 1 ) http://vuzs.net

The critical section problem can be solved by the following except

► Software based solution

Firmware based solution
► Operating system based solution
► Hardware based solution

CS604 - Operating System - Question No: 15 ( M a r k s: 1 ) http://vuzs.net

The bottom layer in the layered approach of Operating System is-----------
Select correct option:

► User interface

► Hardware
► Kernel
► None of the given options

CS604 - Operating System - Question No: 16 ( M a r k s: 1 ) http://vuzs.net

The manual pages can be read in Linux using ____ command.
Select correct option:

► man

► wan
► desc
► help

CS604 - Operating System - Question No: 17 ( M a r k s: 2 )

What is Convoy Effect?
Ans: Convoy effect is the result of mechanism in which some one has to follow an order like the movement of a convoy. In FCFS, a process whether shorter or smaller has to follow a queue to be assigned to a CPU. T
CS604 - Operating System - Question No: 18 ( M a r k s: 2 )
What are the common data structures in Bakery Algorithm?
Ans: The common data structures are:

boolean choosing [n];

int number[n];


CS604 - Operating System - Question No: 19 ( M a r k s: 2 )
How a pipe can be created?
Ans: The pipe() system call creates a pipe and returns two file descriptors, one for

reading and second for writing. The files associated with these

file descriptors are streams and are both opened for reading and writing. Naturally, to use

such a channel properly, one needs to form some kind of protocol in which data is sent

over the pipe.

CS604 - Operating System - Question No: 20 ( M a r k s: 3 )

Define Progress and Bounded Waiting.
Ans: 2. Progress

If no process is executing in its critical section and some processes wish to enter their

critical sections, then only those processes that are not executing in their remainder

section can participate in the decision on which will enter its critical section next, and

this selection cannot be postponed indefinitely.

3. Bounded Waiting

There exists a bound on the number of times that other processes are allowed to enter

their critical sections after a process has made a request to enter its critical section and

before that request is granted.


CS604 - Operating System - Question No: 21 ( M a r k s: 3 )
What is Starvation and how it occures
Ans: A major problem with priority- scheduling algorithms is indefinite blocking (or

starvation). A process that is ready to run but lacking the CPU can be considered

blocked-waiting for the CPU.

CS604 - Operating System - Question No: 22 ( M a r k s: 5 )

What are the advantages of Round Robin Scheduling Algorithm?

CS604 - Operating System - Question No: 23 ( M a r k s: 5 )

Analyze the following algorithm to solve the critical section problem and explain whether it satisfies the Mutual Exclusion Characteristic

Flag[i] = True;

Turn = j;
do{
while(Flag[j] = True && turn==j);
critical section
Flag[i] = False;
remainder section
} While(1)

Ans: To prove mutual exclusion, note that Pi enters its critical section only if either

flag[j]=false or turn=i. Also, if both processes were executing in their critical sections at

the same time, then flag[0]= = flag[1]= = true. These two observations suggest that P0 and

P1 could not have found both conditions in the while statement true at the same time,

since the value of ‘turn’ can either be 0 or 1. Hence only one process say P0 must have

successfully exited the while statement. Hence mutual exclusion is preserved.

Leave a Reply

Related Posts Plugin for WordPress, Blogger...