Thursday , 21 November 2024

CS604 Solved Mid term paper For upcoming Exams

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 ) .
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 ) .
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 ) .
——– 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 ) .
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 ) .
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 ) .
__________ 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 ) .
________ 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 ) .
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 ) .
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 ) .
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 ) .
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 ) .
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 ) .
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 ) .
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 ) .
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.

 

CS604 Solved MCQs mega Collection for Mid Term Exams

Check Also

CS615 Today Solved Quiz 03 Fall 2013 Solved By Arslan Ali

Quiz Start Time: 08:18 PM Time Left 63 sec(s) Question # 1 of 10 ( …

Leave a Reply

Your email address will not be published. Required fields are marked *

*