Operating System MCQ with Answers Set-4

This post contains a computer network related to 20 multiple-choice questions (OS SET-4) that help you to go through the subject and prepare you for operating system related questions in a competitive exam.

Operating System MCQ Test Series Set-4

  • Total Number of Questions: 20

  • Each question carries equal marks i.e 1

  • No Negative Marking

Page 1 of 2

1.

The following are some events that occur after a device controller issues an interrupt while process L is under execution.

(P) The processor pushes the process status of L onto the control stack.

(Q) The processor finishes the execution of the current instruction.

(R) The processor executes the interrupt service routine.

(S) The processor pops the process status of L from the control stack.

(T) The processor loads the new PC value based on the interrupt.

Which one of the following is the correct order in which the events above occur?

A.
B.
C.
D.
2.

A processor can support a maximum memory of 4GB, where the memory is word-addressable (a word consists of two bytes). The size of the address bus of the processor is at least ___ bits.

A.
B.
C.
D.
3.

Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is available in memory, and D units if the memory access causes a page fault. It has been experimentally measured that the average time taken for a memory access in the process is X units. Which one of the following is the correct expression for the page fault rate experienced by the process?

A.
B.
C.
D.
4.

A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock l without releasing it. If a threads is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are :

A.
B.
C.
D.
5.

Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?

A.
B.
C.
D.
6.

The size of the physical address space of a processor is $2^{P}$ bytes. The word length is $2^{w}$ bytes. The capacity of cache memory is $2^{N}$  bytes. The size of each cache block is $2^{M}$ words. For a K-way set-associative cache memory , the length (in number of bits ) of the tag field is

A.
B.
C.
D.
7.

Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is N. Three semaphores empty, full and mutex are defined with respective initial values of 0, N and 1 . Semaphore empty denotes the number of  available slots in the buffer, for the  produce to write to. The placeholder variables, denotes by P, Q , R and S in  the code below can be assigned either empty or full. The valid semaphore operations are: wait() and signal().

producer:consumer:
do{
wait(P);
wait(mutex);
//Add item to buffer
signal(mutex);
signal(Q);
}while(1);
do{
wait(R);
wait(mutex);
//Consume item from buffer
signal(mutex);
signal(S);
}while(1);

which one of the following assignments to P , Q, R and S will yield the correct solution?

A.
B.
C.
D.
8.

Recall that Belady’s anomaly is that the page-fault rate may increase as the number of allocated frames increases, Now, consider the following statements:

S1: Random page replacement algorithm (where a page chosen at random is replaced

S2: LRU page replacement algorithm suffers from Belady’s anomaly

Which of the following is CORRECT?

A.
B.
C.
D.
9. Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.

P1

P2

P3

:

:

D=D+20

:

:
:

:

D=D-50

:

:

:

:

D=D+10

:

:

 

The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y -X is______________.

A.
B.
C.
D.
10.

A 32-bit wide main memory unit with a capacity of 1 GB is built using 256M×4-bit DRAM chips. The number of rows of memory cells in the DRAM chip is $2^{14}$.The time taken to perform one refresh operation is 50 nanoseconds. The refresh period is 2 milliseconds. The percentage (rounded to the closest integer) of the time available for performing the memory read/write operations in the main memory unit is ____.

A.
B.
C.
D.

 

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments